UNPKG

dgz-ui

Version:

Custom ui library using React.js, Shadcn/ui, TailwindCSS, Typescript

37 lines (36 loc) 749 B
import * as p from "react"; import * as f from "react-dom"; import { c } from "./index-l1ZGtt0d.js"; import { j as u } from "./jsx-runtime-C5mzlN2N.js"; var l = [ "a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul" ], h = l.reduce((t, i) => { const o = c(`Primitive.${i}`), r = p.forwardRef((e, s) => { const { asChild: a, ...m } = e, n = a ? o : i; return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u.jsx(n, { ...m, ref: s }); }); return r.displayName = `Primitive.${i}`, { ...t, [i]: r }; }, {}); function w(t, i) { t && f.flushSync(() => t.dispatchEvent(i)); } export { h as P, w as d };