geoiq-frontend-ui-kit
Version:
This project is a UI kit for GeoIQ's frontend. It's built with React, TypeScript, and Vite.
67 lines (66 loc) • 3.11 kB
JavaScript
import e from "react";
import { StarScore as h } from "./index.es45.js";
import { Badge as c } from "./index.es6.js";
import { Typography as i } from "./index.es17.js";
import { Skeleton as t } from "./index.es12.js";
import { hoverDetailCardStyles as g } from "./index.es143.js";
function b({
title: o,
icon: n,
isLoading: l = !1,
tags: d = [],
description: u,
score: r,
badge: m,
actions: s
}) {
return /* @__PURE__ */ e.createElement("div", { className: "w-[396px] border border-neutral-1 rounded-xl overflow-hidden bg-light-1" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center gap-3 p-4" }, /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-center w-12 h-12 overflow-hidden rounded-full bg-light-3" }, l ? /* @__PURE__ */ e.createElement(t, { className: "w-12 h-12 rounded-full bg-light-4" }) : /* @__PURE__ */ e.createElement(
"img",
{
src: n || "https://frontend-static-files.geoiq.io/strapi/map_pin_ed26828f00.svg",
alt: "title",
className: g.img({ hasIcon: !!n })
}
)), /* @__PURE__ */ e.createElement("div", { className: "truncate max-w-[300px]" }, l ? /* @__PURE__ */ e.createElement(t, { className: "h-5 mb-2 w-[280px] bg-light-4 rounded-full" }) : /* @__PURE__ */ e.createElement(i, { variant: "h3", className: "truncate text-light-2" }, o), /* @__PURE__ */ e.createElement("div", { className: "flex flex-wrap gap-2" }, l ? /* @__PURE__ */ e.createElement(
t,
{
key: "header-badge",
className: "w-20 h-6 mb-1 rounded-full bg-light-4"
}
) : d.filter((a) => a.icon_url && a.name).map((a, f) => /* @__PURE__ */ e.createElement(
c,
{
key: f,
variant: "default",
showBorder: !0,
size: "sm",
className: "rounded-full pl-1.5 pr-3"
},
/* @__PURE__ */ e.createElement(
"img",
{
src: a.icon_url,
alt: "icon",
className: "w-3 rounded-full"
}
),
a.name
))))), /* @__PURE__ */ e.createElement("div", { className: "px-4" }, /* @__PURE__ */ e.createElement("div", { className: "mb-2" }, l ? /* @__PURE__ */ e.createElement(t, { className: "w-full h-10 bg-light-4 rounded-xl" }) : /* @__PURE__ */ e.createElement(
i,
{
variant: "body4",
className: "text-light-3 text-overflow: ellipsis"
},
u
)), (r || m) && /* @__PURE__ */ e.createElement("div", { className: "flex justify-between mb-4" }, l ? /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(t, { className: "w-24 h-5 rounded bg-light-4" }), /* @__PURE__ */ e.createElement(t, { className: "w-24 h-5 rounded bg-light-4" })) : /* @__PURE__ */ e.createElement(e.Fragment, null, r && /* @__PURE__ */ e.createElement(
h,
{
score: r?.value,
isLoading: r?.isLoading
}
), m && /* @__PURE__ */ e.createElement(c, { variant: "select", size: "sm", showBorder: !0 }, m)))), s && /* @__PURE__ */ e.createElement("div", { className: "flex items-center justify-center bg-light-3" }, s));
}
export {
b as PointHoverCard
};
//# sourceMappingURL=index.es124.js.map