UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 1.58 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/CardMapStructure/CardMap.css');const e=require("./index.cjs237.js");;/* empty css */const n=require("react"),o=require("./index.cjs61.js"),w=({id:l,title:u,titleTag:d="h2",href:x,description:m,isExternal:i=!1,asLink:f="a",className:p,plainAddress:a,setSelectedCard:j=()=>{},addressLabel:h="Indirizzo",addressLabelTitleTag:v="h3"})=>{const R=f,[s,c]=n.useState(!1),t=n.useRef(null);return n.useEffect(()=>{const r=g=>{t.current&&!t.current.contains(g.target)&&c(!1)};return s?document.addEventListener("mousedown",r):document.removeEventListener("mousedown",r),()=>{document.removeEventListener("mousedown",r)}},[s]),e.jsxRuntimeExports.jsxs(o.Col,{as:"div",justifyContent:"center",ref:t,br:"x4",p:"x24",bg:"white",className:`${p} ${s?"ui-is-active":"ui-card-search"} shadow cursor-pointer text-slate-28`,onClick:()=>{c(!0),j(l)},children:[e.jsxRuntimeExports.jsxs(o.Col,{pb:"x24",children:[e.jsxRuntimeExports.jsx(d,{className:"flex-1",children:e.jsxRuntimeExports.jsx(R,{className:"text-decoration-none fs-4 text-primary fw-semibold",href:x,target:i?"_blank":void 0,rel:i?"noreferrer noopener":void 0,children:u})}),e.jsxRuntimeExports.jsx("p",{className:"fs-6 fw-regular",children:m})]}),a&&e.jsxRuntimeExports.jsxs(o.Col,{as:"footer",gap:"x8",bg:"white",children:[e.jsxRuntimeExports.jsx(v,{className:"fw-semibold fs-6",children:h}),e.jsxRuntimeExports.jsx("p",{className:"fw-regular",children:a})]})]})};exports.CardMap=w; //# sourceMappingURL=index.cjs48.js.map