UNPKG

@yamada-ui/loading

Version:

Yamada UI loading components

133 lines (132 loc) 4.6 kB
"use client" "use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/rings.tsx var rings_exports = {}; __export(rings_exports, { Rings: () => Rings }); module.exports = __toCommonJS(rings_exports); var import_core = require("@yamada-ui/core"); var import_icon = require("@yamada-ui/icon"); var import_jsx_runtime = require("react/jsx-runtime"); var Rings = (0, import_core.forwardRef)( ({ color, duration = "3s", ...rest }, ref) => { const dur = typeof duration === "string" ? parseFloat(duration) : duration; return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_icon.Icon, { ref, stroke: color, viewBox: "0 0 45 45", ...rest, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)( "g", { fill: "none", fillRule: "evenodd", strokeWidth: "2", transform: "translate(1 1)", children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("circle", { cx: "22", cy: "22", r: "6", strokeOpacity: "0", children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)( "animate", { attributeName: "r", begin: "1.5s", calcMode: "linear", dur: `${dur}s`, repeatCount: "indefinite", values: "6;22" } ), /* @__PURE__ */ (0, import_jsx_runtime.jsx)( "animate", { attributeName: "stroke-opacity", begin: "1.5s", calcMode: "linear", dur: `${dur}s`, repeatCount: "indefinite", values: "1;0" } ), /* @__PURE__ */ (0, import_jsx_runtime.jsx)( "animate", { attributeName: "stroke-width", begin: "1.5s", calcMode: "linear", dur: `${dur}s`, repeatCount: "indefinite", values: "2;0" } ) ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("circle", { cx: "22", cy: "22", r: "6", strokeOpacity: "0", children: [ /* @__PURE__ */ (0, import_jsx_runtime.jsx)( "animate", { attributeName: "r", begin: "3s", calcMode: "linear", dur: `${dur}s`, repeatCount: "indefinite", values: "6;22" } ), /* @__PURE__ */ (0, import_jsx_runtime.jsx)( "animate", { attributeName: "stroke-opacity", begin: "3s", calcMode: "linear", dur: `${dur}s`, repeatCount: "indefinite", values: "1;0" } ), /* @__PURE__ */ (0, import_jsx_runtime.jsx)( "animate", { attributeName: "stroke-width", begin: "3s", calcMode: "linear", dur: `${dur}s`, repeatCount: "indefinite", values: "2;0" } ) ] }), /* @__PURE__ */ (0, import_jsx_runtime.jsx)("circle", { cx: "22", cy: "22", r: "8", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)( "animate", { attributeName: "r", begin: "0s", calcMode: "linear", dur: `${dur / 2}s`, repeatCount: "indefinite", values: "6;1;2;3;4;5;6" } ) }) ] } ) }); } ); Rings.displayName = "Rings"; Rings.__ui__ = "Rings"; // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { Rings }); //# sourceMappingURL=rings.js.map