geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
126 lines (125 loc) • 4.98 kB
JavaScript
import * as e from "react";
import * as t from "@radix-ui/react-dropdown-menu";
import { ChevronRight as l, Check as i, Circle as m } from "lucide-react";
import { cn as d } from "./index.es79.js";
const h = t.Root, E = t.Trigger, D = t.Group, M = t.Portal, R = t.Sub, c = e.forwardRef(({ className: o, inset: n, children: a, ...r }, s) => /* @__PURE__ */ e.createElement(
t.SubTrigger,
{
ref: s,
className: d(
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
n && "pl-8",
o
),
...r
},
a,
/* @__PURE__ */ e.createElement(l, { className: "w-4 h-4 ml-auto" })
));
c.displayName = t.SubTrigger.displayName;
const p = e.forwardRef(({ className: o, ...n }, a) => /* @__PURE__ */ e.createElement(
t.SubContent,
{
ref: a,
className: d(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
o
),
...n
}
));
p.displayName = t.SubContent.displayName;
const u = e.forwardRef(({ className: o, sideOffset: n = 4, ...a }, r) => /* @__PURE__ */ e.createElement(t.Portal, { container: a?.container }, /* @__PURE__ */ e.createElement(
t.Content,
{
ref: r,
sideOffset: n,
className: d(
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
o
),
...a
}
)));
u.displayName = t.Content.displayName;
const f = e.forwardRef(({ className: o, inset: n, ...a }, r) => /* @__PURE__ */ e.createElement(
t.Item,
{
ref: r,
className: d(
"relative flex select-none items-center rounded-md outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:opacity-50 cursor-pointer data-[disabled]:cursor-not-allowed",
n && "pl-8",
o
),
...a
}
));
f.displayName = t.Item.displayName;
const b = e.forwardRef(({ className: o, children: n, checked: a, ...r }, s) => /* @__PURE__ */ e.createElement(
t.CheckboxItem,
{
ref: s,
className: d(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
o
),
checked: a,
disabled: !0,
...r
},
/* @__PURE__ */ e.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ e.createElement(t.ItemIndicator, null, /* @__PURE__ */ e.createElement(i, { className: "w-4 h-4" }))),
n
));
b.displayName = t.CheckboxItem.displayName;
const w = e.forwardRef(({ className: o, children: n, ...a }, r) => /* @__PURE__ */ e.createElement(
t.RadioItem,
{
ref: r,
className: d(
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
o
),
...a
},
/* @__PURE__ */ e.createElement("span", { className: "absolute left-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ e.createElement(t.ItemIndicator, null, /* @__PURE__ */ e.createElement(m, { className: "w-2 h-2 fill-current" }))),
n
));
w.displayName = t.RadioItem.displayName;
const g = e.forwardRef(({ className: o, inset: n, ...a }, r) => /* @__PURE__ */ e.createElement(
t.Label,
{
ref: r,
className: d(
"px-2 py-1.5 text-sm font-semibold",
n && "pl-8",
o
),
...a
}
));
g.displayName = t.Label.displayName;
const N = e.forwardRef(({ className: o, ...n }, a) => /* @__PURE__ */ e.createElement(
t.Separator,
{
ref: a,
className: d("-mx-1 my-1 h-px bg-muted", o),
...n
}
));
N.displayName = t.Separator.displayName;
export {
h as DropdownMenu,
b as DropdownMenuCheckboxItem,
u as DropdownMenuContent,
D as DropdownMenuGroup,
f as DropdownMenuItem,
g as DropdownMenuLabel,
M as DropdownMenuPortal,
w as DropdownMenuRadioItem,
N as DropdownMenuSeparator,
R as DropdownMenuSub,
p as DropdownMenuSubContent,
c as DropdownMenuSubTrigger,
E as DropdownMenuTrigger
};
//# sourceMappingURL=index.es110.js.map