geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
108 lines (107 loc) • 3.78 kB
JavaScript
import * as e from "react";
import { Command as m, useCommandState as s } from "cmdk";
import { Search as p } from "lucide-react";
import { cn as d } from "./index.es79.js";
import { Dialog as c, DialogContent as i } from "./index.es75.js";
const n = e.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e.createElement(
m,
{
ref: r,
className: d(
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
t
),
...a
}
));
n.displayName = m.displayName;
const E = ({ children: t, ...a }) => /* @__PURE__ */ e.createElement(c, { ...a }, /* @__PURE__ */ e.createElement(i, { className: "p-0 overflow-hidden shadow-lg" }, /* @__PURE__ */ e.createElement(n, { className: "[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5" }, t))), u = e.forwardRef(({ className: t, showIcon: a = !0, ...r }, o) => /* @__PURE__ */ e.createElement("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "" }, a && /* @__PURE__ */ e.createElement(p, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }), /* @__PURE__ */ e.createElement(
m.Input,
{
ref: o,
className: d(
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
t
),
...r
}
)));
u.displayName = m.Input.displayName;
const f = e.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e.createElement(
m.List,
{
ref: r,
className: d("max-h-[300px] overflow-y-auto overflow-x-hidden", t),
...a
}
));
f.displayName = m.List.displayName;
const g = e.forwardRef(({ className: t, ...a }, r) => s((l) => l.filtered.count === 0) ? /* @__PURE__ */ e.createElement(
"div",
{
ref: r,
className: d("py-6 text-sm text-center", t),
...a
}
) : null);
g.displayName = m.Empty.displayName;
const x = e.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e.createElement(
m.Group,
{
ref: r,
className: d(
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
t
),
...a
}
));
x.displayName = m.Group.displayName;
const h = e.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e.createElement(
m.Separator,
{
ref: r,
className: d("-mx-1 h-px bg-border", t),
...a
}
));
h.displayName = m.Separator.displayName;
const N = e.forwardRef(({ className: t, ...a }, r) => /* @__PURE__ */ e.createElement(
m.Item,
{
ref: r,
disabled: a.disabled ?? !1,
className: d(
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-light-2 aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled=true]:opacity-50",
t
),
...a
}
));
N.displayName = m.Item.displayName;
const y = ({
className: t,
...a
}) => /* @__PURE__ */ e.createElement(
"span",
{
className: d(
"ml-auto text-xs tracking-widest text-muted-foreground",
t
),
...a
}
);
y.displayName = "CommandShortcut";
export {
n as Command,
E as CommandDialog,
g as CommandEmpty,
x as CommandGroup,
u as CommandInput,
N as CommandItem,
f as CommandList,
h as CommandSeparator,
y as CommandShortcut
};
//# sourceMappingURL=index.es52.js.map