512 lines
22 KiB
JavaScript
512 lines
22 KiB
JavaScript
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[358],{
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _assertThisInitialized)
|
|
/* harmony export */ });
|
|
function _assertThisInitialized(self) {
|
|
if (self === void 0) {
|
|
throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
|
|
}
|
|
return self;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/classCallCheck.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _classCallCheck)
|
|
/* harmony export */ });
|
|
function _classCallCheck(instance, Constructor) {
|
|
if (!(instance instanceof Constructor)) {
|
|
throw new TypeError("Cannot call a class as a function");
|
|
}
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/createClass.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _createClass)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js");
|
|
|
|
function _defineProperties(target, props) {
|
|
for (var i = 0; i < props.length; i++) {
|
|
var descriptor = props[i];
|
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
descriptor.configurable = true;
|
|
if ("value" in descriptor) descriptor.writable = true;
|
|
Object.defineProperty(target, (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(descriptor.key), descriptor);
|
|
}
|
|
}
|
|
function _createClass(Constructor, protoProps, staticProps) {
|
|
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
|
|
if (staticProps) _defineProperties(Constructor, staticProps);
|
|
Object.defineProperty(Constructor, "prototype", {
|
|
writable: false
|
|
});
|
|
return Constructor;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _getPrototypeOf)
|
|
/* harmony export */ });
|
|
function _getPrototypeOf(o) {
|
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {
|
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
};
|
|
return _getPrototypeOf(o);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/inherits.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _inherits)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js");
|
|
|
|
function _inherits(subClass, superClass) {
|
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
throw new TypeError("Super expression must either be null or a function");
|
|
}
|
|
subClass.prototype = Object.create(superClass && superClass.prototype, {
|
|
constructor: {
|
|
value: subClass,
|
|
writable: true,
|
|
configurable: true
|
|
}
|
|
});
|
|
Object.defineProperty(subClass, "prototype", {
|
|
writable: false
|
|
});
|
|
if (superClass) (0,_setPrototypeOf_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(subClass, superClass);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _possibleConstructorReturn)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _typeof_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
|
/* harmony import */ var _assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js");
|
|
|
|
|
|
function _possibleConstructorReturn(self, call) {
|
|
if (call && ((0,_typeof_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(call) === "object" || typeof call === "function")) {
|
|
return call;
|
|
} else if (call !== void 0) {
|
|
throw new TypeError("Derived constructors may only return object or undefined");
|
|
}
|
|
return (0,_assertThisInitialized_js__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A)(self);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _setPrototypeOf)
|
|
/* harmony export */ });
|
|
function _setPrototypeOf(o, p) {
|
|
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
o.__proto__ = p;
|
|
return o;
|
|
};
|
|
return _setPrototypeOf(o, p);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
A: () => (/* binding */ _toPropertyKey)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js
|
|
var esm_typeof = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js");
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPrimitive.js
|
|
|
|
function _toPrimitive(input, hint) {
|
|
if ((0,esm_typeof/* default */.A)(input) !== "object" || input === null) return input;
|
|
var prim = input[Symbol.toPrimitive];
|
|
if (prim !== undefined) {
|
|
var res = prim.call(input, hint || "default");
|
|
if ((0,esm_typeof/* default */.A)(res) !== "object") return res;
|
|
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
}
|
|
return (hint === "string" ? String : Number)(input);
|
|
}
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
|
|
|
|
|
|
function _toPropertyKey(arg) {
|
|
var key = _toPrimitive(arg, "string");
|
|
return (0,esm_typeof/* default */.A)(key) === "symbol" ? key : String(key);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/typeof.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _typeof)
|
|
/* harmony export */ });
|
|
function _typeof(o) {
|
|
"@babel/helpers - typeof";
|
|
|
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
return typeof o;
|
|
} : function (o) {
|
|
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
}, _typeof(o);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../packages/js/components/src/spinner/index.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.to-string.js");
|
|
/* harmony import */ var core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_object_to_string_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.reflect.construct.js");
|
|
/* harmony import */ var core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(core_js_modules_es_reflect_construct_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/classCallCheck.js");
|
|
/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/createClass.js");
|
|
/* harmony import */ var _babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/inherits.js");
|
|
/* harmony import */ var _babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/possibleConstructorReturn.js");
|
|
/* harmony import */ var _babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js");
|
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__("../../node_modules/.pnpm/prop-types@15.8.1/node_modules/prop-types/index.js");
|
|
/* harmony import */ var prop_types__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(prop_types__WEBPACK_IMPORTED_MODULE_9__);
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
|
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_4__);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function _createSuper(Derived) {
|
|
var hasNativeReflectConstruct = _isNativeReflectConstruct();
|
|
return function _createSuperInternal() {
|
|
var Super = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(Derived),
|
|
result;
|
|
if (hasNativeReflectConstruct) {
|
|
var NewTarget = (0,_babel_runtime_helpers_getPrototypeOf__WEBPACK_IMPORTED_MODULE_2__/* ["default"] */ .A)(this).constructor;
|
|
result = Reflect.construct(Super, arguments, NewTarget);
|
|
} else {
|
|
result = Super.apply(this, arguments);
|
|
}
|
|
return (0,_babel_runtime_helpers_possibleConstructorReturn__WEBPACK_IMPORTED_MODULE_3__/* ["default"] */ .A)(this, result);
|
|
};
|
|
}
|
|
function _isNativeReflectConstruct() {
|
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
if (Reflect.construct.sham) return false;
|
|
if (typeof Proxy === "function") return true;
|
|
try {
|
|
Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
|
|
return true;
|
|
} catch (e) {
|
|
return false;
|
|
}
|
|
}
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
|
|
|
|
|
|
/**
|
|
* Spinner - An indeterminate circular progress indicator.
|
|
*/
|
|
var Spinner = /*#__PURE__*/function (_Component) {
|
|
(0,_babel_runtime_helpers_inherits__WEBPACK_IMPORTED_MODULE_5__/* ["default"] */ .A)(Spinner, _Component);
|
|
var _super = _createSuper(Spinner);
|
|
function Spinner() {
|
|
(0,_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_6__/* ["default"] */ .A)(this, Spinner);
|
|
return _super.apply(this, arguments);
|
|
}
|
|
(0,_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_7__/* ["default"] */ .A)(Spinner, [{
|
|
key: "render",
|
|
value: function render() {
|
|
var className = this.props.className;
|
|
var classes = classnames__WEBPACK_IMPORTED_MODULE_4___default()('woocommerce-spinner', className);
|
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_8__.createElement)("svg", {
|
|
className: classes,
|
|
viewBox: "0 0 100 100",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_8__.createElement)("circle", {
|
|
className: "woocommerce-spinner__circle",
|
|
fill: "none",
|
|
strokeWidth: "5",
|
|
strokeLinecap: "round",
|
|
cx: "50",
|
|
cy: "50",
|
|
r: "30"
|
|
}));
|
|
}
|
|
}]);
|
|
return Spinner;
|
|
}(_wordpress_element__WEBPACK_IMPORTED_MODULE_8__.Component);
|
|
Spinner.propTypes = {
|
|
/**
|
|
* Additional class name to style the component.
|
|
*/
|
|
className: (prop_types__WEBPACK_IMPORTED_MODULE_9___default().string)
|
|
};
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Spinner);
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js":
|
|
/***/ ((module, exports) => {
|
|
|
|
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;
|
|
var nativeCodeString = '[native code]';
|
|
|
|
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 && !arg.toString.toString().includes('[native code]')) {
|
|
classes.push(arg.toString());
|
|
continue;
|
|
}
|
|
|
|
for (var key in arg) {
|
|
if (hasOwn.call(arg, key) && arg[key]) {
|
|
classes.push(key);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
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 {}
|
|
}());
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
|
var aCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/a-callable.js");
|
|
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
|
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
|
var arraySlice = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-slice.js");
|
|
var NATIVE_BIND = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind-native.js");
|
|
|
|
var $Function = Function;
|
|
var concat = uncurryThis([].concat);
|
|
var join = uncurryThis([].join);
|
|
var factories = {};
|
|
|
|
var construct = function (C, argsLength, args) {
|
|
if (!hasOwn(factories, argsLength)) {
|
|
var list = [];
|
|
var i = 0;
|
|
for (; i < argsLength; i++) list[i] = 'a[' + i + ']';
|
|
factories[argsLength] = $Function('C,a', 'return new C(' + join(list, ',') + ')');
|
|
} return factories[argsLength](C, args);
|
|
};
|
|
|
|
// `Function.prototype.bind` method implementation
|
|
// https://tc39.es/ecma262/#sec-function.prototype.bind
|
|
// eslint-disable-next-line es/no-function-prototype-bind -- detection
|
|
module.exports = NATIVE_BIND ? $Function.bind : function bind(that /* , ...args */) {
|
|
var F = aCallable(this);
|
|
var Prototype = F.prototype;
|
|
var partArgs = arraySlice(arguments, 1);
|
|
var boundFunction = function bound(/* args... */) {
|
|
var args = concat(partArgs, arraySlice(arguments));
|
|
return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args);
|
|
};
|
|
if (isObject(Prototype)) boundFunction.prototype = Prototype;
|
|
return boundFunction;
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.reflect.construct.js":
|
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
|
var getBuiltIn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/get-built-in.js");
|
|
var apply = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-apply.js");
|
|
var bind = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-bind.js");
|
|
var aConstructor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/a-constructor.js");
|
|
var anObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/an-object.js");
|
|
var isObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-object.js");
|
|
var create = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-create.js");
|
|
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
|
|
|
var nativeConstruct = getBuiltIn('Reflect', 'construct');
|
|
var ObjectPrototype = Object.prototype;
|
|
var push = [].push;
|
|
|
|
// `Reflect.construct` method
|
|
// https://tc39.es/ecma262/#sec-reflect.construct
|
|
// MS Edge supports only 2 arguments and argumentsList argument is optional
|
|
// FF Nightly sets third argument as `new.target`, but does not create `this` from it
|
|
var NEW_TARGET_BUG = fails(function () {
|
|
function F() { /* empty */ }
|
|
return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F);
|
|
});
|
|
|
|
var ARGS_BUG = !fails(function () {
|
|
nativeConstruct(function () { /* empty */ });
|
|
});
|
|
|
|
var FORCED = NEW_TARGET_BUG || ARGS_BUG;
|
|
|
|
$({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, {
|
|
construct: function construct(Target, args /* , newTarget */) {
|
|
aConstructor(Target);
|
|
anObject(args);
|
|
var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]);
|
|
if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget);
|
|
if (Target === newTarget) {
|
|
// w/o altered newTarget, optimization for 0-4 arguments
|
|
switch (args.length) {
|
|
case 0: return new Target();
|
|
case 1: return new Target(args[0]);
|
|
case 2: return new Target(args[0], args[1]);
|
|
case 3: return new Target(args[0], args[1], args[2]);
|
|
case 4: return new Target(args[0], args[1], args[2], args[3]);
|
|
}
|
|
// w/o altered newTarget, lot of arguments case
|
|
var $args = [null];
|
|
apply(push, $args, args);
|
|
return new (apply(bind, Target, $args))();
|
|
}
|
|
// with altered newTarget, not support built-in constructors
|
|
var proto = newTarget.prototype;
|
|
var instance = create(isObject(proto) ? proto : ObjectPrototype);
|
|
var result = apply(Target, instance, args);
|
|
return isObject(result) ? result : instance;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../packages/js/components/src/spinner/stories/spinner.story.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
__webpack_require__.r(__webpack_exports__);
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ Basic: () => (/* binding */ Basic),
|
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
|
/* harmony import */ var _woocommerce_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("../../packages/js/components/src/spinner/index.js");
|
|
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
var Basic = function Basic() {
|
|
return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_woocommerce_components__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A, null));
|
|
};
|
|
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({
|
|
title: 'WooCommerce Admin/components/Spinner',
|
|
component: _woocommerce_components__WEBPACK_IMPORTED_MODULE_1__/* ["default"] */ .A
|
|
});
|
|
Basic.parameters = {
|
|
...Basic.parameters,
|
|
docs: {
|
|
...Basic.parameters?.docs,
|
|
source: {
|
|
originalSource: "() => <div>\n <Spinner />\n </div>",
|
|
...Basic.parameters?.docs?.source
|
|
}
|
|
}
|
|
};
|
|
|
|
/***/ })
|
|
|
|
}]); |