geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
40 lines (39 loc) • 2.06 kB
JavaScript
import { X as s, Type as n, Sticker as c, Shapes as m } from "lucide-react";
import e from "react";
import { cn as i } from "./index88.es.js";
function o(t) {
return t === "text" ? /* @__PURE__ */ e.createElement(n, { className: "h-3.5 w-3.5 shrink-0 text-light-4" }) : t === "sticker" ? /* @__PURE__ */ e.createElement(c, { className: "h-3.5 w-3.5 shrink-0 text-light-4" }) : /* @__PURE__ */ e.createElement(m, { className: "h-3.5 w-3.5 shrink-0 text-light-4" });
}
function h({ ui: t, engine: a }) {
return /* @__PURE__ */ e.createElement("div", null, /* @__PURE__ */ e.createElement("div", { className: "my-3.5 h-px bg-neutral-1" }), /* @__PURE__ */ e.createElement("div", { className: "mb-2 flex items-center justify-between text-xs text-light-4" }, /* @__PURE__ */ e.createElement("span", null, "Layers"), /* @__PURE__ */ e.createElement("span", null, t.layers.length || "")), t.layers.length ? /* @__PURE__ */ e.createElement("div", { className: "flex flex-col gap-1.5" }, [...t.layers].reverse().map((r) => /* @__PURE__ */ e.createElement(
"div",
{
key: r.id,
className: i(
"flex items-center gap-2 rounded-lg border border-neutral-1 bg-white px-2.5 py-1.5 text-xs cursor-pointer",
t.selected?.id === r.id && "border-rest-p1 ring-1 ring-rest-p1"
),
onClick: () => {
t.mode !== "select" && a.setMode("select"), a.selectLayer(r.id);
}
},
o(r.type),
/* @__PURE__ */ e.createElement("span", { className: "flex-1 truncate" }, r.name),
/* @__PURE__ */ e.createElement(
"button",
{
type: "button",
title: "Delete",
onClick: (l) => {
l.stopPropagation(), a.deleteLayer(r.id);
},
className: "text-light-4 hover:text-danger-1"
},
/* @__PURE__ */ e.createElement(s, { className: "h-3.5 w-3.5" })
)
))) : /* @__PURE__ */ e.createElement("p", { className: "text-xs italic text-light-4" }, "No layers yet. Use Text, Draw, or Shape."));
}
export {
h as LayersList
};
//# sourceMappingURL=index167.es.js.map