UNPKG

@anoki/fse-ui

Version:

FSE UI components library

3 lines (2 loc) 2.25 kB
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./components/ui/DelegateCard/DelegateCard.css');const e=require("./index.cjs244.js");;/* empty css */const w=require("react"),a=require("./index.cjs306.js"),i=require("./index.cjs9.js"),g=require("./index.cjs213.js"),s=require("./index.cjs10.js"),C=({id:x,isSelected:n,title:d,subtitle:u,region:l,relation:r,isMe:t=!1,showRegion:o=!1,setSelectedCard:j=()=>{},className:p,labelRelation:m="Relazione con il delegante",labelRegion:h="Regione di assistenza",labelRecord:R="IL TUO FASCICOLO"})=>{const f=w.useRef(null),E=c=>c.charAt(0).toUpperCase()+c.slice(1);return e.jsxRuntimeExports.jsxs(i.Row,{br:"x4",p:"x24",gap:"x16",bg:"white",text:"slate-20",ref:f,className:`${p} ${n?"ui-is-active":""} ui-card-delegate shadow cursor-pointer`,onClick:()=>{j(x)},style:{width:"100%"},children:[e.jsxRuntimeExports.jsx("div",{className:"mt-x4",children:e.jsxRuntimeExports.jsx(a.Root,{id:x,checked:n,className:"ui-checkbox-filter",children:e.jsxRuntimeExports.jsx(a.Indicator,{children:e.jsxRuntimeExports.jsx(g.CheckIcon,{width:14,height:14,color:"white"})})})}),e.jsxRuntimeExports.jsx(i.Row,{alignItems:"flex-start",style:{width:"100%"},justifyContent:"space-between",children:e.jsxRuntimeExports.jsxs(s.Col,{style:{flex:1},justifyContent:"center",className:"w-full",children:[e.jsxRuntimeExports.jsxs(s.Col,{gap:"x4",pb:(t||!t&&!r)&&!o?void 0:"x16",children:[e.jsxRuntimeExports.jsx("h3",{className:"flex-1 text-decoration-none fs-4 md-fs-3 fw-semibold",children:d}),e.jsxRuntimeExports.jsx("p",{className:"fs-6 fw-normal text-slate-28",children:u})]}),e.jsxRuntimeExports.jsxs(s.Col,{gap:"x24",className:"delegate-row-responsive",children:[!t&&r&&e.jsxRuntimeExports.jsxs(s.Col,{gap:"x4",children:[e.jsxRuntimeExports.jsx("div",{className:"fw-bold",children:m}),e.jsxRuntimeExports.jsx("p",{children:r})]}),o&&l&&e.jsxRuntimeExports.jsxs(s.Col,{pr:"x104",gap:"x4",children:[e.jsxRuntimeExports.jsx("div",{className:"fw-bold",children:h}),e.jsxRuntimeExports.jsx("p",{children:E(l)})]})]}),t&&e.jsxRuntimeExports.jsx(i.Row,{className:"ui-fascicolo-label fs-7 fw-semibold",children:R})]})})]})};exports.DelegateCard=C; //# sourceMappingURL=index.cjs108.js.map