@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
76 lines (72 loc) • 2.35 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/puff.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 Puff = require_loading.withContext(({ dur = "1.8s",...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 44 44",
...rest,
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("g", {
fill: "none",
fillRule: "evenodd",
strokeWidth: "2",
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.circle, {
animationDuration: `${dur}s`,
animationIterationCount: "infinite",
animationTimingFunction: "cubic-bezier(0.3, 0.61, 0.355, 1)",
cx: "22px",
cy: "22px",
r: "1px",
transformBox: "fill-box",
transformOrigin: "center",
vectorEffect: "non-scaling-stroke",
_keyframes: {
"0%": {
strokeOpacity: 1,
transform: "scale(1)"
},
"100%": {
strokeOpacity: 0,
transform: "scale(20)"
}
}
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.circle, {
animationDelay: "-0.9s",
animationDuration: `${dur}s`,
animationIterationCount: "infinite",
animationTimingFunction: "cubic-bezier(0.3, 0.61, 0.355, 1)",
cx: "22px",
cy: "22px",
r: "1px",
transformBox: "fill-box",
transformOrigin: "center",
vectorEffect: "non-scaling-stroke",
_keyframes: {
"0%": {
strokeOpacity: 1,
transform: "scale(1)"
},
"100%": {
strokeOpacity: 0,
transform: "scale(20)"
}
}
})]
})
});
})(require_loading.initialProps, require_loading.superProps);
//#endregion
exports.Puff = Puff;
//# sourceMappingURL=puff.cjs.map