geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
121 lines (120 loc) • 4.29 kB
JavaScript
import { Trash2 as c } from "lucide-react";
import e from "react";
import { Button as m } from "./index9.es.js";
import { Textarea as o } from "./index16.es.js";
import { Slider as n } from "./index30.es.js";
import { SingleSelect as s } from "./index29.es.js";
import { FONTS as i } from "./index150.es.js";
import { ColorPicker as x } from "./index180.es.js";
import { useImageEditorPortalContainer as p } from "./index145.es.js";
const u = [
{ label: "Outline only", value: "stroke" },
{ label: "Solid fill", value: "fill" }
];
function C({ selected: t, engine: a }) {
const r = p();
return /* @__PURE__ */ e.createElement("div", null, t.type === "text" && /* @__PURE__ */ e.createElement("div", { className: "mb-3.5" }, /* @__PURE__ */ e.createElement("span", { className: "mb-1 block text-xs text-light-4" }, "Text"), /* @__PURE__ */ e.createElement(
o,
{
className: "min-h-[52px]",
value: t.text ?? "",
onChange: (l) => a.setSelectedText(l.target.value)
}
), /* @__PURE__ */ e.createElement("span", { className: "mb-1 mt-2.5 block text-xs text-light-4" }, "Font"), /* @__PURE__ */ e.createElement(
s,
{
items: i,
value: t.font ?? "",
onValueChange: a.setSelectedFont,
container: r
}
), /* @__PURE__ */ e.createElement("div", { className: "mb-1 mt-2.5 flex justify-between text-xs text-light-4" }, /* @__PURE__ */ e.createElement("span", null, "Size"), /* @__PURE__ */ e.createElement("span", null, t.size, "px")), /* @__PURE__ */ e.createElement(
n,
{
min: 10,
max: 240,
step: 1,
value: [t.size ?? 24],
onValueChange: ([l]) => a.setSelectedTextSize(l)
}
), /* @__PURE__ */ e.createElement("div", { className: "mb-1 mt-2.5 flex justify-between text-xs text-light-4" }, /* @__PURE__ */ e.createElement("span", null, "Box size"), /* @__PURE__ */ e.createElement("span", null, t.boxWidth, "px")), /* @__PURE__ */ e.createElement(
n,
{
min: 20,
max: 2e3,
step: 1,
value: [t.boxWidth ?? 200],
onValueChange: ([l]) => a.setSelectedBoxWidth(l)
}
)), t.type === "shape" && /* @__PURE__ */ e.createElement("div", { className: "mb-3.5" }, /* @__PURE__ */ e.createElement("span", { className: "mb-1 block text-xs text-light-4" }, "Fill style"), /* @__PURE__ */ e.createElement(
s,
{
items: u,
value: t.fill ?? "stroke",
onValueChange: (l) => a.setSelectedShapeFill(l),
container: r
}
), /* @__PURE__ */ e.createElement("span", { className: "mb-1 mt-2.5 block text-xs text-light-4" }, "Thickness"), /* @__PURE__ */ e.createElement(
n,
{
min: 1,
max: 40,
step: 1,
value: [t.width ?? 6],
onValueChange: ([l]) => a.setSelectedWidth(l)
}
)), t.type === "stroke" && /* @__PURE__ */ e.createElement("div", { className: "mb-3.5" }, /* @__PURE__ */ e.createElement("span", { className: "mb-1 block text-xs text-light-4" }, "Brush size"), /* @__PURE__ */ e.createElement(
n,
{
min: 1,
max: 60,
step: 1,
value: [t.width ?? 8],
onValueChange: ([l]) => a.setSelectedWidth(l)
}
)), t.type !== "sticker" && /* @__PURE__ */ e.createElement(
x,
{
value: t.color ?? "#d24b2f",
onChange: a.setSelectedColor
}
), /* @__PURE__ */ e.createElement("div", { className: "my-3.5 h-px bg-neutral-1" }), /* @__PURE__ */ e.createElement("div", { className: "flex flex-col gap-2" }, /* @__PURE__ */ e.createElement(
m,
{
variant: "secondary",
size: "sm",
onClick: a.bringSelectedToFront
},
"Bring to front"
), /* @__PURE__ */ e.createElement(
m,
{
variant: "secondary",
size: "sm",
onClick: a.sendSelectedToBack
},
"Send to back"
), /* @__PURE__ */ e.createElement(
m,
{
variant: "secondary",
size: "sm",
onClick: a.duplicateSelected
},
"Duplicate"
), /* @__PURE__ */ e.createElement(
m,
{
variant: "secondary",
size: "sm",
onClick: a.deleteSelected,
prefixIcon: /* @__PURE__ */ e.createElement(c, { className: "h-4 w-4" }),
className: "text-danger-1"
},
"Delete layer"
)));
}
export {
C as PanelSelected
};
//# sourceMappingURL=index171.es.js.map