UNPKG

@konstructio/ui

Version:

A set of reusable and customizable React components built for konstruct.io

110 lines (109 loc) 2.61 kB
import { jsx as f } from "react/jsx-runtime"; import { cn as h } from "../../utils/index.js"; import { loadingVariants as g } from "./Loading.variants.js"; import { forwardRef as s, createElement as i } from "react"; import { useTheme as w } from "../../contexts/theme.hook.js"; /** * @license lucide-react v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const C = (r) => r.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), m = (...r) => r.filter((e, o, t) => !!e && e.trim() !== "" && t.indexOf(e) === o).join(" ").trim(); /** * @license lucide-react v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ var L = { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 24, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", strokeLinejoin: "round" }; /** * @license lucide-react v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const k = s( ({ color: r = "currentColor", size: e = 24, strokeWidth: o = 2, absoluteStrokeWidth: t, className: a = "", children: n, iconNode: c, ...d }, l) => i( "svg", { ref: l, ...L, width: e, height: e, stroke: r, strokeWidth: t ? Number(o) * 24 / Number(e) : o, className: m("lucide", a), ...d }, [ ...c.map(([u, p]) => i(u, p)), ...Array.isArray(n) ? n : [n] ] ) ); /** * @license lucide-react v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const x = (r, e) => { const o = s( ({ className: t, ...a }, n) => i(k, { ref: n, iconNode: e, className: m(`lucide-${C(r)}`, t), ...a }) ); return o.displayName = `${r}`, o; }; /** * @license lucide-react v0.477.0 - ISC * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. */ const b = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], y = x("LoaderCircle", b), N = ({ className: r, theme: e, ...o }) => { const { theme: t } = w(); return /* @__PURE__ */ f( y, { className: h( g({ className: r, theme: e ?? t }) ), ...o } ); }; N.displayName = "Loading"; export { N as Loading };