@konstructio/ui
Version:
A set of reusable and customizable React components built for konstruct.io
59 lines (58 loc) • 1.06 kB
JavaScript
import { n as f } from "./dist-CMPkuWNy.js";
import * as t from "react";
import { jsx as a } from "react/jsx-runtime";
var u = [
"a",
"button",
"div",
"form",
"h2",
"h3",
"img",
"input",
"label",
"li",
"nav",
"ol",
"p",
"select",
"span",
"svg",
"ul"
].reduce((i, r) => {
const n = f(`Primitive.${r}`), e = t.forwardRef((l, s) => {
const { asChild: d, ...m } = l, p = d ? n : r;
return typeof window < "u" && (window[/* @__PURE__ */ Symbol.for("radix-ui")] = !0), /* @__PURE__ */ a(p, {
...m,
ref: s
});
});
return e.displayName = `Primitive.${r}`, {
...i,
[r]: e
};
}, {}), v = Object.freeze({
position: "absolute",
border: 0,
width: 1,
height: 1,
padding: 0,
margin: -1,
overflow: "hidden",
clip: "rect(0, 0, 0, 0)",
whiteSpace: "nowrap",
wordWrap: "normal"
}), c = "VisuallyHidden", o = t.forwardRef((i, r) => /* @__PURE__ */ a(u.span, {
...i,
ref: r,
style: {
...v,
...i.style
}
}));
o.displayName = c;
var y = o;
export {
o as n,
y as t
};