UNPKG

geoiq-frontend-ui-kit

Version:

This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.

117 lines (116 loc) 4.56 kB
import * as e from "react"; import { ChevronDownIcon as s, CheckIcon as i, ChevronUpIcon as p } from "lucide-react"; import * as t from "@radix-ui/react-select"; import { cn as o } from "./index.es79.js"; import { Typography as f } from "./index.es17.js"; const E = t.Group, S = t.Value, u = e.forwardRef(({ className: r, children: l, ...a }, n) => /* @__PURE__ */ e.createElement( t.Trigger, { ref: n, className: o( "data-[placeholder]:text-light-4 flex h-10 w-full items-center justify-between whitespace-nowrap rounded-lg border border-neutral-2 bg-transparent px-3 py-2 text-sm shadow-sm ring-offset-background focus:ring-4 focus:outline-none focus:ring-primary-1 focus:border-primary-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", r ), ...a }, l, /* @__PURE__ */ e.createElement(t.Icon, { asChild: !0 }, /* @__PURE__ */ e.createElement(s, { className: "h-4 w-4 opacity-50" })) )); u.displayName = t.Trigger.displayName; const c = e.forwardRef(({ className: r, ...l }, a) => /* @__PURE__ */ e.createElement( t.ScrollUpButton, { ref: a, className: o( "flex cursor-default items-center justify-center py-1", r ), ...l }, /* @__PURE__ */ e.createElement(p, null) )); c.displayName = t.ScrollUpButton.displayName; const d = e.forwardRef(({ className: r, ...l }, a) => /* @__PURE__ */ e.createElement( t.ScrollDownButton, { ref: a, className: o( "flex cursor-default items-center justify-center py-1", r ), ...l }, /* @__PURE__ */ e.createElement(s, null) )); d.displayName = t.ScrollDownButton.displayName; const y = e.forwardRef(({ className: r, children: l, position: a = "popper", ...n }, m) => /* @__PURE__ */ e.createElement(t.Portal, null, /* @__PURE__ */ e.createElement( t.Content, { ref: m, className: o( "relative z-50 max-h-96 min-w-[8rem] rounded-lg border bg-popover 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", a === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", r ), position: a, ...n }, /* @__PURE__ */ e.createElement(c, null), /* @__PURE__ */ e.createElement( t.Viewport, { datatype: "view", className: o( "py-1 overflow-y-scroll custom-scrollbar", a === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]" ) }, l ), /* @__PURE__ */ e.createElement(d, null) ))); y.displayName = t.Content.displayName; const g = e.forwardRef(({ className: r, ...l }, a) => /* @__PURE__ */ e.createElement( t.Label, { ref: a, className: o("px-2 py-1.5 text-sm font-semibold", r), ...l } )); g.displayName = t.Label.displayName; const h = e.forwardRef(({ className: r, children: l, ...a }, n) => /* @__PURE__ */ e.createElement("div", { className: "py-0.5 px-1.5 bg-white" }, /* @__PURE__ */ e.createElement( t.Item, { ref: n, className: o( "relative flex w-full p-2 mr-8 cursor-default items-center rounded-md text-sm outline-none hover:bg-light-2 focus:bg-light-2 focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[state=checked]:bg-light-2", r ), ...a }, /* @__PURE__ */ e.createElement("span", { className: "absolute right-2 flex h-3.5 w-3.5 items-center justify-center" }, /* @__PURE__ */ e.createElement(t.ItemIndicator, null, /* @__PURE__ */ e.createElement(i, { className: "h-5 w-5 stroke-brand" }))), /* @__PURE__ */ e.createElement(t.ItemText, null, /* @__PURE__ */ e.createElement(f, { variant: "body1" }, l)) ))); h.displayName = t.Item.displayName; const w = e.forwardRef(({ className: r, ...l }, a) => /* @__PURE__ */ e.createElement( t.Separator, { ref: a, className: o("-mx-1 my-1 h-px bg-muted", r), ...l } )); w.displayName = t.Separator.displayName; export { y as SelectContent, E as SelectGroup, h as SelectItem, g as SelectLabel, d as SelectScrollDownButton, c as SelectScrollUpButton, w as SelectSeparator, u as SelectTrigger, S as SelectValue }; //# sourceMappingURL=index.es81.js.map