@yamada-ui/react
Version:
React UI components of the Yamada, by the Yamada, for the Yamada built with React and Emotion
92 lines (88 loc) • 2.59 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/dots.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 Dots = require_loading.withContext(({ dur = "1s",...rest }) => {
dur = (0, require_utils_index.utils_exports.isString)(dur) ? parseFloat(dur) : dur;
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_icon.Icon, {
fill: "currentColor",
viewBox: "0 0 120 30",
...rest,
children: [
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.circle, {
animationDuration: `${dur}s`,
animationIterationCount: "infinite",
animationTimingFunction: "linear",
cx: "15px",
cy: "15px",
r: "15px",
transformBox: "fill-box",
transformOrigin: "center",
_keyframes: {
"0%, 100%": {
opacity: "1",
transform: "scale(1)"
},
"50%": {
opacity: "0.5",
transform: `scale(calc(9 / 15))`
}
}
}),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.circle, {
animationDuration: `${dur}s`,
animationIterationCount: "infinite",
animationTimingFunction: "linear",
cx: "60px",
cy: "15px",
fillOpacity: "1",
r: "9px",
transformBox: "fill-box",
transformOrigin: "center",
_keyframes: {
"0%, 100%": {
opacity: "0.5",
transform: "scale(1)"
},
"50%": {
opacity: "1",
transform: `scale(calc(15 / 9))`
}
}
}),
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.circle, {
animationDuration: `${dur}s`,
animationIterationCount: "infinite",
animationTimingFunction: "linear",
cx: "105px",
cy: "15px",
r: "15px",
transformBox: "fill-box",
transformOrigin: "center",
_keyframes: {
"0%, 100%": {
opacity: "1",
transform: "scale(1)"
},
"50%": {
opacity: "0.5",
transform: `scale(calc(9 / 15))`
}
}
})
]
});
})(require_loading.initialProps, require_loading.superProps);
//#endregion
exports.Dots = Dots;
//# sourceMappingURL=dots.cjs.map