UNPKG

dgz-ui

Version:

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

68 lines (67 loc) 1.61 kB
import { jsx as s } from "react/jsx-runtime"; import * as l from "react"; import "react-dom"; import { c as v } from "./index-DvGm4EwH.es.js"; import { c as u } from "./utils-CnvKSirc.es.js"; var N = [ "a", "button", "div", "form", "h2", "h3", "img", "input", "label", "li", "nav", "ol", "p", "select", "span", "svg", "ul" ], h = N.reduce((o, r) => { const a = v(`Primitive.${r}`), i = l.forwardRef((t, e) => { const { asChild: p, ...n } = t, f = p ? a : r; return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ s(f, { ...n, ref: e }); }); return i.displayName = `Primitive.${r}`, { ...o, [r]: i }; }, {}), w = "Separator", m = "horizontal", S = ["horizontal", "vertical"], c = l.forwardRef((o, r) => { const { decorative: a, orientation: i = m, ...t } = o, e = O(i) ? i : m, n = a ? { role: "none" } : { "aria-orientation": e === "vertical" ? e : void 0, role: "separator" }; return /* @__PURE__ */ s( h.div, { "data-orientation": e, ...n, ...t, ref: r } ); }); c.displayName = w; function O(o) { return S.includes(o); } var d = c; const P = l.forwardRef( ({ className: o, orientation: r = "horizontal", decorative: a = !0, ...i }, t) => /* @__PURE__ */ s( d, { ref: t, decorative: a, orientation: r, className: u( "bg-border shrink-0", r === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", o ), ...i } ) ); P.displayName = d.displayName; export { P as S }; //# sourceMappingURL=separator-CgP4OHOF.es.js.map