1381 lines
61 KiB
JavaScript
1381 lines
61 KiB
JavaScript
(self["webpackChunk_woocommerce_storybook"] = self["webpackChunk_woocommerce_storybook"] || []).push([[5302],{
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _arrayLikeToArray)
|
|
/* harmony export */ });
|
|
function _arrayLikeToArray(arr, len) {
|
|
if (len == null || len > arr.length) len = arr.length;
|
|
for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
|
|
return arr2;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _arrayWithHoles)
|
|
/* harmony export */ });
|
|
function _arrayWithHoles(arr) {
|
|
if (Array.isArray(arr)) return arr;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../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/defineProperty.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _defineProperty)
|
|
/* 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 _defineProperty(obj, key, value) {
|
|
key = (0,_toPropertyKey_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(key);
|
|
if (key in obj) {
|
|
Object.defineProperty(obj, key, {
|
|
value: value,
|
|
enumerable: true,
|
|
configurable: true,
|
|
writable: true
|
|
});
|
|
} else {
|
|
obj[key] = value;
|
|
}
|
|
return obj;
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../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/nonIterableRest.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _nonIterableRest)
|
|
/* harmony export */ });
|
|
function _nonIterableRest() {
|
|
throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../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/slicedToArray.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
A: () => (/* binding */ _slicedToArray)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js
|
|
var arrayWithHoles = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayWithHoles.js");
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/iterableToArrayLimit.js
|
|
function _iterableToArrayLimit(r, l) {
|
|
var t = null == r ? null : "undefined" != typeof Symbol && r[Symbol.iterator] || r["@@iterator"];
|
|
if (null != t) {
|
|
var e,
|
|
n,
|
|
i,
|
|
u,
|
|
a = [],
|
|
f = !0,
|
|
o = !1;
|
|
try {
|
|
if (i = (t = t.call(r)).next, 0 === l) {
|
|
if (Object(t) !== t) return;
|
|
f = !1;
|
|
} else for (; !(f = (e = i.call(t)).done) && (a.push(e.value), a.length !== l); f = !0);
|
|
} catch (r) {
|
|
o = !0, n = r;
|
|
} finally {
|
|
try {
|
|
if (!f && null != t["return"] && (u = t["return"](), Object(u) !== u)) return;
|
|
} finally {
|
|
if (o) throw n;
|
|
}
|
|
}
|
|
return a;
|
|
}
|
|
}
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js
|
|
var unsupportedIterableToArray = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js
|
|
var nonIterableRest = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/nonIterableRest.js");
|
|
;// CONCATENATED MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/slicedToArray.js
|
|
|
|
|
|
|
|
|
|
function _slicedToArray(arr, i) {
|
|
return (0,arrayWithHoles/* default */.A)(arr) || _iterableToArrayLimit(arr, i) || (0,unsupportedIterableToArray/* default */.A)(arr, i) || (0,nonIterableRest/* default */.A)();
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../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);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
/* harmony export */ A: () => (/* binding */ _unsupportedIterableToArray)
|
|
/* harmony export */ });
|
|
/* harmony import */ var _arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js");
|
|
|
|
function _unsupportedIterableToArray(o, minLen) {
|
|
if (!o) return;
|
|
if (typeof o === "string") return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(o, minLen);
|
|
var n = Object.prototype.toString.call(o).slice(8, -1);
|
|
if (n === "Object" && o.constructor) n = o.constructor.name;
|
|
if (n === "Map" || n === "Set") return Array.from(o);
|
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return (0,_arrayLikeToArray_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */ .A)(o, minLen);
|
|
}
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../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/array-for-each.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
var $forEach = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").forEach);
|
|
var arrayMethodIsStrict = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js");
|
|
|
|
var STRICT_METHOD = arrayMethodIsStrict('forEach');
|
|
|
|
// `Array.prototype.forEach` method implementation
|
|
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) {
|
|
return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
|
} : [].forEach;
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
|
var wellKnownSymbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/well-known-symbol.js");
|
|
var V8_VERSION = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/engine-v8-version.js");
|
|
|
|
var SPECIES = wellKnownSymbol('species');
|
|
|
|
module.exports = function (METHOD_NAME) {
|
|
// We can't use this feature detection in V8 since it causes
|
|
// deoptimization and serious performance degradation
|
|
// https://github.com/zloirock/core-js/issues/677
|
|
return V8_VERSION >= 51 || !fails(function () {
|
|
var array = [];
|
|
var constructor = array.constructor = {};
|
|
constructor[SPECIES] = function () {
|
|
return { foo: 1 };
|
|
};
|
|
return array[METHOD_NAME](Boolean).foo !== 1;
|
|
});
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-is-strict.js":
|
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
|
|
|
module.exports = function (METHOD_NAME, argument) {
|
|
var method = [][METHOD_NAME];
|
|
return !!method && fails(function () {
|
|
// eslint-disable-next-line no-useless-call -- required for testing
|
|
method.call(null, argument || function () { return 1; }, 1);
|
|
});
|
|
};
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../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.array.filter.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 $filter = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").filter);
|
|
var arrayMethodHasSpeciesSupport = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js");
|
|
|
|
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter');
|
|
|
|
// `Array.prototype.filter` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.filter
|
|
// with adding support of @@species
|
|
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
|
filter: function filter(callbackfn /* , thisArg */) {
|
|
return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find-index.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 $findIndex = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").findIndex);
|
|
var addToUnscopables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/add-to-unscopables.js");
|
|
|
|
var FIND_INDEX = 'findIndex';
|
|
var SKIPS_HOLES = true;
|
|
|
|
// Shouldn't skip holes
|
|
// eslint-disable-next-line es/no-array-prototype-findindex -- testing
|
|
if (FIND_INDEX in []) Array(1)[FIND_INDEX](function () { SKIPS_HOLES = false; });
|
|
|
|
// `Array.prototype.findIndex` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.findindex
|
|
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
|
findIndex: function findIndex(callbackfn /* , that = undefined */) {
|
|
return $findIndex(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
addToUnscopables(FIND_INDEX);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find.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 $find = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").find);
|
|
var addToUnscopables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/add-to-unscopables.js");
|
|
|
|
var FIND = 'find';
|
|
var SKIPS_HOLES = true;
|
|
|
|
// Shouldn't skip holes
|
|
// eslint-disable-next-line es/no-array-prototype-find -- testing
|
|
if (FIND in []) Array(1)[FIND](function () { SKIPS_HOLES = false; });
|
|
|
|
// `Array.prototype.find` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.find
|
|
$({ target: 'Array', proto: true, forced: SKIPS_HOLES }, {
|
|
find: function find(callbackfn /* , that = undefined */) {
|
|
return $find(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
// https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
|
|
addToUnscopables(FIND);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.for-each.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 forEach = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-for-each.js");
|
|
|
|
// `Array.prototype.forEach` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.foreach
|
|
// eslint-disable-next-line es/no-array-prototype-foreach -- safe
|
|
$({ target: 'Array', proto: true, forced: [].forEach !== forEach }, {
|
|
forEach: forEach
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.map.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 $map = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-iteration.js").map);
|
|
var arrayMethodHasSpeciesSupport = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-method-has-species-support.js");
|
|
|
|
var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map');
|
|
|
|
// `Array.prototype.map` method
|
|
// https://tc39.es/ecma262/#sec-array.prototype.map
|
|
// with adding support of @@species
|
|
$({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, {
|
|
map: function map(callbackfn /* , thisArg */) {
|
|
return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-properties.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 DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
|
var defineProperties = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-properties.js").f);
|
|
|
|
// `Object.defineProperties` method
|
|
// https://tc39.es/ecma262/#sec-object.defineproperties
|
|
// eslint-disable-next-line es/no-object-defineproperties -- safe
|
|
$({ target: 'Object', stat: true, forced: Object.defineProperties !== defineProperties, sham: !DESCRIPTORS }, {
|
|
defineProperties: defineProperties
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-property.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 DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
|
var defineProperty = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-define-property.js").f);
|
|
|
|
// `Object.defineProperty` method
|
|
// https://tc39.es/ecma262/#sec-object.defineproperty
|
|
// eslint-disable-next-line es/no-object-defineproperty -- safe
|
|
$({ target: 'Object', stat: true, forced: Object.defineProperty !== defineProperty, sham: !DESCRIPTORS }, {
|
|
defineProperty: defineProperty
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.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 fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
|
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
|
var nativeGetOwnPropertyDescriptor = (__webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-descriptor.js").f);
|
|
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
|
|
|
var FORCED = !DESCRIPTORS || fails(function () { nativeGetOwnPropertyDescriptor(1); });
|
|
|
|
// `Object.getOwnPropertyDescriptor` method
|
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
|
|
$({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, {
|
|
getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) {
|
|
return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key);
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.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 DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
|
var ownKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/own-keys.js");
|
|
var toIndexedObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-indexed-object.js");
|
|
var getOwnPropertyDescriptorModule = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-get-own-property-descriptor.js");
|
|
var createProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-property.js");
|
|
|
|
// `Object.getOwnPropertyDescriptors` method
|
|
// https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
|
|
$({ target: 'Object', stat: true, sham: !DESCRIPTORS }, {
|
|
getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) {
|
|
var O = toIndexedObject(object);
|
|
var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f;
|
|
var keys = ownKeys(O);
|
|
var result = {};
|
|
var index = 0;
|
|
var key, descriptor;
|
|
while (keys.length > index) {
|
|
descriptor = getOwnPropertyDescriptor(O, key = keys[index++]);
|
|
if (descriptor !== undefined) createProperty(result, key, descriptor);
|
|
}
|
|
return result;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.keys.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 toObject = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-object.js");
|
|
var nativeKeys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-keys.js");
|
|
var fails = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/fails.js");
|
|
|
|
var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); });
|
|
|
|
// `Object.keys` method
|
|
// https://tc39.es/ecma262/#sec-object.keys
|
|
$({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, {
|
|
keys: function keys(it) {
|
|
return nativeKeys(toObject(it));
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../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;
|
|
}
|
|
});
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.description.js":
|
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
// `Symbol.prototype.description` getter
|
|
// https://tc39.es/ecma262/#sec-symbol.prototype.description
|
|
|
|
var $ = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/export.js");
|
|
var DESCRIPTORS = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/descriptors.js");
|
|
var global = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js");
|
|
var uncurryThis = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/function-uncurry-this.js");
|
|
var hasOwn = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/has-own-property.js");
|
|
var isCallable = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/is-callable.js");
|
|
var isPrototypeOf = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/object-is-prototype-of.js");
|
|
var toString = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/to-string.js");
|
|
var defineBuiltInAccessor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/define-built-in-accessor.js");
|
|
var copyConstructorProperties = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/copy-constructor-properties.js");
|
|
|
|
var NativeSymbol = global.Symbol;
|
|
var SymbolPrototype = NativeSymbol && NativeSymbol.prototype;
|
|
|
|
if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) ||
|
|
// Safari 12 bug
|
|
NativeSymbol().description !== undefined
|
|
)) {
|
|
var EmptyStringDescriptionStore = {};
|
|
// wrap Symbol constructor for correct work with undefined description
|
|
var SymbolWrapper = function Symbol() {
|
|
var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]);
|
|
var result = isPrototypeOf(SymbolPrototype, this)
|
|
? new NativeSymbol(description)
|
|
// in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)'
|
|
: description === undefined ? NativeSymbol() : NativeSymbol(description);
|
|
if (description === '') EmptyStringDescriptionStore[result] = true;
|
|
return result;
|
|
};
|
|
|
|
copyConstructorProperties(SymbolWrapper, NativeSymbol);
|
|
SymbolWrapper.prototype = SymbolPrototype;
|
|
SymbolPrototype.constructor = SymbolWrapper;
|
|
|
|
var NATIVE_SYMBOL = String(NativeSymbol('description detection')) === 'Symbol(description detection)';
|
|
var thisSymbolValue = uncurryThis(SymbolPrototype.valueOf);
|
|
var symbolDescriptiveString = uncurryThis(SymbolPrototype.toString);
|
|
var regexp = /^Symbol\((.*)\)[^)]+$/;
|
|
var replace = uncurryThis(''.replace);
|
|
var stringSlice = uncurryThis(''.slice);
|
|
|
|
defineBuiltInAccessor(SymbolPrototype, 'description', {
|
|
configurable: true,
|
|
get: function description() {
|
|
var symbol = thisSymbolValue(this);
|
|
if (hasOwn(EmptyStringDescriptionStore, symbol)) return '';
|
|
var string = symbolDescriptiveString(symbol);
|
|
var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
|
|
return desc === '' ? undefined : desc;
|
|
}
|
|
});
|
|
|
|
$({ global: true, constructor: true, forced: true }, {
|
|
Symbol: SymbolWrapper
|
|
});
|
|
}
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.for-each.js":
|
|
/***/ ((__unused_webpack_module, __unused_webpack_exports, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
|
|
var global = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/global.js");
|
|
var DOMIterables = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/dom-iterables.js");
|
|
var DOMTokenListPrototype = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/dom-token-list-prototype.js");
|
|
var forEach = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/array-for-each.js");
|
|
var createNonEnumerableProperty = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/internals/create-non-enumerable-property.js");
|
|
|
|
var handlePrototype = function (CollectionPrototype) {
|
|
// some Chrome versions have non-configurable methods on DOMTokenList
|
|
if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try {
|
|
createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach);
|
|
} catch (error) {
|
|
CollectionPrototype.forEach = forEach;
|
|
}
|
|
};
|
|
|
|
for (var COLLECTION_NAME in DOMIterables) {
|
|
if (DOMIterables[COLLECTION_NAME]) {
|
|
handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype);
|
|
}
|
|
}
|
|
|
|
handlePrototype(DOMTokenListPrototype);
|
|
|
|
|
|
/***/ }),
|
|
|
|
/***/ "../../packages/js/components/src/stepper/stories/stepper.story.js":
|
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
|
|
"use strict";
|
|
// ESM COMPAT FLAG
|
|
__webpack_require__.r(__webpack_exports__);
|
|
|
|
// EXPORTS
|
|
__webpack_require__.d(__webpack_exports__, {
|
|
Examples: () => (/* binding */ Examples),
|
|
"default": () => (/* binding */ stepper_story)
|
|
});
|
|
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
|
var defineProperty = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/defineProperty.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/slicedToArray.js + 1 modules
|
|
var slicedToArray = __webpack_require__("../../node_modules/.pnpm/@babel+runtime@7.23.5/node_modules/@babel/runtime/helpers/esm/slicedToArray.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js
|
|
var react = __webpack_require__("../../node_modules/.pnpm/react@18.3.1/node_modules/react/index.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find-index.js
|
|
var es_array_find_index = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find-index.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.for-each.js
|
|
var es_array_for_each = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.for-each.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.to-string.js
|
|
var es_object_to_string = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.to-string.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.for-each.js
|
|
var web_dom_collections_for_each = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/web.dom-collections.for-each.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.keys.js
|
|
var es_object_keys = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.keys.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.js
|
|
var es_symbol = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.filter.js
|
|
var es_array_filter = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.filter.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.js
|
|
var es_object_get_own_property_descriptor = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptor.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.js
|
|
var es_object_get_own_property_descriptors = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.get-own-property-descriptors.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-properties.js
|
|
var es_object_define_properties = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-properties.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-property.js
|
|
var es_object_define_property = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.object.define-property.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find.js
|
|
var es_array_find = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.find.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.map.js
|
|
var es_array_map = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.array.map.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.description.js
|
|
var es_symbol_description = __webpack_require__("../../node_modules/.pnpm/core-js@3.34.0/node_modules/core-js/modules/es.symbol.description.js");
|
|
// EXTERNAL MODULE: ../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js
|
|
var classnames = __webpack_require__("../../node_modules/.pnpm/classnames@2.3.2/node_modules/classnames/index.js");
|
|
var classnames_default = /*#__PURE__*/__webpack_require__.n(classnames);
|
|
// EXTERNAL MODULE: ../../packages/js/components/src/spinner/index.js
|
|
var spinner = __webpack_require__("../../packages/js/components/src/spinner/index.js");
|
|
;// CONCATENATED MODULE: ../../packages/js/components/src/stepper/check-icon.tsx
|
|
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
/* harmony default export */ const check_icon = (function () {
|
|
// we need a unique mask id because HTML ids are global in nature and collisions result in strange outcomes
|
|
var maskId = "check-icon-mask-".concat(Math.floor(Math.random() * 10000000));
|
|
return (0,react.createElement)("svg", {
|
|
role: "img",
|
|
"aria-hidden": "true",
|
|
focusable: "false",
|
|
width: "18",
|
|
height: "18",
|
|
viewBox: "0 0 18 18",
|
|
fill: "none",
|
|
xmlns: "http://www.w3.org/2000/svg"
|
|
}, (0,react.createElement)("mask", {
|
|
id: maskId,
|
|
style: {
|
|
maskType: 'alpha'
|
|
},
|
|
maskUnits: "userSpaceOnUse",
|
|
x: "2",
|
|
y: "3",
|
|
width: "14",
|
|
height: "12"
|
|
}, (0,react.createElement)("path", {
|
|
d: "M6.59631 11.9062L3.46881 8.77875L2.40381 9.83625L6.59631 14.0287L15.5963 5.02875L14.5388 3.97125L6.59631 11.9062Z",
|
|
fill: "white"
|
|
})), (0,react.createElement)("g", {
|
|
mask: "url(#".concat(maskId, ")")
|
|
}, (0,react.createElement)("rect", {
|
|
width: "18",
|
|
height: "18",
|
|
fill: "white"
|
|
})));
|
|
});
|
|
;// CONCATENATED MODULE: ../../packages/js/components/src/stepper/index.tsx
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
|
|
/**
|
|
* Internal dependencies
|
|
*/
|
|
|
|
|
|
/**
|
|
* A stepper component to indicate progress in a set number of steps.
|
|
*/
|
|
var Stepper = function Stepper(_ref) {
|
|
var className = _ref.className,
|
|
currentStep = _ref.currentStep,
|
|
steps = _ref.steps,
|
|
_ref$isVertical = _ref.isVertical,
|
|
isVertical = _ref$isVertical === void 0 ? false : _ref$isVertical,
|
|
_ref$isPending = _ref.isPending,
|
|
isPending = _ref$isPending === void 0 ? false : _ref$isPending;
|
|
var renderCurrentStepContent = function renderCurrentStepContent() {
|
|
var step = steps.find(function (s) {
|
|
return currentStep === s.key;
|
|
});
|
|
if (!step || !step.content) {
|
|
return null;
|
|
}
|
|
return (0,react.createElement)("div", {
|
|
className: "woocommerce-stepper_content"
|
|
}, step.content);
|
|
};
|
|
var currentIndex = steps.findIndex(function (s) {
|
|
return currentStep === s.key;
|
|
});
|
|
var stepperClassName = classnames_default()('woocommerce-stepper', className, {
|
|
'is-vertical': isVertical
|
|
});
|
|
return (0,react.createElement)("div", {
|
|
className: stepperClassName
|
|
}, (0,react.createElement)("div", {
|
|
className: "woocommerce-stepper__steps"
|
|
}, steps.map(function (step, i) {
|
|
var key = step.key,
|
|
label = step.label,
|
|
description = step.description,
|
|
isComplete = step.isComplete,
|
|
onClick = step.onClick;
|
|
var isCurrentStep = key === currentStep;
|
|
var stepClassName = classnames_default()('woocommerce-stepper__step', {
|
|
'is-active': isCurrentStep,
|
|
'is-complete': typeof isComplete !== 'undefined' ? isComplete : currentIndex > i
|
|
});
|
|
var icon = isCurrentStep && isPending ? (0,react.createElement)(spinner/* default */.A, null) : (0,react.createElement)("div", {
|
|
className: "woocommerce-stepper__step-icon"
|
|
}, (0,react.createElement)("span", {
|
|
className: "woocommerce-stepper__step-number"
|
|
}, i + 1), (0,react.createElement)(check_icon, null));
|
|
var LabelWrapper = typeof onClick === 'function' ? 'button' : 'div';
|
|
return (0,react.createElement)(react.Fragment, {
|
|
key: key
|
|
}, (0,react.createElement)("div", {
|
|
className: stepClassName
|
|
}, (0,react.createElement)(LabelWrapper, {
|
|
className: "woocommerce-stepper__step-label-wrapper",
|
|
onClick: typeof onClick === 'function' ? function () {
|
|
return onClick(key);
|
|
} : undefined
|
|
}, icon, (0,react.createElement)("div", {
|
|
className: "woocommerce-stepper__step-text"
|
|
}, (0,react.createElement)("span", {
|
|
className: "woocommerce-stepper__step-label"
|
|
}, label), description && (0,react.createElement)("span", {
|
|
className: "woocommerce-stepper__step-description"
|
|
}, description))), isCurrentStep && isVertical && renderCurrentStepContent()), !isVertical && (0,react.createElement)("div", {
|
|
className: "woocommerce-stepper__step-divider"
|
|
}));
|
|
})), !isVertical && renderCurrentStepContent());
|
|
};
|
|
/* harmony default export */ const src_stepper = (Stepper);
|
|
try {
|
|
// @ts-ignore
|
|
Stepper.displayName = "Stepper";
|
|
// @ts-ignore
|
|
Stepper.__docgenInfo = { "description": "A stepper component to indicate progress in a set number of steps.", "displayName": "Stepper", "props": { "className": { "defaultValue": null, "description": "Additional class name to style the component.", "name": "className", "required": false, "type": { "name": "string" } }, "currentStep": { "defaultValue": null, "description": "The current step's key.", "name": "currentStep", "required": true, "type": { "name": "string" } }, "steps": { "defaultValue": null, "description": "An array of steps used.", "name": "steps", "required": true, "type": { "name": "{ content: ReactNode; description: string | string[]; isComplete?: boolean | undefined; key: string; label: string; onClick?: ((key: string) => void) | undefined; }[]" } }, "isVertical": { "defaultValue": { value: "false" }, "description": "If the stepper is vertical instead of horizontal.", "name": "isVertical", "required": false, "type": { "name": "boolean" } }, "isPending": { "defaultValue": { value: "false" }, "description": "Optionally mark the current step as pending to show a spinner.", "name": "isPending", "required": false, "type": { "name": "boolean" } } } };
|
|
// @ts-ignore
|
|
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
|
// @ts-ignore
|
|
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/stepper/index.tsx#Stepper"] = { docgenInfo: Stepper.__docgenInfo, name: "Stepper", path: "../../packages/js/components/src/stepper/index.tsx#Stepper" };
|
|
}
|
|
catch (__react_docgen_typescript_loader_error) { }
|
|
try {
|
|
// @ts-ignore
|
|
stepper.displayName = "stepper";
|
|
// @ts-ignore
|
|
stepper.__docgenInfo = { "description": "A stepper component to indicate progress in a set number of steps.", "displayName": "stepper", "props": { "className": { "defaultValue": null, "description": "Additional class name to style the component.", "name": "className", "required": false, "type": { "name": "string" } }, "currentStep": { "defaultValue": null, "description": "The current step's key.", "name": "currentStep", "required": true, "type": { "name": "string" } }, "steps": { "defaultValue": null, "description": "An array of steps used.", "name": "steps", "required": true, "type": { "name": "{ content: ReactNode; description: string | string[]; isComplete?: boolean | undefined; key: string; label: string; onClick?: ((key: string) => void) | undefined; }[]" } }, "isVertical": { "defaultValue": { value: "false" }, "description": "If the stepper is vertical instead of horizontal.", "name": "isVertical", "required": false, "type": { "name": "boolean" } }, "isPending": { "defaultValue": { value: "false" }, "description": "Optionally mark the current step as pending to show a spinner.", "name": "isPending", "required": false, "type": { "name": "boolean" } } } };
|
|
// @ts-ignore
|
|
if (typeof STORYBOOK_REACT_CLASSES !== "undefined")
|
|
// @ts-ignore
|
|
STORYBOOK_REACT_CLASSES["../../packages/js/components/src/stepper/index.tsx#stepper"] = { docgenInfo: stepper.__docgenInfo, name: "stepper", path: "../../packages/js/components/src/stepper/index.tsx#stepper" };
|
|
}
|
|
catch (__react_docgen_typescript_loader_error) { }
|
|
;// CONCATENATED MODULE: ../../packages/js/components/src/stepper/stories/stepper.story.js
|
|
|
|
|
|
|
|
function ownKeys(e, r) {
|
|
var t = Object.keys(e);
|
|
if (Object.getOwnPropertySymbols) {
|
|
var o = Object.getOwnPropertySymbols(e);
|
|
r && (o = o.filter(function (r) {
|
|
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
})), t.push.apply(t, o);
|
|
}
|
|
return t;
|
|
}
|
|
function _objectSpread(e) {
|
|
for (var r = 1; r < arguments.length; r++) {
|
|
var t = null != arguments[r] ? arguments[r] : {};
|
|
r % 2 ? ownKeys(Object(t), !0).forEach(function (r) {
|
|
(0,defineProperty/* default */.A)(e, r, t[r]);
|
|
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
});
|
|
}
|
|
return e;
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
* External dependencies
|
|
*/
|
|
|
|
|
|
var BasicExamples = function BasicExamples() {
|
|
var _useState = (0,react.useState)({
|
|
currentStep: 'first',
|
|
isComplete: false,
|
|
isPending: false
|
|
}),
|
|
_useState2 = (0,slicedToArray/* default */.A)(_useState, 2),
|
|
state = _useState2[0],
|
|
setState = _useState2[1];
|
|
var currentStep = state.currentStep,
|
|
isComplete = state.isComplete,
|
|
isPending = state.isPending;
|
|
var goToStep = function goToStep(key) {
|
|
setState({
|
|
currentStep: key
|
|
});
|
|
};
|
|
var steps = [{
|
|
key: 'first',
|
|
label: 'First',
|
|
description: 'Step item description',
|
|
content: (0,react.createElement)("div", null, "First step content."),
|
|
onClick: goToStep
|
|
}, {
|
|
key: 'second',
|
|
label: 'Second',
|
|
description: 'Step item description',
|
|
content: (0,react.createElement)("div", null, "Second step content."),
|
|
onClick: goToStep
|
|
}, {
|
|
label: 'Third',
|
|
key: 'third',
|
|
description: 'Step item description',
|
|
content: (0,react.createElement)("div", null, "Third step content."),
|
|
onClick: goToStep
|
|
}, {
|
|
label: 'Fourth',
|
|
key: 'fourth',
|
|
description: 'Step item description',
|
|
content: (0,react.createElement)("div", null, "Fourth step content."),
|
|
onClick: goToStep
|
|
}];
|
|
var currentIndex = steps.findIndex(function (s) {
|
|
return currentStep === s.key;
|
|
});
|
|
if (isComplete) {
|
|
steps.forEach(function (s) {
|
|
return s.isComplete = true;
|
|
});
|
|
}
|
|
return (0,react.createElement)("div", null, isComplete ? (0,react.createElement)("button", {
|
|
onClick: function onClick() {
|
|
return setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
currentStep: 'first',
|
|
isComplete: false
|
|
}));
|
|
}
|
|
}, "Reset") : (0,react.createElement)("div", null, (0,react.createElement)("button", {
|
|
onClick: function onClick() {
|
|
return setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
currentStep: steps[currentIndex - 1].key
|
|
}));
|
|
},
|
|
disabled: currentIndex < 1
|
|
}, "Previous step"), (0,react.createElement)("button", {
|
|
onClick: function onClick() {
|
|
return setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
currentStep: steps[currentIndex + 1].key
|
|
}));
|
|
},
|
|
disabled: currentIndex >= steps.length - 1
|
|
}, "Next step"), (0,react.createElement)("button", {
|
|
onClick: function onClick() {
|
|
return setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
isComplete: true
|
|
}));
|
|
},
|
|
disabled: currentIndex !== steps.length - 1
|
|
}, "Complete"), (0,react.createElement)("button", {
|
|
onClick: function onClick() {
|
|
return setState(_objectSpread(_objectSpread({}, state), {}, {
|
|
isPending: !isPending
|
|
}));
|
|
}
|
|
}, "Toggle Spinner")), (0,react.createElement)(src_stepper, {
|
|
steps: steps,
|
|
currentStep: currentStep,
|
|
isPending: isPending
|
|
}), (0,react.createElement)("br", null), (0,react.createElement)(src_stepper, {
|
|
isPending: isPending,
|
|
isVertical: true,
|
|
steps: steps,
|
|
currentStep: currentStep
|
|
}));
|
|
};
|
|
var Examples = function Examples() {
|
|
return (0,react.createElement)(BasicExamples, null);
|
|
};
|
|
/* harmony default export */ const stepper_story = ({
|
|
title: 'WooCommerce Admin/components/Stepper',
|
|
component: src_stepper
|
|
});
|
|
Examples.parameters = {
|
|
...Examples.parameters,
|
|
docs: {
|
|
...Examples.parameters?.docs,
|
|
source: {
|
|
originalSource: "() => <BasicExamples />",
|
|
...Examples.parameters?.docs?.source
|
|
}
|
|
}
|
|
};
|
|
|
|
/***/ })
|
|
|
|
}]); |