@anoki/fse-ui
Version:
FSE UI components library
3 lines (2 loc) • 2.39 kB
JavaScript
;Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require('./sections/Services/Services.css');const s=require("./index.cjs180.js"),i=require("./index.cjs46.js"),j=require("./index.cjs182.js");;/* empty css */const E=require("react"),t=require("./index.cjs184.js"),v=require("./index.cjs10.js"),R=require("./index.cjs35.js"),S=require("./index.cjs26.js"),r={LayoutOne:"LayoutOne",LayoutTwo:"LayoutTwo",LayoutThree:"LayoutThree",LayoutFour:"LayoutFour"},g=({title:l,description:x,goToLabel:d,href:y,asLink:L="a",items:o,layout:n=r.LayoutOne,className:p})=>{const h=(e=>{switch(e){case r.LayoutOne:return"ui-service-items-layout-one";case r.LayoutTwo:return"ui-service-items-layout-two";case r.LayoutThree:return"ui-service-items-layout-three";case r.LayoutFour:return"ui-service-items-layout-four";default:return""}})(n),a=E.useMemo(()=>{switch(n){case r.LayoutOne:return o.map(e=>({...t.lodashExports.omit(e,["image"])}));case r.LayoutTwo:return o.map((e,u)=>{const c=u!==1;return{...t.lodashExports.omit(e,c?["image"]:[])}});case r.LayoutThree:return o.map(e=>({...t.lodashExports.omit(e,["image"])}));case r.LayoutFour:return o.map((e,u)=>{const c=u!==0;return{...t.lodashExports.omit(e,c?["image"]:[])}});default:return o}},[o,n]);return s.jsxRuntimeExports.jsxs(i.Section,{className:j.clsx("base-col ui-service-items-section",p),children:[s.jsxRuntimeExports.jsxs(v.Col,{className:"ui-service-items-sectirron-content",children:[s.jsxRuntimeExports.jsxs("div",{className:"ui-service-items-section-title",children:[s.jsxRuntimeExports.jsx(i.Section.Title,{fs:"2",mdFs:"2",as:"h3",color:"slate-20",children:l}),d&&y&&s.jsxRuntimeExports.jsx(R.ArrowLink,{href:y,asLink:L,fs:"7",children:d.toUpperCase()})]}),x&&s.jsxRuntimeExports.jsx(i.Section.Description,{children:x})]}),s.jsxRuntimeExports.jsx("ul",{role:"list","aria-label":`Lista di ${l}`,className:`list-style-none ${h}`,children:a==null?void 0:a.map(e=>s.jsxRuntimeExports.jsx("li",{children:s.jsxRuntimeExports.jsx(S.CardCategory,{title:e==null?void 0:e.name,description:e==null?void 0:e.description,image:e==null?void 0:e.image,href:(e==null?void 0:e.link)||(e==null?void 0:e.externalLink),showIcon:e==null?void 0:e.externalLink,asLink:L,isExternal:e==null?void 0:e.externalLink},e._id)},e._id))})]})};exports.SERVICES_LAYOUTS=r;exports.Services=g;
//# sourceMappingURL=index.cjs108.js.map