@uniformdev/csk-components 6.0.121-alpha.1 → 6.1.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/accordion-item-G5CNMERW.mjs +1 -0
  2. package/dist/{banner-EYII7V7X.mjs → banner-2B4K5R4N.mjs} +1 -1
  3. package/dist/carousel-BBEW5P4Y.mjs +1 -0
  4. package/dist/carousel-ERCHOWUS.mjs +1 -0
  5. package/dist/chunk-2SEOCBRK.mjs +1 -0
  6. package/dist/{chunk-TFA6HYP4.mjs → chunk-3PDY7RJC.mjs} +2 -2
  7. package/dist/chunk-4LWAGTFW.mjs +1 -0
  8. package/dist/chunk-5VM2Y55L.mjs +1 -0
  9. package/dist/chunk-AKRWCDDG.mjs +1 -0
  10. package/dist/{chunk-VW2XC3SE.mjs → chunk-FPOIJMYT.mjs} +1 -1
  11. package/dist/{chunk-B2O55EVA.mjs → chunk-LA36HQWS.mjs} +1 -1
  12. package/dist/chunk-M3BGP5VE.mjs +1 -0
  13. package/dist/chunk-QHIWJPL6.mjs +1 -0
  14. package/dist/chunk-TIRCISSU.mjs +1 -0
  15. package/dist/chunk-TM7Q5NMH.mjs +1 -0
  16. package/dist/chunk-YUCUJWBO.mjs +1 -0
  17. package/dist/chunk-Z7JSWSPD.mjs +1 -0
  18. package/dist/components/canvas/emptyPlaceholders.mjs +1 -1
  19. package/dist/components/canvas/index.d.mts +21 -5
  20. package/dist/components/canvas/index.mjs +2 -2
  21. package/dist/components/ui/index.d.mts +25 -61
  22. package/dist/components/ui/index.mjs +1 -1
  23. package/dist/content/components/canvas/Accordion/accordion.tsx +12 -6
  24. package/dist/content/components/canvas/AccordionItem/accordion-item.tsx +36 -23
  25. package/dist/content/components/canvas/Button/index.tsx +2 -1
  26. package/dist/content/components/canvas/Card/card.tsx +3 -1
  27. package/dist/content/components/canvas/Carousel/carousel.tsx +3 -1
  28. package/dist/content/components/canvas/Container/container.tsx +4 -0
  29. package/dist/content/components/canvas/Container/parameters.ts +4 -0
  30. package/dist/content/components/canvas/DemoHero/atoms.tsx +4 -31
  31. package/dist/content/components/canvas/DemoHero/columns-variant.tsx +7 -1
  32. package/dist/content/components/canvas/DemoHero/default-variant.tsx +8 -1
  33. package/dist/content/components/canvas/DemoHero/demo-hero.tsx +4 -2
  34. package/dist/content/components/canvas/DemoHero/fixed-hero.tsx +65 -56
  35. package/dist/content/components/canvas/DemoHero/index.tsx +14 -3
  36. package/dist/content/components/canvas/DemoHero/utils.ts +0 -14
  37. package/dist/content/components/canvas/Flex/flex.tsx +4 -2
  38. package/dist/content/components/canvas/Grid/grid.tsx +3 -1
  39. package/dist/content/components/canvas/Image/image.tsx +2 -13
  40. package/dist/content/components/canvas/Image/placeholder.tsx +20 -0
  41. package/dist/content/components/canvas/ImageGallery/image-gallery.tsx +3 -1
  42. package/dist/content/components/canvas/Modal/modal.tsx +69 -12
  43. package/dist/content/components/{ui → canvas}/Modal/style-utils.ts +4 -4
  44. package/dist/content/components/canvas/Review/default-variant.tsx +3 -1
  45. package/dist/content/components/canvas/Review/multi-column-variant.tsx +3 -1
  46. package/dist/content/components/canvas/Section/columns-variant.tsx +7 -1
  47. package/dist/content/components/canvas/Section/default-variant.tsx +10 -1
  48. package/dist/content/components/canvas/Section/section.tsx +4 -0
  49. package/dist/content/components/canvas/Table/table.tsx +6 -1
  50. package/dist/content/components/canvas/Tabs/tabs.tsx +6 -1
  51. package/dist/content/components/canvas/Testimonial/default-variant.tsx +4 -2
  52. package/dist/content/components/canvas/Testimonial/testimonial.tsx +4 -0
  53. package/dist/content/components/canvas/Testimonial/with-large-avatar-variant.tsx +4 -2
  54. package/dist/content/components/canvas/Testimonial/with-overlapping-image-variant.tsx +4 -2
  55. package/dist/content/components/canvas/Video/index.tsx +2 -0
  56. package/dist/content/components/canvas/Video/video.tsx +2 -1
  57. package/dist/content/components/ui/Button/index.ts +5 -2
  58. package/dist/content/components/ui/Carousel/carousel.tsx +2 -2
  59. package/dist/content/components/ui/Carousel/index.ts +1 -1
  60. package/dist/content/components/ui/Container/container.tsx +7 -2
  61. package/dist/content/components/ui/Container/index.ts +6 -0
  62. package/dist/content/components/ui/Container/utils.ts +18 -0
  63. package/dist/content/components/ui/Flex/flex.tsx +27 -19
  64. package/dist/content/components/ui/Flex/index.ts +5 -1
  65. package/dist/content/components/ui/Footer/index.ts +1 -1
  66. package/dist/content/components/ui/Grid/grid.tsx +25 -19
  67. package/dist/content/components/ui/Grid/index.ts +16 -4
  68. package/dist/content/components/ui/GridItem/index.ts +10 -4
  69. package/dist/content/components/ui/Header/index.ts +1 -1
  70. package/dist/content/components/ui/Text/index.ts +6 -3
  71. package/dist/image-gallery-F6JLG7XW.mjs +1 -0
  72. package/dist/{index-D5cLtaIv.d.mts → index-B9eeSbLG.d.mts} +14 -7
  73. package/dist/index.mjs +1 -1
  74. package/dist/{mobile-JGZBHQC2.mjs → mobile-UAUHHXPH.mjs} +1 -1
  75. package/dist/modal-HKMQGV4B.mjs +1 -0
  76. package/dist/navigation-flyout-MXIJA6PC.mjs +1 -0
  77. package/dist/navigation-group-DEN3D2BO.mjs +1 -0
  78. package/dist/tabs-AQFKYC6M.mjs +1 -0
  79. package/package.json +10 -10
  80. package/dist/accordion-item-QAVKQEB2.mjs +0 -1
  81. package/dist/accordion-item-Y4PSNOH4.mjs +0 -1
  82. package/dist/carousel-RZ2DV6QX.mjs +0 -1
  83. package/dist/carousel-YELQRJVB.mjs +0 -1
  84. package/dist/chunk-2BMAPB63.mjs +0 -1
  85. package/dist/chunk-7GVG4HLE.mjs +0 -1
  86. package/dist/chunk-EOV2LPGC.mjs +0 -1
  87. package/dist/chunk-EUVKAE6M.mjs +0 -1
  88. package/dist/chunk-FIN5US3Q.mjs +0 -1
  89. package/dist/chunk-PMMAALCQ.mjs +0 -1
  90. package/dist/chunk-RYEXR67P.mjs +0 -1
  91. package/dist/chunk-TCQTXNKT.mjs +0 -1
  92. package/dist/chunk-WAW7PQYM.mjs +0 -1
  93. package/dist/chunk-YA5BXPZL.mjs +0 -1
  94. package/dist/content/components/ui/Accordion/accordion.tsx +0 -23
  95. package/dist/content/components/ui/Accordion/index.tsx +0 -9
  96. package/dist/content/components/ui/AccordionItem/accordion-item.tsx +0 -41
  97. package/dist/content/components/ui/AccordionItem/index.tsx +0 -16
  98. package/dist/content/components/ui/InlineSVG/index.ts +0 -13
  99. package/dist/content/components/ui/InlineSVG/inline-svg.tsx +0 -59
  100. package/dist/content/components/ui/InlineSVG/utils.ts +0 -77
  101. package/dist/content/components/ui/Modal/index.tsx +0 -22
  102. package/dist/content/components/ui/Modal/modal.tsx +0 -89
  103. package/dist/image-gallery-AMU6FS7N.mjs +0 -1
  104. package/dist/modal-43IHAVWB.mjs +0 -1
  105. package/dist/modal-5FNTFSTN.mjs +0 -1
  106. package/dist/navigation-flyout-NAU6O2WG.mjs +0 -1
  107. package/dist/navigation-group-QA65N6AI.mjs +0 -1
  108. package/dist/tabs-J23TEEQ7.mjs +0 -1
  109. /package/dist/content/components/{ui → canvas}/AccordionItem/icon-arrow-down.tsx +0 -0
  110. /package/dist/content/components/{ui → canvas}/AccordionItem/icon-arrow-up.tsx +0 -0
  111. /package/dist/content/components/{ui → canvas}/Modal/close-icon.tsx +0 -0
