@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
91 lines (87 loc) • 2.48 kB
JavaScript
"use client";
const require_rolldown_runtime = require('../../_virtual/rolldown_runtime.cjs');
const require_utils_index = require('../../utils/index.cjs');
const require_factory = require('../../core/system/factory.cjs');
const require_icon = require('../icon/icon.cjs');
const require_loading = require('./loading.cjs');
let react_jsx_runtime = require("react/jsx-runtime");
react_jsx_runtime = require_rolldown_runtime.__toESM(react_jsx_runtime);
//#region src/components/loading/circles.tsx
/**
* `Loading` is a component displayed during waiting times, such as when data is being loaded.
*
* @see https://yamada-ui.com/docs/components/feedback/loading
*/
const Circles = require_loading.withContext(({ dur = "3s",...rest }) => {
dur = (0, require_utils_index.utils_exports.isString)(dur) ? parseFloat(dur) : dur;
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_icon.Icon, {
stroke: "currentColor",
viewBox: "0 0 58 58",
...rest,
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("g", {
fill: "none",
fillRule: "evenodd",
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("g", {
stroke: "currentColor",
strokeWidth: "1.5",
transform: "translate(2 1)",
children: [
{
cx: "42.601px",
cy: "11.462px"
},
{
animationDelay: "0.375s",
cx: "49.063px",
cy: "27.063px"
},
{
animationDelay: "0.75s",
cx: "42.601px",
cy: "42.663px"
},
{
animationDelay: "1.125s",
cx: "27px",
cy: "49.125px"
},
{
animationDelay: "1.5s",
cx: "11.399px",
cy: "42.663px"
},
{
animationDelay: "1.875s",
cx: "4.938px",
cy: "27.063px"
},
{
animationDelay: "2.25s",
cx: "11.399px",
cy: "11.462px"
},
{
animationDelay: "2.625s",
cx: "27px",
cy: "5px"
}
].map((props, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.circle, {
...props,
animationDuration: `${dur}s`,
animationIterationCount: "infinite",
animationTimingFunction: "linear",
fill: "currentColor",
fillOpacity: !index ? "1" : "0",
r: "5px",
_keyframes: {
"0%, 25%, 100%": { fillOpacity: 0 },
"12.5%": { fillOpacity: 1 }
}
}, index))
})
})
});
})(require_loading.initialProps, require_loading.superProps);
//#endregion
exports.Circles = Circles;
//# sourceMappingURL=circles.cjs.map