UNPKG

dgz-ui

Version:

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

77 lines (76 loc) 2.07 kB
import { jsx as a } from "react/jsx-runtime"; import { S as n } from "./index-DvGm4EwH.es.js"; import { c as s } from "./index-xA4mlFw5.es.js"; import { c as e } from "./utils-CnvKSirc.es.js"; import { S as i } from "./separator-CgP4OHOF.es.js"; const l = s( "flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1", { variants: { orientation: { horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none", vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none" } }, defaultVariants: { orientation: "horizontal" } } ); function b({ className: r, orientation: t, ...o }) { return /* @__PURE__ */ a( "div", { role: "group", "data-slot": "button-group", "data-orientation": t, className: e(l({ orientation: t }), r), ...o } ); } function g({ className: r, asChild: t = !1, ...o }) { return /* @__PURE__ */ a( t ? n : "div", { className: e( "flex items-center gap-2 rounded-md border border-neutral-200 bg-neutral-100 px-4 text-sm font-medium shadow-xs dark:border-neutral-800 dark:bg-neutral-800 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", r ), ...o } ); } function h({ className: r, orientation: t = "vertical", ...o }) { return /* @__PURE__ */ a( i, { "data-slot": "button-group-separator", orientation: t, className: e( "relative !m-0 self-stretch bg-neutral-200 data-[orientation=vertical]:h-auto dark:bg-neutral-800", r ), ...o } ); } export { b as B, h as a, g as b, l as c }; //# sourceMappingURL=button-group-B4h4-5eB.es.js.map