@@ -1 +0,0 @@
1
- import{a as be,c as Ne,e as we,f as Fe,g as Ee,h as Ae,i as O}from"./chunk-EOV2LPGC.mjs";import{a as Te}from"./chunk-WAW7PQYM.mjs";import{a as Z}from"./chunk-BK7UG4U4.mjs";import{a as c}from"./chunk-7GVG4HLE.mjs";import{a as Q}from"./chunk-2YTACEBA.mjs";import{a as l}from"./chunk-MSXDLSXH.mjs";import{c as Re}from"./chunk-RX4IAAQQ.mjs";import{c as p}from"./chunk-S7CSCIW4.mjs";import{UniformSlot as He}from"@uniformdev/canvas-next-rsc/component";import{jsx as j}from"react/jsx-runtime";var ho=({slots:e,component:o,context:t,backgroundColor:r,spacing:a,border:i,fluidContent:n,height:s})=>j(be,{accordionContent:j(He,{data:o,context:t,slot:e.accordionContent}),accordionItems:j(He,{data:o,context:t,slot:e.accordionItems}),backgroundColor:r,spacing:a,border:i,fluidContent:n,height:s});import{jsx as Le}from"react/jsx-runtime";var Ro=e=>{switch(e.slotName){case"accordionContent":return{component:()=>Le("div",{className:"h-20"})};case"accordionItems":return{component:()=>Le("div",{className:"h-28"})};default:return l}};var Ie=(t=>(t.AccordionContent="accordionContent",t.AccordionItems="accordionItems",t))(Ie||{});import{UniformSlot as Se}from"@uniformdev/canvas-next-rsc/component";import{jsx as No}from"react/jsx-runtime";var bo=e=>{switch(e.slotName){case"cardMedia":return{component:()=>null};case"cardContent":return{component:()=>No("div",{className:"h-20"})};default:return l}};var Ve=(o=>(o.BackgroundImage="backgroundImage",o))(Ve||{}),Be=(t=>(t.CardMedia="cardMedia",t.CardContent="cardContent",t))(Be||{});import{jsx as k,jsxs as wo}from"react/jsx-runtime";var To=({component:e,context:o,slots:t,backgroundColor:r,spacing:a,border:i,fluidContent:n,height:s,className:m,contentClassName:d})=>{let f=e.variant==="backgroundImage";return wo(c,{className:p("relative overflow-hidden",m),backgroundColor:r,spacing:a,border:i,fluidContent:n,height:s,children:[k("div",{className:p({"inset-0 size-full absolute":f}),children:k(Se,{data:e,context:o,slot:t.cardMedia})}),k("div",{className:p("relative flex flex-col gap-y-2",d),children:k(Se,{data:e,context:o,slot:t.cardContent})})]})};import Ao from"next/dynamic";import{jsx as Eo}from"react/jsx-runtime";var Fo=e=>{switch(e.slotName){case"carouselItems":return{component:()=>Eo("div",{className:"mx-20 h-20 w-full"})};default:return l}};var De=(o=>(o.Items="carouselItems",o))(De||{}),Or=Ao(()=>import("./carousel-YELQRJVB.mjs").then(e=>e.Carousel));import{UniformSlot as qe}from"@uniformdev/canvas-next-rsc/component";import{imageFrom as Ho}from"@uniformdev/assets";import{UniformText as Oe}from"@uniformdev/canvas-next-rsc/component";import{jsx as g}from"react/jsx-runtime";var M=({component:e,context:o,parameterId:t,text:r,...a})=>{let i=o.previewMode==="editor"&&o.isContextualEditing;return!r&&!i?null:g(Te,{...a,children:g(Oe,{placeholder:"Text goes here",parameterId:t,as:a.tag||void 0,component:e,context:o})})},ke=({component:e,context:o,parameterId:t,text:r,...a})=>{let{link:i,icon:n}=a,s=Re(i),m=o.previewMode==="editor"&&o.isContextualEditing;return!r&&!s&&!m?null:g(Ne,{...a,href:s,icon:g(()=>{let[f]=Q(n),{url:u,title:h=""}=f||{};return u?g(Z,{src:u,alt:h,width:20,height:20,containerStyle:{width:"20px",height:"20px"}}):void 0},{}),children:g(Oe,{placeholder:"Button text goes here",parameterId:t,component:e,context:o})})},Me=({component:e,context:o,image:t,objectFit:r,width:a,height:i,overlayColor:n,contrastBaseColor:s,overlayOpacity:m,border:d,priority:f,unoptimized:u,fill:h})=>{let[C]=Q(t);if(!C){let X=o.previewMode==="editor"&&o.isContextualEditing,J=e?._id?.includes("placeholder_");return!X||J||!e.variant?null:g("div",{style:{width:a?`${a}px`:"auto",height:i?`${i}px`:"auto"},children:g(we,{type:"image",placeholder:"Please add an asset to display an image"})})}let{focalPoint:$,title:V=""}=C,S=a||C.width,D=i||C.height;if(!h&&(!S||!D))return console.warn("No dimensions provided for the Next.js Image component. Falling back to a standard <img> tag for rendering."),g("img",{src:C.url,alt:V});let q=Ho(C?.url).transform({width:a,height:i,fit:r,focal:$}).url();return g(Z,{src:q,alt:V,unoptimized:u,priority:f,sizes:"100%",style:{objectFit:r},overlayColor:n,contrastBaseColor:s,overlayOpacity:m,border:d,...h?{fill:!0}:{width:S,height:D}})};import{jsx as T,jsxs as _e}from"react/jsx-runtime";var Ue=({backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,variant:i,demoHeroMedia:n,demoHeroContent:s,demoHeroCTA:m,textAlignmentClass:d,buttonAlignmentClass:f})=>T(c,{backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,children:_e("div",{className:p("grid grid-cols-1 items-center gap-4 px-4 lg:grid-cols-2 xl:px-0"),children:[T("div",{className:p("aspect-square",{"order-last":i==="columnsReverse"}),children:T("div",{className:"flex size-full items-center justify-center overflow-hidden",children:n})}),_e("div",{className:"flex flex-col justify-center gap-8",children:[T("div",{className:p("flex flex-col gap-4",d),children:s}),T("div",{className:p("flex flex-wrap gap-2 items-center",f),children:m})]})]})});import{jsx as te,jsxs as ze}from"react/jsx-runtime";var We=({backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,demoHeroMedia:i,demoHeroContent:n,demoHeroCTA:s,textAlignmentClass:m,buttonAlignmentClass:d})=>ze(c,{className:"relative overflow-hidden",backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,children:[te("div",{className:"absolute left-0 top-0 size-full overflow-hidden",children:i}),ze(c,{className:"relative flex flex-col gap-8",children:[te("div",{className:p("flex flex-col gap-4",m),children:n}),te("div",{className:p("flex flex-wrap gap-2 items-center",d),children:s})]})]});var Ye=({contentAlignment:e})=>p("justify-center",{"!justify-start":e==="left","!justify-end":e==="right"}),Ke=({contentAlignment:e})=>p("text-center",{"text-start":e==="left","text-end":e==="right"});var R=(e,o)=>Object.entries(e).reduce((t,[r,a])=>{if(r.startsWith(o)){let i=r.slice(o.length).replace(/^./,n=>n.toLowerCase());return{...t,[i]:a}}return{...t,[r]:a}},{});var $e=e=>{let o=e?608:void 0;return{imageFill:!e,...o?{imageWidth:o,imageHeight:o}:{}}};import{Fragment as oe,jsx as P,jsxs as Lo}from"react/jsx-runtime";var _=({eyebrowTitleText:e,eyebrowTitleTag:o,eyebrowTitleSize:t,eyebrowTitleColor:r,eyebrowTitleWeight:a,eyebrowTitleFont:i,eyebrowTitleAlignment:n,eyebrowTitleTransform:s,eyebrowTitleDecoration:m,eyebrowTitleLetterSpacing:d,eyebrowTitleLineCountRestrictions:f,titleText:u,titleTag:h,titleSize:C,titleColor:$,titleWeight:V,titleFont:S,titleAlignment:D,titleTransform:q,titleDecoration:ge,titleLetterSpacing:X,titleLineCountRestrictions:J,descriptionText:Ht,descriptionTag:Lt,descriptionSize:It,descriptionColor:Bt,descriptionWeight:Vt,descriptionFont:St,descriptionAlignment:Dt,descriptionTransform:Ot,descriptionDecoration:kt,descriptionLetterSpacing:Mt,descriptionLineCountRestrictions:_t,primaryButtonVariant:Ut,primaryButtonText:zt,primaryButtonLink:Wt,primaryButtonTextColor:Yt,primaryButtonTextWeight:Kt,primaryButtonTextFont:Gt,primaryButtonTextTransform:$t,primaryButtonButtonColor:qt,primaryButtonBorder:Xt,primaryButtonSize:Jt,primaryButtonIcon:Qt,primaryButtonTextSize:Zt,primaryButtonIconPosition:jt,primaryButtonHoverButtonColor:eo,primaryButtonHoverTextColor:to,image:oo,imageWidth:ro,imageHeight:ao,imageObjectFit:io,imageOverlayColor:no,imageContrastBaseColor:so,imageOverlayOpacity:mo,imageBorder:lo,imagePriority:po,imageUnoptimized:co,imageFill:fo,contentAlignment:Ce,backgroundColor:Po,spacing:uo,border:go,fluidContent:Co,height:xo,isFlexibleHero:xe=!1,component:x,context:v,slots:ve})=>{let ye=x.variant,vo=xe?P(qe,{data:x,context:v,slot:ve.flexibleHeroContent}):Lo(oe,{children:[P(M,{...R({eyebrowTitleText:e,eyebrowTitleTag:o,eyebrowTitleSize:t,eyebrowTitleColor:r,eyebrowTitleWeight:a,eyebrowTitleFont:i,eyebrowTitleAlignment:n,eyebrowTitleTransform:s,eyebrowTitleDecoration:m,eyebrowTitleLetterSpacing:d,eyebrowTitleLineCountRestrictions:f},"eyebrowTitle"),component:x,context:v,parameterId:"eyebrowTitleText"}),P(M,{...R({titleText:u,titleTag:h,titleSize:C,titleColor:$,titleWeight:V,titleFont:S,titleAlignment:D,titleTransform:q,titleDecoration:ge,titleLetterSpacing:X,titleLineCountRestrictions:J},"title"),component:x,context:v,parameterId:"titleText"}),P(M,{...R({descriptionText:Ht,descriptionTag:Lt,descriptionSize:It,descriptionColor:Bt,descriptionWeight:Vt,descriptionFont:St,descriptionAlignment:Dt,descriptionTransform:Ot,descriptionDecoration:kt,descriptionLetterSpacing:Mt,descriptionLineCountRestrictions:_t},"description"),component:x,context:v,parameterId:"descriptionText"})]}),yo=xe?P(qe,{data:x,context:v,slot:ve.flexibleHeroCta}):P(oe,{children:P(ke,{...R({primaryButtonVariant:Ut,primaryButtonText:zt,primaryButtonLink:Wt,primaryButtonTextColor:Yt,primaryButtonTextWeight:Kt,primaryButtonTextFont:Gt,primaryButtonTextTransform:$t,primaryButtonButtonColor:qt,primaryButtonBorder:Xt,primaryButtonSize:Jt,primaryButtonIcon:Qt,primaryButtonTextSize:Zt,primaryButtonIconPosition:jt,primaryButtonHoverButtonColor:eo,primaryButtonHoverTextColor:to},"primaryButton"),component:x,context:v,parameterId:"primaryButtonText"})}),he={variant:ye,backgroundColor:Po,spacing:uo,border:go,fluidContent:Co,height:xo,textAlignmentClass:Ke({contentAlignment:Ce}),buttonAlignmentClass:Ye({contentAlignment:Ce}),demoHeroMedia:P(oe,{children:P(Me,{image:oo,...R({imageWidth:ro,imageHeight:ao,imageObjectFit:io,imageOverlayColor:no,imageContrastBaseColor:so,imageOverlayOpacity:mo,imageBorder:lo,imagePriority:po,imageUnoptimized:co,imageFill:fo},"image"),component:x,context:v})}),demoHeroContent:vo,demoHeroCTA:yo};switch(ye){case"columns":case"columnsReverse":return P(Ue,{...he});default:return P(We,{...he})}};import{jsx as Io}from"react/jsx-runtime";var Xe=({textColor:e,overlayAutoTint:o,...t})=>Io(_,{...t,eyebrowTitleTag:"span",eyebrowTitleSize:{mobile:"xs",tablet:"lg",desktop:"xl"},eyebrowTitleWeight:"bold",eyebrowTitleTransform:"uppercase",eyebrowTitleColor:e||t.eyebrowTitleColor,titleSize:{mobile:"3xl",tablet:"4xl",desktop:"4xl"},titleWeight:"bold",titleColor:e||t.titleColor,descriptionTag:"p",descriptionSize:{mobile:"sm",tablet:"lg",desktop:"xl"},descriptionWeight:"normal",descriptionColor:e||t.descriptionColor,primaryButtonSize:"button-medium",primaryButtonTextSize:"sm",primaryButtonTextWeight:"normal",primaryButtonButtonColor:"button-primary",primaryButtonTextTransform:"uppercase",primaryButtonHoverButtonColor:"button-primary-hover",imagePriority:!0,imageObjectFit:"cover",imageUnoptimized:!0,imageContrastBaseColor:!t.component.variant&&o?e:void 0,imageOverlayOpacity:o,...$e(!!t.component.variant),spacing:{paddingTop:"container-xlarge",paddingLeft:"container-small",paddingRight:"container-small",paddingBottom:"container-xlarge"},fluidContent:!t.component.variant,isFlexibleHero:!1});import{jsx as Bo}from"react/jsx-runtime";var Je=e=>Bo(_,{...e,isFlexibleHero:!0});import{jsx as Qe}from"react/jsx-runtime";var Vo=e=>{switch(e.slotName){case"flexibleHeroContent":return{component:()=>Qe("div",{className:"h-20"})};case"flexibleHeroCta":return{component:()=>Qe("div",{className:"mx-40 h-20 w-full"})};default:return l}};var Ge=(r=>(r.Left="left",r.Center="center",r.Right="right",r))(Ge||{}),ee=(t=>(t.Columns="columns",t.ColumnsReverse="columnsReverse",t))(ee||{}),Ze=(t=>(t.FlexibleHeroContent="flexibleHeroContent",t.FlexibleHeroCta="flexibleHeroCta",t))(Ze||{}),So={FixedHero:Xe,FlexibleHero:Je},Oa=So;import{UniformSlot as re}from"@uniformdev/canvas-next-rsc/component";import{jsx as U}from"react/jsx-runtime";var je=({context:e,component:o,slots:t,backgroundColor:r,spacing:a,border:i,fluidContent:n})=>U(Fe,{logo:U(re,{context:e,slot:t.footerLogo,data:o}),copyright:U(re,{context:e,slot:t.footerCopyright,data:o}),content:U(re,{context:e,slot:t.footerContent,data:o}),backgroundColor:r,spacing:a,border:i,fluidContent:n});import{jsx as ae}from"react/jsx-runtime";var Do=e=>{switch(e.slotName){case"footerLogo":return{component:()=>ae("div",{className:"h-20 w-48"})};case"footerCopyright":return{component:()=>ae("div",{className:"h-20 w-48"})};case"footerContent":return{component:()=>ae("div",{className:"h-20 w-48"})};default:return l}};var et=(r=>(r.FooterLogo="footerLogo",r.FooterCopyright="footerCopyright",r.FooterContent="footerContent",r))(et||{}),Xa=je;import{UniformSlot as ie}from"@uniformdev/canvas-next-rsc/component";import{jsx as z}from"react/jsx-runtime";var tt=({backgroundColor:e,color:o,spacing:t,border:r,context:a,component:i,slots:n})=>z(Ee,{sticky:i.variant==="sticky",leftSection:z(ie,{context:a,slot:n.headerLeftContent,data:i}),rightSection:z(ie,{context:a,slot:n.headerRightContent,data:i}),backgroundColor:e,color:o,spacing:t,border:r,children:z(ie,{context:a,slot:n.headerCenterContent,data:i})});import{jsx as ne}from"react/jsx-runtime";var Oo=e=>{switch(e.slotName){case"headerLeftContent":return{component:()=>ne("div",{className:"h-20 w-48"})};case"headerCenterContent":return{component:()=>ne("div",{className:"h-20 w-full"})};case"headerRightContent":return{component:()=>ne("div",{className:"h-20 w-48"})};default:return l}};var rt=(r=>(r.HeaderLeftContent="headerLeftContent",r.HeaderCenterContent="headerCenterContent",r.HeaderRightContent="headerRightContent",r))(rt||{}),ot=(o=>(o.Sticky="sticky",o))(ot||{}),li=tt;import _o from"next/dynamic";import{jsx as Mo}from"react/jsx-runtime";var ko=e=>{switch(e.slotName){case"imageGalleryItems":return{component:()=>Mo("div",{className:" mx-auto size-48"})};default:return l}};var at=(o=>(o.Items="imageGalleryItems",o))(at||{}),Ci=_o(()=>import("./image-gallery-AMU6FS7N.mjs").then(e=>e.ImageGallery));import Wo from"next/dynamic";import{jsx as zo}from"react/jsx-runtime";var Uo=e=>{switch(e.slotName){case"trigger":return{component:()=>zo("div",{className:"h-20 w-full"})};default:return l}};var it=(r=>(r.Trigger="trigger",r.ModalContent="modalContent",r.ModalActions="modalActions",r))(it||{}),Ti=Wo(()=>import("./modal-43IHAVWB.mjs").then(e=>e.Modal));import Ko from"next/dynamic";import{jsx as nt}from"react/jsx-runtime";var Yo=e=>{switch(e.slotName){case"navigationFlyoutLeftContent":return{component:()=>nt("div",{className:"h-40 w-48"})};case"navigationFlyoutRightContent":return{component:()=>nt("div",{className:"h-40 w-48"})};default:return l}};var Vi=Ko(()=>import("./navigation-flyout-NAU6O2WG.mjs").then(e=>e.NavigationFlyout));import qo from"next/dynamic";import{jsx as $o}from"react/jsx-runtime";var Go=e=>{switch(e.slotName){case"links":return{component:()=>$o("div",{className:"h-40 w-48"})};default:return l}};var Wi=qo(()=>import("./navigation-group-QA65N6AI.mjs").then(e=>e.NavigationGroup));import{UniformSlot as se}from"@uniformdev/canvas-next-rsc/component";import{jsx as W}from"react/jsx-runtime";var Xo=({slots:e,component:o,context:t,backgroundColor:r,headerCustomRenderer:a,contentCustomRenderer:i,footerCustomRenderer:n})=>W(Ae,{backgroundColor:r,header:W(se,{context:t,slot:e.pageHeader,data:o,children:a}),footer:W(se,{context:t,slot:e.pageFooter,data:o,children:n}),children:W(se,{context:t,slot:e.pageContent,data:o,children:i})});import{jsx as me}from"react/jsx-runtime";var Jo=e=>{switch(e.slotName){case"pageHeader":return{component:()=>me("div",{className:"h-40"})};case"pageContent":return{component:()=>me("div",{className:"h-[calc(100vh-10rem*2)]"})};case"pageFooter":return{component:()=>me("div",{className:"h-40"})};default:return l}};var st=(r=>(r.PageContent="pageContent",r.PageHeader="pageHeader",r.PageFooter="pageFooter",r))(st||{});import{UniformSlot as pe}from"@uniformdev/canvas-next-rsc/component";import{jsx as w}from"react/jsx-runtime";var Qo=({parentComponent:e,slotName:o})=>{let t=e?.variant==="multiColumn";switch(o){case"reviewImage":return{component:()=>t?w("div",{className:"size-full"}):null};case"reviewPersonInfo":return{component:()=>t?w("div",{className:"h-20 w-full"}):w("div",{className:"h-20 w-52"})};case"reviewContent":return{component:()=>t?w("div",{className:"h-20 w-full"}):w("div",{className:"h-20 w-52"})};default:return l}};var le=(o=>(o.MultiColumn="multiColumn",o))(le||{}),mt=(r=>(r.ReviewImage="reviewImage",r.ReviewPersonInfo="reviewPersonInfo",r.ReviewContent="reviewContent",r))(mt||{});import{jsx as F,jsxs as lt}from"react/jsx-runtime";var pt=({stars:e,starsColor:o,activeStarsColor:t,showRatingLabel:r,backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,ReviewImage:d,ReviewPersonInfo:f,ReviewContent:u})=>F(c,{backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,children:lt("div",{className:"mx-auto flex lg:max-w-[60%]",children:[F("div",{className:"aspect-square size-12 shrink-0 rounded-full",children:d}),lt("div",{className:"ml-6",children:[f,F("div",{className:"py-4",children:F(O,{rating:e,showReviewLabel:r,starsColor:o,activeStarsColor:t})}),F("div",{className:"flex flex-col gap-y-5",children:u})]})]})});import{jsx as b,jsxs as dt}from"react/jsx-runtime";var ct=({stars:e,starsColor:o,activeStarsColor:t,showRatingLabel:r,backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,ReviewImage:d,ReviewPersonInfo:f,ReviewContent:u})=>b(c,{backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,children:dt("div",{className:"grid md:grid-cols-12",children:[dt("div",{className:"mb-2 md:col-span-4 md:my-0",children:[b("div",{className:"mb-2 aspect-square size-12 rounded-full",children:d}),b("div",{className:"flex flex-col gap-y-1",children:f})]}),b("div",{className:"my-2 md:col-span-4 md:my-0",children:b(O,{rating:e,showReviewLabel:r,starsColor:o,activeStarsColor:t})}),b("div",{className:"mt-2 flex flex-col gap-y-3 md:col-span-4 md:my-0",children:u})]})});import{jsx as E}from"react/jsx-runtime";var Zo=e=>{let{component:o,context:t,slots:r}=e,a=o.variant,i={...e,ReviewImage:E(pe,{context:t,data:o,slot:r.reviewImage}),ReviewPersonInfo:E(pe,{context:t,data:o,slot:r.reviewPersonInfo}),ReviewContent:E(pe,{context:t,data:o,slot:r.reviewContent})};switch(a){case"multiColumn":return E(ct,{...i});default:return E(pt,{...i})}};import{UniformSlot as Pe}from"@uniformdev/canvas-next-rsc/component";import{jsx as de}from"react/jsx-runtime";var jo=({parentComponent:e,slotName:o})=>{let t=!e?.variant;switch(o){case"sectionMedia":return{component:()=>t?null:de("div",{className:"size-full"})};case"sectionContent":return{component:()=>de("div",{className:"h-20"})};case"sectionCTA":return{component:()=>de("div",{className:"mx-40 h-20 w-full"})};default:return l}};var Pt=(r=>(r.Left="left",r.Center="center",r.Right="right",r))(Pt||{}),ce=(t=>(t.Columns="columns",t.ColumnsReverse="columnsReverse",t))(ce||{}),ft=(r=>(r.SectionContent="sectionContent",r.SectionMedia="sectionMedia",r.SectionCTA="sectionCTA",r))(ft||{});import{jsx as A,jsxs as ut}from"react/jsx-runtime";var gt=({backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,variant:i,sectionMedia:n,sectionContent:s,sectionCTA:m,textAlignmentClass:d,buttonAlignmentClass:f})=>A(c,{backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,children:ut("div",{className:p("grid grid-cols-1 items-center gap-4 px-4 lg:grid-cols-2 xl:px-0"),children:[A("div",{className:p("aspect-square",{"order-last":i==="columnsReverse"}),children:A("div",{className:"flex size-full items-center justify-center overflow-hidden",children:n})}),ut("div",{className:"flex flex-col justify-center gap-8",children:[A("div",{className:p("flex flex-col gap-4",d),children:s}),A("div",{className:p("flex flex-wrap gap-2",f),children:m})]})]})});import{jsx as fe,jsxs as Ct}from"react/jsx-runtime";var xt=({backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,sectionMedia:i,sectionContent:n,sectionCTA:s,textAlignmentClass:m,buttonAlignmentClass:d})=>Ct(c,{className:"relative overflow-hidden",backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,children:[fe("div",{className:"absolute left-0 top-0 size-full overflow-hidden",children:i}),Ct(c,{className:"relative flex flex-col gap-8",children:[fe("div",{className:p("flex flex-col gap-4",m),children:n}),fe("div",{className:p("flex flex-wrap gap-2",d),children:s})]})]});var vt=({contentAlignment:e})=>p("justify-center",{"!justify-start":e==="left","!justify-end":e==="right"}),yt=({contentAlignment:e})=>p("text-center",{"text-start":e==="left","text-end":e==="right"});import{jsx as H}from"react/jsx-runtime";var er=({contentAlignment:e,slots:o,component:t,context:r,backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m})=>{let d=t.variant,f={variant:d,backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,textAlignmentClass:yt({contentAlignment:e}),buttonAlignmentClass:vt({contentAlignment:e}),sectionMedia:H(Pe,{data:t,context:r,slot:o.sectionMedia}),sectionContent:H(Pe,{data:t,context:r,slot:o.sectionContent}),sectionCTA:H(Pe,{data:t,context:r,slot:o.sectionCTA})};switch(d){case"columns":case"columnsReverse":return H(gt,{...f});default:return H(xt,{...f})}};import{UniformSlot as Rt}from"@uniformdev/canvas-next-rsc/component";var ht=({size:e,textColor:o})=>p("text-left w-full [&_tr:not(:last-child)_td]:border-b [&_th]:border-b",{[`text-${o}`]:o,[`[&_td]:p-${e} [&_th]:p-${e}`]:e});import{jsx as N,jsxs as or}from"react/jsx-runtime";var tr=({size:e,textColor:o,slots:t,component:r,context:a,backgroundColor:i,spacing:n,border:s,fluidContent:m,height:d})=>N(c,{className:"flex flex-col gap-5",backgroundColor:i,spacing:n,border:s,fluidContent:m,height:d,children:N("div",{className:"overflow-x-auto",children:or("table",{className:ht({size:e,textColor:o}),children:[N("thead",{children:N(Rt,{slot:t.tableHead,context:a,data:r})}),N("tbody",{children:N(Rt,{slot:t.tableBody,context:a,data:r})})]})})});import{jsx as bt}from"react/jsx-runtime";var rr=e=>{switch(e.slotName){case"tableHead":return{component:()=>bt("tr",{className:"h-20"})};case"tableBody":return{component:()=>bt("tr",{className:"h-40"})};default:return l}};var Nt=(t=>(t.TableHead="tableHead",t.TableBody="tableBody",t))(Nt||{});import{UniformSlot as G}from"@uniformdev/canvas-next-rsc/component";import{jsx as Y}from"react/jsx-runtime";var ar=({slotName:e})=>{switch(e){case"testimonialSecondaryImage":return{component:()=>Y("div",{className:"h-20 w-64"})};case"testimonialContent":return{component:()=>Y("div",{className:"h-20 w-64"})};case"testimonialPrimaryImage":return{component:()=>Y("div",{className:"size-full"})};case"testimonialAuthor":return{component:()=>Y("div",{className:"h-20 w-64"})};default:return l}};var wt=(t=>(t.WithLargeAvatar="withLargeAvatar",t.WithOverlappingImage="withOverlappingImage",t))(wt||{}),Tt=(a=>(a.TestimonialSecondaryImage="testimonialSecondaryImage",a.TestimonialContent="testimonialContent",a.TestimonialPrimaryImage="testimonialPrimaryImage",a.TestimonialAuthor="testimonialAuthor",a))(Tt||{});import{jsx as L,jsxs as nr}from"react/jsx-runtime";var Ft=({testimonialPrimaryImage:e,testimonialContent:o,testimonialAuthor:t,testimonialSecondaryImage:r,backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m})=>L(c,{backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,children:nr("div",{className:"mx-auto flex flex-col items-center md:max-w-[80%]",children:[L("div",{children:r}),L("div",{className:"my-8",children:o}),L("div",{className:"size-10 rounded-full",children:e}),L("div",{className:"mt-4 flex gap-3",children:t})]})});import{jsx as I,jsxs as K}from"react/jsx-runtime";var Et=({testimonialPrimaryImage:e,testimonialContent:o,testimonialAuthor:t,testimonialSecondaryImage:r,backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m})=>I(c,{backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,children:K("div",{className:"mx-auto flex items-center gap-x-10 md:max-w-[80%]",children:[I("div",{className:"hidden aspect-square w-full max-w-xs shrink-0 overflow-hidden rounded-xl lg:block",children:e}),K("div",{className:"flex flex-col gap-y-8",children:[I("div",{className:"",children:o}),K("div",{className:"flex items-center justify-between",children:[K("div",{className:"flex items-center gap-x-4",children:[I("div",{className:"block aspect-square w-10 overflow-hidden rounded-md lg:hidden",children:e}),I("div",{className:"gap-3",children:t})]}),r]})]})]})});import{jsx as B,jsxs as ue}from"react/jsx-runtime";var At=({testimonialPrimaryImage:e,testimonialContent:o,testimonialAuthor:t,testimonialSecondaryImage:r,backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m})=>B(c,{backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,children:B(c,{className:"pb-10 lg:pb-0",children:ue("div",{className:"mx-auto flex max-w-2xl flex-col items-center gap-10 lg:max-w-none lg:flex-row",children:[B("div",{className:"-mt-7 aspect-[2/1] w-full shrink-0 overflow-hidden rounded-xl lg:-my-7 lg:aspect-[1/1.4] lg:max-w-xs",children:e}),ue("div",{className:"flex flex-col gap-y-8",children:[B("div",{className:"",children:o}),ue("div",{className:"flex items-center justify-between",children:[B("div",{className:"gap-3",children:t}),r]})]})]})})});import{jsx as y}from"react/jsx-runtime";var ir=({context:e,component:o,slots:t,backgroundColor:r,spacing:a,border:i,fluidContent:n,height:s})=>{let m=o.variant,d={backgroundColor:r,spacing:a,border:i,fluidContent:n,height:s,testimonialPrimaryImage:y(G,{context:e,data:o,slot:t.testimonialPrimaryImage}),testimonialContent:y(G,{context:e,data:o,slot:t.testimonialContent}),testimonialAuthor:y(G,{context:e,data:o,slot:t.testimonialAuthor}),testimonialSecondaryImage:y(G,{context:e,data:o,slot:t.testimonialSecondaryImage})};switch(m){case"withLargeAvatar":return y(Et,{...d});case"withOverlappingImage":return y(At,{...d});default:return y(Ft,{...d})}};export{ho as a,Ie as b,Ro as c,To as d,Ve as e,Be as f,bo as g,De as h,Or as i,Fo as j,Ge as k,ee as l,Ze as m,Oa as n,Vo as o,et as p,Xa as q,Do as r,rt as s,ot as t,li as u,Oo as v,at as w,Ci as x,ko as y,it as z,Ti as A,Uo as B,Vi as C,Yo as D,Wi as E,Go as F,Xo as G,st as H,Jo as I,Zo as J,le as K,mt as L,Qo as M,er as N,Pt as O,ce as P,ft as Q,jo as R,tr as S,Nt as T,rr as U,ir as V,wt as W,Tt as X,ar as Y};
@@ -1,23 +0,0 @@
1
- import { FC } from 'react';
2
- import Container from '@/components/ui/Container';
3
- import { cn } from '@/utils/styling';
4
- import { AccordionProps } from '.';
5
-
6
- export const Accordion: FC<AccordionProps> = ({
7
- accordionContent,
8
- accordionItems,
9
- backgroundColor,
10
- spacing,
11
- border,
12
- fluidContent,
13
- height,
14
- className,
15
- }) => (
16
- <Container
17
- className={cn('flex flex-col gap-8', className)}
18
- {...{ backgroundColor, spacing, border, fluidContent, height }}
19
- >
20
- {accordionContent && <div className="flex flex-col gap-4 text-start">{accordionContent}</div>}
21
- {accordionItems}
22
- </Container>
23
- );
@@ -1,9 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import { ContainerProps } from '@/components/ui/Container';
3
-
4
- export type AccordionProps = ContainerProps & {
5
- accordionContent?: ReactNode;
6
- accordionItems: ReactNode;
7
- };
8
-
9
- export { Accordion as default } from './accordion';
@@ -1,41 +0,0 @@
1
- 'use client';
2
-
3
- import { FC, useCallback, useState } from 'react';
4
- import Container from '@/components/ui/Container';
5
- import { cn } from '@/utils/styling';
6
- import { AccordionItemProps } from '.';
7
- import { IconArrowDown } from './icon-arrow-down';
8
- import { IconArrowUp } from './icon-arrow-up';
9
-
10
- export const AccordionItem: FC<AccordionItemProps> = ({
11
- text,
12
- backgroundColor,
13
- spacing,
14
- className,
15
- accordionItemContent,
16
- }) => {
17
- const [isOpened, setOpened] = useState(false);
18
- const toggleOpenAccordion = useCallback(() => setOpened(isOpened => !isOpened), []);
19
-
20
- return (
21
- <Container {...{ fluidContent: true }}>
22
- <Container {...{ backgroundColor, spacing, fluidContent: true, className }}>
23
- <button
24
- onClick={toggleOpenAccordion}
25
- className="flex w-full cursor-pointer flex-row items-center justify-between text-start"
26
- >
27
- {text}
28
- <div
29
- className={cn({
30
- [`text-${backgroundColor} invert`]: !!backgroundColor,
31
- 'text-black dark:text-white': !backgroundColor,
32
- })}
33
- >
34
- {isOpened ? <IconArrowDown /> : <IconArrowUp />}
35
- </div>
36
- </button>
37
- </Container>
38
- {isOpened && accordionItemContent}
39
- </Container>
40
- );
41
- };
@@ -1,16 +0,0 @@
1
- import { ReactElement, ReactNode } from 'react';
2
- import dynamic from 'next/dynamic';
3
- import { ContainerProps } from '@/components/ui/Container';
4
-
5
- export type AccordionItemParameters = Pick<ContainerProps, 'backgroundColor' | 'spacing' | 'border'> & {
6
- text: ReactElement;
7
- accordionItemContent: ReactNode;
8
- };
9
-
10
- export type AccordionItemAdditionalProps = {
11
- className?: string;
12
- };
13
-
14
- export type AccordionItemProps = AccordionItemParameters & AccordionItemAdditionalProps;
15
-
16
- export default dynamic(() => import('./accordion-item').then(mod => mod.AccordionItem));
@@ -1,13 +0,0 @@
1
- export type InlineSVGProps = {
2
- src: string;
3
- className?: string;
4
- fill?: boolean;
5
- width?: number;
6
- height?: number;
7
- sanitize?: boolean;
8
- fallback?: React.ReactNode;
9
- useCurrentColor?: boolean;
10
- alt?: string;
11
- };
12
-
13
- export { InlineSVG as default } from './inline-svg';
@@ -1,59 +0,0 @@
1
- import { FC, SVGProps } from 'react';
2
- import { cn } from '@/utils/styling';
3
- import { InlineSVGProps } from '.';
4
- import { fetchSvg, sanitizeSvg, applyCurrentColor, getSvgAttributes, getSvgInnerContent } from './utils';
5
-
6
- export const InlineSVG: FC<InlineSVGProps> = async ({
7
- src,
8
- className = '',
9
- width,
10
- height,
11
- fill,
12
- sanitize = true,
13
- useCurrentColor = true,
14
- fallback,
15
- alt,
16
- }) => {
17
- if (!src) return fallback ?? null;
18
-
19
- const transformSvg = (svg: string): string => {
20
- const transformers: Array<(input: string) => string> = [];
21
-
22
- if (sanitize) transformers.push(sanitizeSvg);
23
- if (useCurrentColor) transformers.push(applyCurrentColor);
24
-
25
- return transformers.reduce((result, fn) => fn(result), svg);
26
- };
27
-
28
- try {
29
- const raw = await fetchSvg(src);
30
- const cleaned = transformSvg(raw);
31
- const attrs = getSvgAttributes(cleaned);
32
- const content = getSvgInnerContent(cleaned);
33
-
34
- const svgProps: SVGProps<SVGSVGElement> = {
35
- ...attrs,
36
- role: 'img',
37
- 'aria-label': alt,
38
- width: fill ? '100%' : width,
39
- height: fill ? '100%' : height,
40
- className: cn(attrs.className, className, {
41
- 'absolute inset-0': fill,
42
- }),
43
- };
44
-
45
- return (
46
- <div className="relative size-full">
47
- <svg {...svgProps} dangerouslySetInnerHTML={{ __html: content }} />
48
- </div>
49
- );
50
- } catch {
51
- return (
52
- fallback ?? (
53
- <div className={cn(className)} style={{ width, height }}>
54
- <div className="rounded border border-red-200 bg-red-50 p-2 text-sm text-red-500">Failed to load SVG</div>
55
- </div>
56
- )
57
- );
58
- }
59
- };
@@ -1,77 +0,0 @@
1
- /**
2
- * Sanitizes SVG by removing potentially dangerous or unwanted content.
3
- */
4
- export const sanitizeSvg = (svg: string): string =>
5
- svg
6
- .replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi, '')
7
- .replace(/\son\w+="[^"]*"/gi, '')
8
- .replace(/\son\w+='[^']*'/gi, '')
9
- .replace(/javascript:/gi, '');
10
-
11
- /**
12
- * Replaces color attributes (fill, stroke, color) with `currentColor`
13
- * except for 'none' and 'transparent'.
14
- */
15
- export const applyCurrentColor = (svg: string): string =>
16
- svg
17
- .replace(/fill=(['"])(?!none|transparent)[^'"]*\1/gi, 'fill="currentColor"')
18
- .replace(/stroke=(['"])(?!none|transparent)[^'"]*\1/gi, 'stroke="currentColor"')
19
- .replace(/color=(['"])[^'"]*\1/gi, 'color="currentColor"');
20
-
21
- /**
22
- * Extracts attributes from the <svg> tag as key-value pairs.
23
- */
24
- export const getSvgAttributes = (svg: string): Record<string, string> => {
25
- const match = svg.match(/<svg\s+([^>]*)>/i);
26
- if (!match || !match[1]) return {};
27
-
28
- const attrString = match[1];
29
- const attributes: Record<string, string> = {};
30
-
31
- const attrRegex = /(\w[\w-]*)=["']([^"']*)["']/g;
32
- let result: RegExpExecArray | null;
33
-
34
- while ((result = attrRegex.exec(attrString))) {
35
- const [, key, value] = result;
36
- if (key && value) {
37
- attributes[key] = value;
38
- }
39
- }
40
-
41
- return attributes;
42
- };
43
-
44
- /**
45
- * Extracts inner content from an SVG string (everything inside <svg>...</svg>).
46
- */
47
- export const getSvgInnerContent = (svg: string): string => {
48
- const match = svg.match(/<svg[^>]*>([\s\S]*?)<\/svg>/i);
49
- return match?.[1] ?? '';
50
- };
51
-
52
- /**
53
- * Fetches raw SVG content from a remote URL.
54
- */
55
- export const fetchSvg = async (url: string): Promise<string> => {
56
- try {
57
- const response = await fetch(url, {
58
- headers: {
59
- Accept: 'image/svg+xml, text/plain, */*',
60
- },
61
- });
62
-
63
- if (!response.ok) {
64
- throw new Error(`Failed to fetch SVG: ${response.status} ${response.statusText}`);
65
- }
66
-
67
- const content = await response.text();
68
- if (!content.trim().includes('<svg')) {
69
- throw new Error('Response is not valid SVG');
70
- }
71
-
72
- return content;
73
- } catch (err) {
74
- console.error('Error fetching SVG:', err);
75
- throw err;
76
- }
77
- };
@@ -1,22 +0,0 @@
1
- import { ReactNode } from 'react';
2
- import dynamic from 'next/dynamic';
3
-
4
- export const MaxWidthMap = {
5
- small: 'max-w-xl',
6
- medium: 'max-w-2xl',
7
- large: 'max-w-4xl',
8
- };
9
-
10
- export type ModalProps = {
11
- maxWidth?: 'small' | 'medium' | 'large';
12
- className?: string;
13
- backgroundColor?: string;
14
- closeIconColor?: string;
15
- disableCloseModalOnClickOutside?: boolean;
16
- trigger: ReactNode;
17
- content: ReactNode;
18
- actions?: ReactNode;
19
- onChangeModalState?: (state: boolean) => void;
20
- };
21
-
22
- export default dynamic(() => import('./modal').then(mod => mod.Modal));
@@ -1,89 +0,0 @@
1
- 'use client';
2
-
3
- import { FC, useCallback, useState, MouseEvent, useRef, useEffect } from 'react';
4
- import { cn } from '@/utils/styling';
5
- import { ModalProps } from '.';
6
- import { CloseIcon } from './close-icon';
7
- import { getCloseButtonClasses, getDialogClasses, getFormClasses } from './style-utils';
8
-
9
- export const Modal: FC<ModalProps> = ({
10
- trigger,
11
- content,
12
- actions,
13
- maxWidth,
14
- backgroundColor,
15
- closeIconColor,
16
- disableCloseModalOnClickOutside,
17
- onChangeModalState,
18
- className,
19
- }) => {
20
- const modalActionsRef = useRef<HTMLDivElement>(null);
21
- const [showModal, setShowModal] = useState(false);
22
-
23
- useEffect(() => {
24
- if (onChangeModalState) {
25
- onChangeModalState(showModal);
26
- }
27
- }, [showModal, onChangeModalState]);
28
-
29
- const handleClickOutside = useCallback(() => {
30
- if (!disableCloseModalOnClickOutside) setShowModal(false);
31
- }, [disableCloseModalOnClickOutside]);
32
-
33
- const toggleModal = useCallback(() => {
34
- setShowModal(prev => !prev);
35
- }, []);
36
-
37
- const handleClickContent = useCallback((e: MouseEvent<HTMLFormElement>) => {
38
- e.stopPropagation();
39
- }, []);
40
-
41
- useEffect(() => {
42
- if (!modalActionsRef.current) return;
43
- const currentActions = modalActionsRef.current.querySelectorAll('button, a');
44
- const handleClickButton = () => setShowModal(false);
45
-
46
- currentActions.forEach(button => {
47
- button.addEventListener('click', handleClickButton);
48
- });
49
- return () =>
50
- currentActions.forEach(button => {
51
- button.removeEventListener('click', handleClickButton);
52
- });
53
- }, []);
54
-
55
- return (
56
- <div>
57
- <div onClick={toggleModal}>{trigger}</div>
58
- <div className={getDialogClasses({ showModal })}>
59
- <dialog
60
- open={showModal}
61
- onClick={handleClickOutside}
62
- aria-label="Close modal"
63
- aria-modal="true"
64
- className="flex size-full items-center justify-center bg-black/50 px-4"
65
- >
66
- <form
67
- method="dialog"
68
- className={cn(getFormClasses({ maxWidth, backgroundColor }), className)}
69
- onClick={handleClickContent}
70
- >
71
- <button onClick={toggleModal} className={getCloseButtonClasses({ disableCloseModalOnClickOutside })}>
72
- <CloseIcon
73
- className={cn({
74
- [`fill-${closeIconColor}`]: closeIconColor,
75
- })}
76
- />
77
- </button>
78
- <div className="p-6 md:p-8">{content}</div>
79
- {actions && (
80
- <div ref={modalActionsRef} className="border-t p-6 md:p-8">
81
- {actions}
82
- </div>
83
- )}
84
- </form>
85
- </dialog>
86
- </div>
87
- </div>
88
- );
89
- };
@@ -1 +0,0 @@
1
- "use client";import{a as d}from"./chunk-BK7UG4U4.mjs";import{a as I}from"./chunk-7GVG4HLE.mjs";import{a as G}from"./chunk-2YTACEBA.mjs";import{c as h}from"./chunk-S7CSCIW4.mjs";import"./chunk-YEKQJ4YC.mjs";import{UniformSlot as R}from"@uniformdev/canvas-next-rsc/component";import F from"react-responsive-masonry";import{Fragment as v,jsx as y}from"react/jsx-runtime";var g={firstLineCount:2,secondLineCount:3,otherLinesCount:4},L=({slot:n,aspectRatio:s,config:r})=>{let{firstLineCount:i=g.firstLineCount,secondLineCount:p=g.secondLineCount,otherLinesCount:m=g.otherLinesCount}=r||{},{items:f=[]}=n||{},c=f.reduce((e,o,t)=>(t<i?e[0]?.push(o):t<i+p?e[1]?.push(o):e[2]?.push(o),e),[[],[],[]])||[];return y(v,{children:c?.map((e,o)=>e.length?y(F,{columnsCount:o<2||e.length<m?e.length:m,gutter:"4px",children:e.map((t,u)=>y("div",{className:h("flex flex-1 items-center justify-center",{[`aspect-${s}`]:!!s}),children:t},`img-${u}`))},`line-${o}`):null)})};import{jsx as l}from"react/jsx-runtime";var M=({slots:n,aspectRatio:s,items:r,backgroundColor:i,spacing:p,border:m,fluidContent:f,height:c,config:e,context:o,component:t})=>{let u=r?.length?{name:"items",items:G(r)?.map((a,C)=>l(d,{src:a.url,style:{objectFit:"cover"},alt:`Image ${C}`,fill:!0},a?.id||`image-${C}`))||[]}:n.imageGalleryItems,P=!r?.length&&!t?.slots?.imageGalleryItems?.filter(({_id:a})=>!a?.startsWith("placeholder"))?.length;return l(I,{backgroundColor:i,spacing:p,border:m,fluidContent:f,height:c,children:l("div",{className:"flex flex-col gap-1",children:P?l(R,{context:o,slot:n.imageGalleryItems,data:t}):l(L,{slot:u,aspectRatio:s,config:e})})})};export{M as ImageGallery};
@@ -1 +0,0 @@
1
- "use client";import{b as d}from"./chunk-2BMAPB63.mjs";import"./chunk-YEKQJ4YC.mjs";import{UniformSlot as i}from"@uniformdev/canvas-next-rsc/component";import{jsx as t}from"react/jsx-runtime";var p=({slots:o,component:a,context:r,maxWidth:l,backgroundColor:m,closeIconColor:e,disableCloseModalOnClickOutside:n})=>t(d,{maxWidth:l,backgroundColor:m,closeIconColor:e,disableCloseModalOnClickOutside:n,trigger:t(i,{data:a,context:r,slot:o.trigger}),content:t(i,{data:a,context:r,slot:o.modalContent}),actions:o?.modalActions?.items?.length&&t(i,{data:a,context:r,slot:o.modalActions})});export{p as Modal};
@@ -1 +0,0 @@
1
- "use client";import{a as g}from"./chunk-2BMAPB63.mjs";import{c as s}from"./chunk-S7CSCIW4.mjs";import"./chunk-YEKQJ4YC.mjs";import{useCallback as m,useState as B,useRef as L,useEffect as k}from"react";import{jsx as v}from"react/jsx-runtime";var h=({className:o,...l})=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:s("size-8",o),...l,children:v("path",{d:"m16.192 6.344-4.243 4.242-4.242-4.242-1.414 1.414L10.535 12l-4.242 4.242 1.414 1.414 4.242-4.242 4.243 4.242 1.414-1.414L13.364 12l4.242-4.242z"})});var P=({showModal:o})=>s("fixed left-0 top-0 size-full",{hidden:!o,block:o}),M=({maxWidth:o,backgroundColor:l})=>s("rounded-lg shadow-lg relative",g[o||"small"],{[`bg-${l}`]:!!l}),b=({disableCloseModalOnClickOutside:o})=>s("group absolute right-4 top-4 opacity-40 hover:opacity-100",{hidden:o});import{jsx as e,jsxs as x}from"react/jsx-runtime";var O=({trigger:o,content:l,actions:p,maxWidth:E,backgroundColor:F,closeIconColor:f,disableCloseModalOnClickOutside:a,onChangeModalState:i,className:w})=>{let n=L(null),[r,c]=B(!1);k(()=>{i&&i(r)},[r,i]);let N=m(()=>{a||c(!1)},[a]),u=m(()=>{c(t=>!t)},[]),y=m(t=>{t.stopPropagation()},[]);return k(()=>{if(!n.current)return;let t=n.current.querySelectorAll("button, a"),C=()=>c(!1);return t.forEach(d=>{d.addEventListener("click",C)}),()=>t.forEach(d=>{d.removeEventListener("click",C)})},[]),x("div",{children:[e("div",{onClick:u,children:o}),e("div",{className:P({showModal:r}),children:e("dialog",{open:r,onClick:N,"aria-label":"Close modal","aria-modal":"true",className:"flex size-full items-center justify-center bg-black/50 px-4",children:x("form",{method:"dialog",className:s(M({maxWidth:E,backgroundColor:F}),w),onClick:y,children:[e("button",{onClick:u,className:b({disableCloseModalOnClickOutside:a}),children:e(h,{className:s({[`fill-${f}`]:f})})}),e("div",{className:"p-6 md:p-8",children:l}),p&&e("div",{ref:n,className:"border-t p-6 md:p-8",children:p})]})})})]})};export{O as Modal};
@@ -1 +0,0 @@
1
- "use client";import{a as B,b as H}from"./chunk-RYEXR67P.mjs";import{a as k}from"./chunk-6TUDWIYU.mjs";import"./chunk-WAW7PQYM.mjs";import{a as w,b as y}from"./chunk-TCQTXNKT.mjs";import{a as C}from"./chunk-BK7UG4U4.mjs";import"./chunk-7GVG4HLE.mjs";import{a as g}from"./chunk-2YTACEBA.mjs";import{a as u,c as o}from"./chunk-S7CSCIW4.mjs";import"./chunk-YEKQJ4YC.mjs";import{useCallback as O,useMemo as et,useState as at}from"react";import{UniformText as st}from"@uniformdev/canvas-next-rsc/component";import{UniformSlot as M}from"@uniformdev/canvas-next-rsc/component";import{jsx as m,jsxs as _}from"react/jsx-runtime";var G=({isOpen:t,backgroundColor:s,context:e,slots:i,border:r,component:n,hasRightContent:l})=>m("div",{className:o("absolute z-10 w-max left-1/2 -translate-x-1/2 pt-4",{hidden:!t,block:t,"w-full md:w-[460px]":!l,"w-full md:w-[460px] xl:w-[768px]":l}),children:m("div",{className:o("p-8",{[`bg-${s}`]:!!s,[u(r,"{value}")]:r}),children:_(w,{columnsCount:"2",gapX:"4",children:[m(y,{children:m("div",{className:"flex flex-col gap-y-4",children:m(M,{context:e,data:n,slot:i.navigationFlyoutLeftContent})})}),m(y,{children:m(M,{context:e,data:n,slot:i.navigationFlyoutRightContent})})]})})});import{useEffect as j,useState as tt}from"react";import{UniformSlot as L}from"@uniformdev/canvas-next-rsc/component";import{jsx as d,jsxs as R}from"react/jsx-runtime";var ot=()=>{let[t,s]=tt(0);return j(()=>{let e=document.getElementById("mobile-header");e&&s(e.offsetHeight)},[]),t},S=({isOpen:t,backgroundColor:s,context:e,slots:i,onClose:r,component:n})=>{let l=ot();return R("div",{style:{top:l},className:o("fixed left-0 right-0 bottom-0 z-10 w-full pt-4",{[`bg-${s}`]:!!s,hidden:!t,block:t}),children:[d("button",{onClick:r,className:"w-max rotate-180 px-4",children:d(k,{})}),R("div",{className:"flex flex-col items-center justify-center gap-y-8 p-4",children:[d(L,{context:e,data:n,slot:i.navigationFlyoutLeftContent}),d(L,{context:e,data:n,slot:i.navigationFlyoutRightContent})]})]})};var U=({isOpen:t})=>o("transition transform hidden md:block",{"rotate-180":t,"rotate-0":!t}),D=({color:t})=>o("flex items-center gap-x-2",{[`text-${t}`]:!!t});import{jsx as a,jsxs as $}from"react/jsx-runtime";var Gt=({icon:t,caretIcon:s,backgroundColor:e,border:i,size:r,tag:n,color:l,weight:T,font:V,transform:A,decoration:E,letterSpacing:z,alignment:W,component:p,context:v,slots:N,hoverEffect:F="",className:X})=>{let[f,P]=at(!1),q=O(()=>P(!0),[]),h=O(()=>P(!1),[]),J=et(()=>!!p.slots?.navigationFlyoutRightContent?.length,[p.slots]),[K]=g(t),{url:c,title:x=""}=K||{},Q=()=>c?c.endsWith(".svg")?a(H,{src:c,alt:x,fill:!0}):a(C,{src:c,alt:x,fill:!0}):null,b=o("transition-all duration-150",{[u(F,"group-hover:{value}")]:!!F}),[Y]=g(s),{url:I,title:Z=""}=Y||{};return $("div",{className:"relative",onMouseLeave:h,children:[$("button",{onMouseEnter:q,className:D({color:l}),children:[a(B,{icon:Q(),className:o("group",X),iconClassName:b,textClassName:b,size:r,tag:n,color:l,weight:T,font:V,transform:A,decoration:E,letterSpacing:z,alignment:W,children:a(st,{placeholder:"Text goes here",parameterId:"text",component:p,context:v})}),I&&a("div",{className:o("relative size-[1em]",U({isOpen:f}),{[`text-${r}`]:!!r}),children:a(C,{src:I,alt:Z,fill:!0})})]}),a("div",{className:"hidden md:block",children:a(G,{hasRightContent:J,isOpen:f,backgroundColor:e,context:v,slots:N,border:i,component:p})}),a("div",{className:"block md:hidden",children:a(S,{onClose:h,isOpen:f,backgroundColor:e,context:v,slots:N,border:i,component:p})})]})};export{Gt as NavigationFlyout};
@@ -1 +0,0 @@
1
- "use client";import{a as I,b as B}from"./chunk-RYEXR67P.mjs";import{a as y}from"./chunk-6TUDWIYU.mjs";import"./chunk-WAW7PQYM.mjs";import{a as f}from"./chunk-BK7UG4U4.mjs";import{a as v}from"./chunk-2YTACEBA.mjs";import{a as l,c as t}from"./chunk-S7CSCIW4.mjs";import"./chunk-YEKQJ4YC.mjs";import{useCallback as S,useState as _}from"react";import{UniformText as j}from"@uniformdev/canvas-next-rsc/component";import{UniformSlot as K}from"@uniformdev/canvas-next-rsc/component";import{jsx as p}from"react/jsx-runtime";var F=({isOpen:o,backgroundColor:s,context:e,slots:i,border:a})=>p("div",{className:t("absolute left-0 max-w-64 z-10 pt-4",{hidden:!o,block:o}),children:p("div",{className:t({[`bg-${s}`]:!!s,[l(a,"{value}")]:a}),children:p("div",{className:"flex flex-col gap-y-4 p-4",children:p(K,{data:e,slot:i.links,context:e})})})});import{useEffect as Q,useState as R}from"react";import{UniformSlot as X}from"@uniformdev/canvas-next-rsc/component";import{jsx as m,jsxs as Z}from"react/jsx-runtime";var Y=()=>{let[o,s]=R(0);return Q(()=>{let e=document.getElementById("mobile-header");e&&s(e.offsetHeight)},[]),o},H=({isOpen:o,backgroundColor:s,context:e,slots:i,onClose:a})=>{let c=Y();return Z("div",{style:{top:c},className:t("fixed left-0 right-0 bottom-0 z-10 w-full pt-4",{[`bg-${s}`]:!!s,hidden:!o,block:o}),children:[m("button",{onClick:a,className:"w-max rotate-180 px-4",children:m(y,{})}),m("div",{className:"flex flex-col items-center gap-y-4 p-4",children:m(X,{data:e,slot:i.links,context:e})})]})};var w=({isOpen:o})=>t("transition transform hidden md:block",{"rotate-180":o,"rotate-0":!o}),M=({color:o})=>t("flex items-center gap-x-2",{[`text-${o}`]:!!o});import{jsx as r,jsxs as U}from"react/jsx-runtime";var yo=({icon:o,caretIcon:s,backgroundColor:e,border:i,size:a,tag:c,color:g,weight:D,font:O,transform:$,decoration:L,letterSpacing:T,alignment:V,component:A,context:d,slots:C,hoverEffect:N="",className:E})=>{let[u,b]=_(!1),P=S(()=>b(!0),[]),x=S(()=>b(!1),[]),[z]=v(o),{url:n,title:h=""}=z||{},W=()=>n?n.endsWith(".svg")?r(B,{src:n,alt:h,fill:!0}):r(f,{src:n,alt:h,fill:!0}):null,G=t("transition-all duration-150",{[l(N,"group-hover:{value}")]:!!N}),[q]=v(s),{url:k,title:J=""}=q||{};return U("div",{className:"relative",onMouseLeave:x,children:[U("button",{onMouseEnter:P,onClick:P,className:M({color:g}),children:[r(I,{icon:W(),className:t("group",E),iconClassName:G,textClassName:G,size:a,tag:c,color:g,weight:D,font:O,transform:$,decoration:L,letterSpacing:T,alignment:V,children:r(j,{placeholder:"Text goes here",parameterId:"text",component:A,context:d})}),k&&r("div",{className:t("relative size-[1em]",w({isOpen:u}),{[`text-${a}`]:!!a}),children:r(f,{src:k,alt:J,fill:!0})})]}),r("div",{className:"hidden md:block",children:r(F,{isOpen:u,backgroundColor:e,context:d,slots:C,border:i})}),r("div",{className:"block md:hidden",children:r(H,{onClose:x,isOpen:u,backgroundColor:e,context:d,slots:C})})]})};export{yo as NavigationGroup};
@@ -1 +0,0 @@
1
- "use client";import"./chunk-VW2XC3SE.mjs";import{a as f}from"./chunk-7GVG4HLE.mjs";import"./chunk-MSXDLSXH.mjs";import{c as m}from"./chunk-S7CSCIW4.mjs";import"./chunk-YEKQJ4YC.mjs";import{Fragment as C,useCallback as k,useEffect as v,useMemo as V,useState as h}from"react";import{flattenValues as F}from"@uniformdev/canvas";import{UniformSlot as E,UniformText as I}from"@uniformdev/canvas-next-rsc/component";var u=({color:r,variant:a})=>m("flex flex-row overflow-x-auto ",{[`border-${r} border-b`]:r&&a==="bordered"}),p=({color:r,variant:a,tabItem:t,activeTabId:e})=>m("text-lg shrink-0 font-medium px-5 py-3",{[`text-${r}`]:r,[`border-${r}`]:t.id===e&&a==="bordered","border-b-2":a==="bordered","opacity-60 hover:opacity-100":t.id!==e,"border-transparent":t.id!==e&&a==="bordered"});import{jsx as i,jsxs as N}from"react/jsx-runtime";var J=({slots:r,color:a,component:t,context:e,backgroundColor:g,spacing:T,border:c,fluidContent:x,height:B})=>{let b=t.variant||"default",[n,d]=h(t?.slots?.tabItems?.[0]?._id),l=V(()=>t?.slots?.tabItems?t.slots.tabItems.map(s=>({...F(s),id:s._id})):[],[t?.slots?.tabItems]);v(()=>{l.length&&(n||d(l[0]?.id||""))},[l,n]);let P=k(s=>{e.isContextualEditing&&d(s)},[e.isContextualEditing]);return N(f,{className:"flex flex-col gap-5",backgroundColor:g,spacing:T,border:c,fluidContent:x,height:B,children:[i("div",{className:u({color:a,variant:b}),children:l.map((s,o)=>i("button",{onClick:()=>d(s.id),className:p({color:a,variant:b,tabItem:s,activeTabId:n}),children:t?.slots?.tabItems?.[o]&&i(I,{onFocus:()=>P(s.id),context:e,parameterId:"text",component:t?.slots?.tabItems[o],placeholder:"Tab title"})},s.id))}),i(E,{data:t,context:e,slot:r.tabItems,children:({child:s,component:{_id:o}})=>o===n?i(C,{children:s},o):i(C,{},o)})]})};export{J as Tabs};