UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 2.38 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/DelegateCard/DelegateCard.css');const e=require("./index.cjs180.js");;/* empty css */const f=require("react"),c=require("./index.cjs219.js"),t=require("./index.cjs9.js"),n=require("./index.cjs10.js"),w=({id:i,isSelected:x,title:d,subtitle:u,region:o,relation:r,isMe:s=!1,showRegion:l=!1,setSelectedCard:j=()=>{},className:p})=>{const m=f.useRef(null),h=a=>a.charAt(0).toUpperCase()+a.slice(1),R=()=>e.jsxRuntimeExports.jsx("svg",{width:"14",height:"14",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:e.jsxRuntimeExports.jsx("path",{d:"M10 3L4.5 8.5L2 6",stroke:"white",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})});return e.jsxRuntimeExports.jsxs(t.Row,{br:"x4",p:"x24",gap:"x16",bg:"white",text:"slate-20",ref:m,className:`${p} ${x?"ui-is-active":""} ui-card-delegate shadow cursor-pointer`,onClick:()=>{j(i)},style:{width:"100%"},children:[e.jsxRuntimeExports.jsx(c.Root,{id:i,checked:x,className:"ui-checkbox-filter",children:e.jsxRuntimeExports.jsx(c.Indicator,{children:e.jsxRuntimeExports.jsx(R,{})})}),e.jsxRuntimeExports.jsxs(t.Row,{alignItems:"flex-start",style:{width:"100%"},justifyContent:"space-between",children:[e.jsxRuntimeExports.jsxs(n.Col,{style:{flex:1},justifyContent:"center",className:"w-full",children:[e.jsxRuntimeExports.jsxs(n.Col,{gap:"x4",pb:(s||!s&&!r)&&!l?void 0:"x16",children:[e.jsxRuntimeExports.jsx("h3",{className:"flex-1 text-decoration-none fs-4 fw-semibold",children:d}),e.jsxRuntimeExports.jsx("p",{className:"fs-6 fw-normal text-slate-28",children:u})]}),e.jsxRuntimeExports.jsxs(t.Row,{gap:"x40",justifyContent:"space-between",children:[!s&&r&&e.jsxRuntimeExports.jsxs(n.Col,{gap:"x4",children:[e.jsxRuntimeExports.jsx("div",{className:"fw-bold",children:"Relazione con il delegante"}),e.jsxRuntimeExports.jsx("p",{className:"fw-normal",children:r})]}),l&&o&&e.jsxRuntimeExports.jsxs(n.Col,{pr:"x104",gap:"x4",children:[e.jsxRuntimeExports.jsx("div",{className:"fw-bold",children:"Regione di assistenza"}),e.jsxRuntimeExports.jsx("p",{className:"fw-normal",children:h(o)})]})]})]}),s&&e.jsxRuntimeExports.jsx(t.Row,{className:"ui-fascicolo-label",children:"IL TUO FASCICOLO"})]})]})};exports.DelegateCard=w; //# sourceMappingURL=index.cjs98.js.map