@uniformdev/csk-components 6.0.114-alpha.1 → 6.0.118-alpha.1
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.
- package/dist/chunk-2BMAPB63.mjs +1 -0
- package/dist/chunk-FIN5US3Q.mjs +1 -0
- package/dist/{chunk-3PDY7RJC.mjs → chunk-TFA6HYP4.mjs} +2 -2
- package/dist/chunk-YA5BXPZL.mjs +1 -0
- package/dist/components/canvas/emptyPlaceholders.mjs +1 -1
- package/dist/components/canvas/index.mjs +2 -2
- package/dist/components/ui/index.d.mts +18 -5
- package/dist/components/ui/index.mjs +1 -1
- package/dist/content/components/canvas/DemoHero/fixed-hero.tsx +0 -1
- package/dist/content/components/canvas/Image/image.tsx +2 -2
- package/dist/content/components/canvas/Modal/modal.tsx +12 -69
- package/dist/content/components/ui/Accordion/accordion.tsx +23 -0
- package/dist/content/components/ui/Accordion/index.tsx +9 -0
- package/dist/content/components/ui/AccordionItem/accordion-item.tsx +41 -0
- package/dist/content/components/ui/AccordionItem/icon-arrow-down.tsx +20 -0
- package/dist/content/components/ui/AccordionItem/icon-arrow-up.tsx +20 -0
- package/dist/content/components/ui/AccordionItem/index.tsx +16 -0
- package/dist/content/components/ui/InlineSVG/index.ts +13 -0
- package/dist/content/components/ui/InlineSVG/inline-svg.tsx +59 -0
- package/dist/content/components/ui/InlineSVG/utils.ts +77 -0
- package/dist/content/components/ui/Modal/index.tsx +22 -0
- package/dist/content/components/ui/Modal/modal.tsx +89 -0
- package/dist/content/components/{canvas → ui}/Modal/style-utils.ts +4 -4
- package/dist/index.mjs +1 -1
- package/dist/modal-43IHAVWB.mjs +1 -0
- package/dist/modal-5FNTFSTN.mjs +1 -0
- package/package.json +5 -5
- package/dist/chunk-2SEOCBRK.mjs +0 -1
- package/dist/chunk-EIEZRPWW.mjs +0 -1
- package/dist/chunk-LG7MD2DH.mjs +0 -1
- package/dist/modal-HKMQGV4B.mjs +0 -1
- /package/dist/content/components/{canvas → ui}/Modal/close-icon.tsx +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import a from"next/dynamic";var t={small:"max-w-xl",medium:"max-w-2xl",large:"max-w-4xl"},l=a(()=>import("./modal-5FNTFSTN.mjs").then(o=>o.Modal));export{t as a,l as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-7GVG4HLE.mjs";import{a as e,c as l}from"./chunk-S7CSCIW4.mjs";import{jsx as m}from"react/jsx-runtime";var d=({className:r,wrapperClassName:t,direction:o,justifyContent:i,gap:s,alignItems:p,backgroundColor:f,spacing:P,border:c,fluidContent:v,height:a,children:y})=>m(n,{backgroundColor:f,spacing:P,border:c,fluidContent:v,height:a,wrapperClassName:t,children:m("div",{className:l("flex",{[e(o,"flex-{value}")]:o,[e(i,"justify-{value}")]:i,[e(s,"gap-{value}")]:s,[e(p,"items-{value}")]:p,[e(a,"h-{value}")]:a},r),children:y})});import{jsx as u}from"react/jsx-runtime";var x=({className:r,alignSelf:t,shrink:o,children:i})=>u("div",{className:l({[e(t,"self-{value}")]:t,[`shrink-${o}`]:o},r),children:i});import g from"next/dynamic";var D=g(()=>import("./video-RC2QHJS2.mjs").then(r=>r.Video));export{d as a,x as b,D as c};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
var t=/['"](\.\/[^'"]+|@\/[^'"]+)['"]/g,
|
|
1
|
+
var t=/['"](\.\/[^'"]+|@\/[^'"]+)['"]/g,l=[".tsx",".ts",".js",".jsx"],a=["index.tsx","empty-placeholder.tsx"],o=/\b[a-zA-Z0-9_]+Mapping\s*=\s*{(?:[^{}]*|\{(?:[^{}]*|\{[^{}]*\})*\})*}/g,d=/(import .+;)(?![\s\S]*import .+)/,T=r=>new RegExp(`\\b${r}\\s*:\\s*[^,]+,?`,"g"),x=/}$/,b=`export { cskComponentsMapping } from '@uniformdev/csk-components/components/canvas';
|
|
2
2
|
`,g=`import baseCskComponentsMapping from '@uniformdev/csk-components/components/canvas';
|
|
3
3
|
|
|
4
4
|
export const cskComponentsMapping = {
|
|
5
5
|
...baseCskComponentsMapping,
|
|
6
6
|
};
|
|
7
|
-
`,E=["Accordion","AccordionItem","Badge","Banner","Breadcrumbs","Button","Card","Carousel","Container","Countdown","DemoHero","Divider","Flex","FlexItem","Footer","Grid","GridItem","Header","IconLabel","Image","ImageGallery","Link","Modal","NavigationFlyout","NavigationGroup","NavigationLink","Page","Review","RichText","Section","Spacer","Tab","Table","TableCustomCell","TableDataCell","TableHeaderCell","TableRow","Tabs","Testimonial","Text","ThemeSwitcher","Video"];var i=(e=>(e.Accordion="accordion",e.AccordionItem="accordionItem",e.Badge="badge",e.Banner="banner",e.Button="button",e.Card="card",e.Carousel="carousel",e.Container="container",e.Countdown="countdown",e.Divider="divider",e.Grid="grid",e.GridItem="gridItem",e.Flex="flex",e.FlexItem="flexItem",e.Header="header",e.IconLabel="iconLabel",e.Image="image",e.ImageGallery="imageGallery",e.Link="link",e.Modal="modal",e.NavigationFlyout="navigationFlyout",e.NavigationGroup="navigationGroup",e.NavigationLink="navigationLink",e.Page="page",e.Review="review",e.RichText="richText",e.Section="section",e.Spacer="spacer",e.Tab="tab",e.Table="table",e.TableCustomCell="tableCustomCell",e.TableDataCell="tableDataCell",e.TableHeaderCell="tableHeaderCell",e.TableRow="tableRow",e.Tabs="tabs",e.Testimonial="testimonial",e.Text="text",e.ThemeSwitcher="themeSwitcher",e.Video="video",e.FixedHero="fixedHero",e.FlexibleHero="flexibleHero",e.Breadcrumbs="breadcrumbs",e.Footer="footer",e))(i||{});export{t as a,
|
|
7
|
+
`,E=["Accordion","AccordionItem","Badge","Banner","Breadcrumbs","Button","Card","Carousel","Container","Countdown","DemoHero","Divider","Flex","FlexItem","Footer","Grid","GridItem","Header","IconLabel","Image","ImageGallery","Link","Modal","NavigationFlyout","NavigationGroup","NavigationLink","Page","Review","RichText","Section","Spacer","Tab","Table","TableCustomCell","TableDataCell","TableHeaderCell","TableRow","Tabs","Testimonial","Text","ThemeSwitcher","Video"];var i=(e=>(e.Accordion="accordion",e.AccordionItem="accordionItem",e.Badge="badge",e.Banner="banner",e.Button="button",e.Card="card",e.Carousel="carousel",e.Container="container",e.Countdown="countdown",e.Divider="divider",e.Grid="grid",e.GridItem="gridItem",e.Flex="flex",e.FlexItem="flexItem",e.Header="header",e.IconLabel="iconLabel",e.Image="image",e.ImageGallery="imageGallery",e.Link="link",e.Modal="modal",e.NavigationFlyout="navigationFlyout",e.NavigationGroup="navigationGroup",e.NavigationLink="navigationLink",e.Page="page",e.Review="review",e.RichText="richText",e.Section="section",e.Spacer="spacer",e.Tab="tab",e.Table="table",e.TableCustomCell="tableCustomCell",e.TableDataCell="tableDataCell",e.TableHeaderCell="tableHeaderCell",e.TableRow="tableRow",e.Tabs="tabs",e.Testimonial="testimonial",e.Text="text",e.ThemeSwitcher="themeSwitcher",e.Video="video",e.FixedHero="fixedHero",e.FlexibleHero="flexibleHero",e.Breadcrumbs="breadcrumbs",e.Footer="footer",e))(i||{});export{t as a,l as b,a as c,o as d,d as e,T as f,x as g,b as h,g as i,E as j,i as k};
|
|
@@ -0,0 +1 @@
|
|
|
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 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{B as d,D as y,F as n,I as P,M as h,R as E,U as f,Y as g,c as e,g as m,j as l,o as a,r as p,v as i,y as c}from"../../chunk-YA5BXPZL.mjs";import{d as s}from"../../chunk-VW2XC3SE.mjs";import"../../chunk-EOV2LPGC.mjs";import"../../chunk-6TUDWIYU.mjs";import"../../chunk-WAW7PQYM.mjs";import{d as r}from"../../chunk-B2O55EVA.mjs";import{d as t}from"../../chunk-2UV7TQNF.mjs";import"../../chunk-TCQTXNKT.mjs";import"../../chunk-BK7UG4U4.mjs";import"../../chunk-7GVG4HLE.mjs";import"../../chunk-TFA6HYP4.mjs";import"../../chunk-2YTACEBA.mjs";import{b as o}from"../../chunk-MSXDLSXH.mjs";import"../../chunk-RX4IAAQQ.mjs";import"../../chunk-S7CSCIW4.mjs";import"../../chunk-YEKQJ4YC.mjs";var u={accordion:e,banner:r,card:m,carousel:l,countdown:t,flexibleHero:a,footer:p,header:i,imageGallery:c,modal:d,navigationFlyout:y,navigationGroup:n,page:P,review:h,section:E,table:f,tabs:s,testimonial:g},K=u,L=o(u);export{K as default,L as emptyPlaceholderResolver};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as ht,b as Pt,c as Ct}from"../../chunk-
|
|
2
|
-
${a}${p?" "+p:""} (${t} ${o}${i?` Request ID: ${i}`:""})`),this.errorMessage=e,this.fetchMethod=t,this.fetchUri=o,this.statusCode=a,this.statusText=p,this.requestId=i,Object.setPrototypeOf(this,Bt.prototype)}},b=class Ft{constructor(e){ro(this,"options");var t,o,a,p,i;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");let s=e.fetch;if(!s)if(typeof window<"u")s=window.fetch.bind(window);else if(typeof fetch<"u")s=fetch;else throw new Error("You must provide or polyfill a fetch implementation when not in a browser");this.options={...e,fetch:s,apiHost:this.ensureApiHost(e.apiHost),apiKey:(t=e.apiKey)!=null?t:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(a=e.bearerToken)!=null?a:null,limitPolicy:(p=e.limitPolicy)!=null?p:ao,bypassCache:(i=e.bypassCache)!=null?i:!1}}async apiClient(e,t){return(await this.apiClientWithResponse(e,t)).body}async apiClientWithResponse(e,t){return this.options.limitPolicy(async()=>{var o;let a=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`};this.options.bypassCache&&(a["x-bypass-cache"]="true");let{fetch:p,signal:i}=this.options,n=await io(()=>p(e.toString(),{...t,signal:i,headers:{...t?.headers,...a}}));if(!n.ok){let m="";try{let l=await n.text();try{let c=JSON.parse(l);c.errorMessage?m=Array.isArray(c.errorMessage)?c.errorMessage.join(", "):c.errorMessage:m=l}catch{m=l}}catch{m="General error"}throw new no(m,(o=t?.method)!=null?o:"GET",e.toString(),n.status,n.statusText,Ft.getRequestId(n))}return t?.expectNoContent?{response:n,body:null}:{response:n,body:await n.json()}})}createUrl(e,t,o){let a=new URL(`${o??this.options.apiHost}${e}`);return Object.entries(t??{}).forEach(([p,i])=>{var s;typeof i<"u"&&i!==null&&a.searchParams.append(p,Array.isArray(i)?i.join(","):(s=i?.toString())!=null?s:"")}),a}ensureApiHost(e){if(!e)return"https://uniform.app";if(!e?.startsWith("http"))throw new Error('Your apiHost must start with "http"');if(e.indexOf("/",8)>-1)throw new Error("Your apiHost must not contain a path element after the domain");if(e.indexOf("?")>-1)throw new Error("Your apiHost must not contain a query string");return e?.endsWith("/")&&(e=e.substring(0,e.length-1)),e}static getRequestId(e){let t=e.headers.get("apigw-requestid");if(t)return t}};async function io(r){var e;let o=5,a;for(;o>0&&(a=await r(),a.status===429);){let p=0;try{let n=a.clone(),m=n.headers.get("date"),l=m?new Date(m).getTime():void 0,c=await n.json(),u=(e=c?.info)==null?void 0:e.reset;typeof l=="number"&&typeof u=="number"&&(p=Math.max(0,Math.min(Math.round(1.1*(u-l)),1e4)))}catch{}let i=Math.pow(2,5-o)*333,s=i+Math.round(Math.random()*(i/2))*(Math.random()>.5?1:-1);await new Promise(n=>setTimeout(n,p+s)),o-=1}return a}var R,so=class J extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(J,R),{...e,projectId:t});return await this.apiClient(o)}async upsert(e){let t=this.createUrl(P(J,R));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(P(J,R));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};R=new WeakMap;A(so,R,"/api/v2/aggregate");var Me,po=class kt extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(kt,Me),{...e,projectId:t});return await this.apiClient(o)}};Me=new WeakMap;A(po,Me,"/api/v2/dimension");var V,X,Ut=class _ extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(_,V),{...e,projectId:t});return await this.apiClient(o)}async upsertCategory(e){let t=this.createUrl(P(_,V));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(e){let t=this.createUrl(P(_,V));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(e){let t=this.createUrl(P(_,X));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(e){let t=this.createUrl(P(_,X));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};V=new WeakMap;X=new WeakMap;A(Ut,V,"/api/v1/enrichments");A(Ut,X,"/api/v1/enrichment-values");var Oe,mo=class _t extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(_t,Oe),{...e,projectId:t});return await this.apiClient(o)}async publish(){let{projectId:e}=this.options,t=this.createUrl("/api/v1/publish",{siteId:e});await this.apiClient(t,{method:"POST",expectNoContent:!0})}};Oe=new WeakMap;A(mo,Oe,"/api/v2/manifest");var L,lo=class K extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(K,L),{...e,projectId:t});return await this.apiClient(o)}async upsert(e){let t=this.createUrl(P(K,L));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(P(K,L));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};L=new WeakMap;A(lo,L,"/api/v2/quirk");var G,co=class Q extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(Q,G),{...e,projectId:t});return await this.apiClient(o)}async upsert(e){let t=this.createUrl(P(Q,G));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(P(Q,G));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};G=new WeakMap;A(co,G,"/api/v2/signal");var E,uo=class Y extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(Y,E),{...e,projectId:t});return await this.apiClient(o)}async upsert(e){let t=this.createUrl(P(Y,E));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(P(Y,E));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};E=new WeakMap;A(uo,E,"/api/v2/test");import{createVariableReference as ho,parseVariableExpression as Po}from"@uniformdev/canvas";var Rt=r=>{throw TypeError(r)},$e=(r,e,t)=>e.has(r)||Rt("Cannot "+t),Z=(r,e,t)=>($e(r,e,"read from private field"),t?t.call(r):e.get(r)),Vt=(r,e,t)=>e.has(r)?Rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),fo=(r,e,t,o)=>($e(r,e,"write to private field"),o?o.call(r,t):e.set(r,t),t),D=(r,e,t)=>($e(r,e,"access private method"),t);var Lt=class extends b{constructor(r){super(r),this.getProjectMapDefinitions=async()=>{let{projectId:e}=this.options,t=this.createUrl("/api/v1/project-map",{projectId:e});return await this.apiClient(t)},this.getProjectMapDefinition=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map",{...e,projectId:t});return await this.apiClient(o)},this.upsertProjectMap=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map");return(await this.apiClient(o,{method:"PUT",body:JSON.stringify({...e,projectId:t})})).projectMapId},this.deleteProjectMap=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map");await this.apiClient(o,{method:"DELETE",body:JSON.stringify({...e,projectId:t}),expectNoContent:!0})},this.upsertProjectMapNodes=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(o,{method:"PUT",body:JSON.stringify({...e,projectId:t,nodes:e.nodes.map(a=>({...a,node:{...this.cleanProjectMapNode(a.node)}}))}),expectNoContent:!0})},this.deleteProjectMapNode=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(o,{method:"DELETE",body:JSON.stringify({...e,projectId:t}),expectNoContent:!0})},this.getSubtree=async e=>{var t;let o=this.setFetchOptions(e);o.tree="true";let a=this.createUrl("/api/v1/project-map-nodes",o),i={...(await this.apiClient(a)).tree},s=[i];for(;s&&s.length>0;){let n=s.pop(),m;(t=n?.children)==null||t.forEach(l=>{l.parent=je(n),l.previousSibling=je(m),m&&(m.nextSibling=je(l)),m=l,s.push(l)})}return i},this.getNodes=async e=>{let t=this.setFetchOptions(e),o=this.createUrl("/api/v1/project-map-nodes",t);return await this.apiClient(o)}}setFetchOptions(r){let{projectId:e}=this.options,t={projectId:e};return Object.entries(r).forEach(([o,a])=>{if(a!==void 0){if(typeof a=="boolean"){if(!a)return;t[o]="true";return}if(typeof a=="number"){t[o]=a.toString(10);return}t[o]=a}}),t}cleanProjectMapNode(r){var e,t,o;return{id:((o=(t=(e=r.id)==null?void 0:e.match(/^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i))==null?void 0:t.length)!=null?o:0)==1?r.id:void 0,path:r.path,name:r.name,type:r.type,order:r.order,data:r.data,compositionId:r.compositionId,description:r.description,locales:r.locales}}};var je=r=>r?{...r,parent:void 0,children:void 0}:void 0;var F,k,We,ee,ze=class N{constructor(e){this.route=e,Vt(this,F);var t;fo(this,F,D(t=N,k,We).call(t,this.route))}get dynamicSegmentCount(){return Z(this,F).segments.reduce((e,t)=>{var o;return D(o=N,k,ee).call(o,t)?e+1:e},0)}matches(e){var t,o;let{segments:a,queryParams:p}=D(t=N,k,We).call(t,e),{segments:i}=Z(this,F);if(a.length!==i.length)return{match:!1};let s={match:!0,dynamicSegmentCount:0,pathParams:{},queryParams:{}};for(let n=0;n<i.length;n++){let m=i[n],l=a[n];if(D(o=N,k,ee).call(o,m)){let c=m.slice(1);s.pathParams[c]=l,s.dynamicSegmentCount++}else if(m!==l)return{match:!1}}for(let[n,m]of Z(this,F).queryParams)s.queryParams[n]=p.has(n)?p.get(n):m;return s}expand(e){let{dynamicInputValues:t={},allowedQueryParams:o=[],doNotEscapeVariables:a=!1}=e??{},p=Z(this,F).segments.map(n=>{let m=N.getDynamicRouteSegmentName(n);if(!m)return n;let l=t[m];return l?He(l,a):n}).join("/"),i=o.filter(n=>{let m=typeof t[n];return m==="string"||m==="number"||m==="boolean"}).map(n=>`${He(n,a)}=${He(t[n],a)}`),s=i.length?`?${i.join("&")}`:"";return`/${p}${s}`}static getDynamicRouteSegmentName(e){var t;if(D(t=N,k,ee).call(t,e))return e.slice(N.dynamicSegmentPrefix.length)}};F=new WeakMap;k=new WeakSet;We=function(r){if(!r.startsWith("/")||r==="")throw new Error(`Path must start with a slash: ${r}`);let[e,t]=r.split("?"),o=e.substring(1).split("/");o[o.length-1]===""&&o.pop();let a=new URLSearchParams(t);return{segments:o,queryParams:a}};ee=function(r){return r?r.startsWith(ze.dynamicSegmentPrefix):!1};Vt(ze,k);ze.dynamicSegmentPrefix=":";function He(r,e){if(!e)return encodeURIComponent(r);let t=[];return Po(r.toString(10),(o,a)=>{a==="variable"?t.push(ho(o)):t.push(encodeURIComponent(o))}),t.join("")}import{jsx as te}from"react/jsx-runtime";var Gt=r=>{switch(r){case"slash":return te("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:te("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 20.247 6-16.5"})});case"chevron":default:return te("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:te("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})}};import{jsx as U,jsxs as yo}from"react/jsx-runtime";var Dt=async({separator:r,links:e,size:t,color:o,font:a,transform:p,autoGenerate:i,context:s})=>{let n=!s?.matchedRoute||s?.matchedRoute==="composition",c=i?await(async()=>{if(n)return[];let u=new Lt({projectId:process.env.UNIFORM_PROJECT_ID,apiKey:process.env.UNIFORM_API_KEY}),{nodes:f}=await u.getNodes({path:s?.matchedRoute,includeAncestors:!0});return f?.length?Promise.all(f.map(async d=>{let y=d.pathSegment?.includes(":")&&d.compositionId?await new Co({projectId:process.env.UNIFORM_PROJECT_ID,apiKey:process.env.UNIFORM_API_KEY}).getCompositionById({compositionId:d.compositionId}).then(({composition:I})=>I&&Et(I)?.pageTitle||d.name).catch(()=>d.name):d.name,B=d.type==="placeholder"?void 0:j(d.path,s.dynamicInputs);return{title:y,link:B}})):[]})():await(async()=>e?.reduce((u,f)=>{let{title:d,link:x}=Et(f);return d?[...u,{title:d,link:T(x)}]:u},[])||[])();return n&&i?U("ul",{className:"flex items-center",children:U("li",{className:"flex items-center",children:U(v,{size:t,font:a,color:o,transform:p,children:"Breadcrumbs cannot be auto-generated because the project map is not accessible in this context."})})}):c.length?U("ul",{className:h("flex items-center",{[`text-${t}`]:!!t,[`text-${o}`]:!!o}),children:c.map(({title:u,link:f},d)=>yo("li",{className:"flex items-center",children:[!!d&&U("div",{className:"mx-2 size-[1em]",children:Gt(r)}),f?U(W,{variant:"link",textColor:o,className:h({[`font-${a}`]:!!a,[`text-${t}`]:!!t,[p||""]:!!p}),href:f,children:u}):U(v,{size:t,font:a,color:o,transform:p,children:u})]},`${u}-${d}`))}):null};var qe=Dt;import{useMemo as xo}from"react";import{UniformText as go}from"@uniformdev/canvas-next-rsc/component";import{jsx as re}from"react/jsx-runtime";var Mt=({component:r,context:e,link:t,textColor:o,textFont:a,textWeight:p,textTransform:i,buttonColor:s,icon:n,iconPosition:m,border:l,size:c,textSize:u,hoverButtonColor:f,hoverTextColor:d,className:x,onClick:y,text:B})=>{let I=T(t),g=e.previewMode==="editor"&&e?.isContextualEditing,w=xo(()=>{let[Pe]=C(n),{url:O,title:gr=""}=Pe||{};if(O)return{url:O,title:gr}},[n]),fe=()=>{if(!w)return;let{url:Pe,title:O}=w;return re(S,{src:Pe,alt:O,width:20,height:20,containerStyle:{width:"20px",height:"20px"}})};return!(!!B||!!w)&&!g?null:re(W,{variant:r.variant,href:I,border:l,size:c,onClick:y,className:x,textSize:u,isActive:e.matchedRoute===I,textColor:o,textFont:a,textWeight:p,textTransform:i,buttonColor:s,hoverButtonColor:f,hoverTextColor:d,icon:re(fe,{}),iconPosition:m,children:re(go,{placeholder:"Button text goes here",parameterId:"text",component:r,context:e})})};var Je=Mt;import{UniformSlot as vo}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ot}from"react/jsx-runtime";var oe=({displayName:r,anchor:e,slots:t,component:o,context:a,backgroundColor:p,spacing:i,border:s,fluidContent:n,height:m,className:l})=>Ot(ct,{title:r,id:e,backgroundColor:p,spacing:i,border:s,fluidContent:n,height:m,className:l,children:Ot(vo,{data:o,context:a,slot:t.containerContent})});var jt=(e=>(e.ContainerContent="containerContent",e))(jt||{});import{jsx as Ht}from"react/jsx-runtime";var ae=({color:r,thickness:e,width:t,alignment:o})=>Ht("div",{className:h("flex w-full",`justify-${o||"center"}`),children:Ht("div",{className:h({[`bg-${r}`]:!!r}),style:{width:t,height:e}})});import{UniformSlot as bo}from"@uniformdev/canvas-next-rsc/component";import{jsx as Wt}from"react/jsx-runtime";var $t=({direction:r,justifyContent:e,gap:t,alignItems:o,backgroundColor:a,spacing:p,border:i,fluidContent:s,slots:n,component:m,context:l,className:c,height:u,wrapperClassName:f})=>Wt(ht,{direction:r,justifyContent:e,gap:t,alignItems:o,backgroundColor:a,spacing:p,border:i,fluidContent:s,height:u,wrapperClassName:f,className:c,children:Wt(bo,{data:m,context:l,slot:n.flexItem})});var Ke=$t;import{UniformSlot as Io}from"@uniformdev/canvas-next-rsc/component";import{jsx as zt}from"react/jsx-runtime";var ne=({alignSelf:r,shrink:e,context:t,component:o,slots:a})=>zt(Pt,{alignSelf:r,shrink:e,children:zt(Io,{data:o,context:t,slot:a.inner})});import{UniformSlot as wo}from"@uniformdev/canvas-next-rsc/component";import{jsx as qt}from"react/jsx-runtime";var Jt=({columnsCount:r,gapX:e,gapY:t,backgroundColor:o,spacing:a,border:p,fluidContent:i,height:s,slots:n,component:m,context:l,className:c})=>qt(dt,{className:c,columnsCount:r,gapX:e,gapY:t,backgroundColor:o,spacing:a,border:p,fluidContent:i,height:s,children:qt(wo,{data:m,context:l,slot:n.gridInner})});var Kt=(e=>(e.GridInner="gridInner",e))(Kt||{}),Qe=Jt;import{UniformSlot as To}from"@uniformdev/canvas-next-rsc/component";import{jsx as Qt}from"react/jsx-runtime";var Yt=({columnStart:r,columnSpan:e,rowStart:t,className:o,rowSpan:a,context:p,component:i,slots:s})=>Qt(ut,{columnStart:r,columnSpan:e,rowStart:t,rowSpan:a,className:o,children:Qt(To,{data:i,context:p,slot:s.inner})});var Xt=(e=>(e.Inner="inner",e))(Xt||{}),Ye=Yt;import{UniformText as So}from"@uniformdev/canvas-next-rsc/component";import{jsx as Xe}from"react/jsx-runtime";var Zt=({icon:r,size:e,tag:t,color:o,weight:a,font:p,transform:i,decoration:s,letterSpacing:n,alignment:m,component:l,context:c})=>{let[u]=C(r),{url:f,title:d=""}=u||{};return Xe(q,{icon:f?Xe(S,{src:f,alt:d,fill:!0}):void 0,size:e,tag:t,color:o,weight:a,font:p,transform:i,decoration:s,letterSpacing:n,alignment:m,children:Xe(So,{placeholder:"Text goes here",parameterId:"text",component:l,context:c})})};var Ze=Zt;import{imageFrom as Ao}from"@uniformdev/assets";import{jsx as ie}from"react/jsx-runtime";var se=async({image:r,objectFit:e,width:t,height:o,overlayColor:a,overlayOpacity:p,border:i,priority:s,fill:n,unoptimized:m,context:l,component:c})=>{let[u]=C(r);if(!u){let g=l.previewMode==="editor"&&l.isContextualEditing,w=c?._id?.includes("placeholder_");return!g||w||!c.variant?null:ie("div",{style:{width:t?`${t}px`:"auto",height:o?`${o}px`:"auto"},children:ie($,{type:"image",placeholder:"Please add an asset to display an image"})})}let{focalPoint:f,title:d=""}=u,x=t||u.width,y=o||u.height;if(!n&&(!x||!y))return console.warn("No dimensions provided for the Next.js Image component. Falling back to a standard <img> tag for rendering."),ie("img",{src:u.url,alt:d});let B=Ao(u?.url).transform({width:t,height:o,fit:e,focal:f}).url();return ie(S,{src:B,alt:d,unoptimized:m,priority:s,sizes:"100%",style:{objectFit:e},overlayColor:a,overlayOpacity:p,border:i,...n?{fill:!0}:{width:x,height:y}})};import{UniformSlot as No}from"@uniformdev/canvas-next-rsc/component";import{jsx as er}from"react/jsx-runtime";var tr=({component:r,context:e,slots:t,link:o,openInNewTab:a})=>er(H,{link:T(o),openInNewTab:a,children:er(No,{data:r,context:e,slot:t.linkContent})});var rr=(e=>(e.LinkContent="linkContent",e))(rr||{}),et=tr;import{UniformText as Bo}from"@uniformdev/canvas-next-rsc/component";import{jsx as or}from"react/jsx-runtime";var ar=({href:r,isExternalLink:e,children:t})=>r?or(H,{className:"cursor-pointer hover:no-underline",link:r,openInNewTab:e,rel:e?"noopener noreferrer":"",children:t}):or("div",{className:"cursor-pointer",children:t});import{jsx as M}from"react/jsx-runtime";var nr=({icon:r,link:e,activeState:t,size:o,tag:a,color:p,weight:i,font:s,transform:n,decoration:m,letterSpacing:l,alignment:c,component:u,context:f,hoverEffect:d="",className:x})=>{let y=T(e),B=t&&j(f.matchedRoute,f.dynamicInputs)===y,[I]=C(r),{url:g,title:w=""}=I||{},fe=()=>g?g.endsWith(".svg")?M(ft,{src:g,alt:w,fill:!0}):M(S,{src:g,alt:w,fill:!0}):null,he=h("transition-all duration-150",{[Ce(d,"group-hover:{value}")]:!!d,[Ce(d,"{value}")]:!!d&&B});return M(ar,{href:y,isExternalLink:lt(y),children:M(q,{icon:fe(),className:h("group",x),iconClassName:he,textClassName:he,size:o,tag:a,color:p,weight:i,font:s,transform:n,decoration:m,letterSpacing:l,alignment:c,children:M(Bo,{placeholder:"Text goes here",parameterId:"text",className:"whitespace-nowrap",component:u,context:f})})})};var tt=nr;import{UniformRichText as Fo}from"@uniformdev/canvas-next-rsc/component";import{jsx as ir}from"react/jsx-runtime";var sr=({color:r,lineCountRestrictions:e,font:t,component:o,className:a})=>ir(v,{lineCountRestrictions:e,color:r,font:t,children:ir(Fo,{className:h("prose max-w-full marker:text-current [&_*:not(pre)]:text-current",a),parameterId:"text",component:o,placeholder:"Rich text content goes here..."})});var rt=sr;import{jsx as ko}from"react/jsx-runtime";var pe=({size:r,component:{variant:e}})=>{let t=e==="horizontal";return ko("div",{className:h({[`w-${r}`]:t,[`h-${r}`]:!t})})};var ot=(e=>(e.Horizontal="horizontal",e))(ot||{});import{UniformSlot as Uo}from"@uniformdev/canvas-next-rsc/component";import{jsx as _o}from"react/jsx-runtime";var pr=({slots:r,component:e,context:t})=>_o(Uo,{data:e,context:t,slot:r.tabContent});var mr=(e=>(e.TabContent="tabContent",e))(mr||{}),at=pr;import{UniformSlot as Ro}from"@uniformdev/canvas-next-rsc/component";import{jsx as nt}from"react/jsx-runtime";var me=({component:r,context:e,slots:t,alignment:o})=>nt("td",{children:nt("div",{className:h("w-fit",lr[o||"left"]),children:nt(Ro,{slot:t.tableCustomCellContent,context:e,data:r})})});var lr={left:"ml-0",center:"mx-auto",right:"ml-auto"},cr=(e=>(e.TableCustomCellContent="tableCustomCellContent",e))(cr||{});import{UniformText as Vo}from"@uniformdev/canvas-next-rsc/component";import{jsx as dr}from"react/jsx-runtime";var le=({component:r,context:e})=>dr("td",{children:dr(Vo,{component:r,context:e,parameterId:"value",placeholder:"Value"})});import{UniformText as Lo}from"@uniformdev/canvas-next-rsc/component";import{jsx as ur}from"react/jsx-runtime";var ce=({component:r,context:e})=>ur("th",{children:ur(Lo,{component:r,context:e,parameterId:"value",placeholder:"Value"})});import{UniformSlot as Go}from"@uniformdev/canvas-next-rsc/component";import{jsx as fr}from"react/jsx-runtime";var de=({slots:r,component:e,context:t})=>fr("tr",{children:fr(Go,{data:e,context:t,slot:r.tableRowCells})});import{UniformText as Eo}from"@uniformdev/canvas-next-rsc/component";import{jsx as hr}from"react/jsx-runtime";var Pr=({tag:r,size:e,color:t,weight:o,font:a,transform:p,decoration:i,letterSpacing:s,lineCountRestrictions:n,alignment:m,component:l,context:c})=>hr(v,{color:t,size:e,font:a,weight:o,transform:p,decoration:i,letterSpacing:s,alignment:m,lineCountRestrictions:n,children:hr(Eo,{placeholder:"Text goes here",parameterId:"text",as:r||void 0,component:l,context:c})});var it=Pr;import Do from"next/dynamic";var st=Do(()=>import("../../theme-switcher-WO5JIV2W.mjs").then(r=>r.ThemeSwitcher));import{jsx as Mo}from"react/jsx-runtime";var Cr=({context:r,component:e})=>{let t=r.previewMode==="editor"&&r.isContextualEditing,o=e?._id?.includes("placeholder_");return!t||o?null:Mo($,{type:"video",placeholder:"Please add video link to display a video"})};import{jsx as yr}from"react/jsx-runtime";var ue=({video:r,placeholderImage:e,autoPlay:t,lazyLoad:o,loop:a,controls:p,muted:i,overlayColor:s,overlayOpacity:n,border:m,component:l,context:c})=>{let[u]=C(r),[f]=C(e),d=u?.url;return d?yr(Ct,{url:d,placeholderImageUrl:f?.url,autoPlay:t,lazyLoad:o,loop:a,controls:p,muted:i,overlayColor:s,overlayOpacity:n,border:m}):yr(Cr,{component:l,context:c})};var xr={accordion:{component:ye},accordionItem:{component:Ve},badge:{component:Ge},banner:{component:xe},button:{component:Je},card:{component:ge},carousel:{component:ve},container:{component:oe},countdown:{component:be},divider:{component:ae},grid:{component:Qe},gridItem:{component:Ye},flex:{component:Ke},flexItem:{component:ne},header:{component:we},section:{component:ke},iconLabel:{component:Ze},image:{component:se},page:{component:Be},richText:{component:rt},spacer:{component:pe},text:{component:it},video:{component:ue},tabs:{component:_e},tab:{component:at},table:{component:Ue},tableRow:{component:de},tableHeaderCell:{component:ce},tableDataCell:{component:le},tableCustomCell:{component:me},modal:{component:Se},imageGallery:{component:Te},testimonial:{component:Re},breadcrumbs:{component:qe},review:{component:Fe},navigationLink:{component:tt},navigationGroup:{component:Ne},navigationFlyout:{component:Ae},footer:{component:Ie},themeSwitcher:{component:st},link:{component:et},fixedHero:{component:z.FixedHero},flexibleHero:{component:z.FlexibleHero}},tp=xr,rp=mt(xr);export{ye as Accordion,Ve as AccordionItem,yt as AccordionItemSlots,br as AccordionSlots,Ge as Badge,xe as Banner,Ir as BannerContentAlignment,wr as BannerSlots,qe as Breadcrumbs,Je as Button,ge as Card,Sr as CardSlots,Tr as CardVariants,ve as Carousel,Ar as CarouselSlots,Er as CommonPageSlots,oe as Container,jt as ContainerSlots,be as Countdown,Nr as CountdownSlots,Br as CountdownVariants,z as DemoHero,Fr as DemoHeroContentAlignment,kr as DemoHeroVariants,ae as Divider,Ke as Flex,ne as FlexItem,Ur as FlexibleHeroSlots,Ie as Footer,_r as FooterSlots,Qe as Grid,Ye as GridItem,Xt as GridItemSlots,Kt as GridSlots,we as Header,Rr as HeaderSlots,Vr as HeaderVariants,Ze as IconLabel,se as Image,Te as ImageGallery,Lr as ImageGallerySlots,et as Link,rr as LinkSlots,Se as Modal,Gr as ModalSlots,Ae as NavigationFlyout,Ne as NavigationGroup,tt as NavigationLink,Be as Page,Fe as Review,Mr as ReviewSlots,Dr as ReviewVariants,rt as RichText,ke as Section,Or as SectionContentAlignment,Hr as SectionSlots,jr as SectionVariants,pe as Spacer,ot as SpacerVariants,at as Tab,mr as TabSlots,Ue as Table,me as TableCustomCell,cr as TableCustomCellSlots,le as TableDataCell,ce as TableHeaderCell,de as TableRow,Wr as TableSlots,_e as Tabs,zr as TabsSlots,$r as TabsVariants,Re as Testimonial,Jr as TestimonialSlots,qr as TestimonialVariants,it as Text,st as ThemeSwitcher,ue as Video,rp as componentResolver,xr as cskComponentsMapping,tp as default};
|
|
1
|
+
import{a as ht,b as Pt,c as Ct}from"../../chunk-FIN5US3Q.mjs";import{a as q,b as ft}from"../../chunk-RYEXR67P.mjs";import{a as mt}from"../../chunk-56OQGKRM.mjs";import{A as Se,C as Ae,E as Ne,G as Be,H as Er,J as Fe,K as Dr,L as Mr,N as ke,O as Or,P as jr,Q as Hr,S as Ue,T as Wr,V as Re,W as qr,X as Jr,a as ye,b as br,d as ge,e as Tr,f as Sr,h as Ar,i as ve,k as Fr,l as kr,m as Ur,n as z,p as _r,q as Ie,s as Rr,t as Vr,u as we,w as Lr,x as Te,z as Gr}from"../../chunk-YA5BXPZL.mjs";import{a as $r,b as zr,c as _e}from"../../chunk-VW2XC3SE.mjs";import{b as H,c as W,e as $}from"../../chunk-EOV2LPGC.mjs";import"../../chunk-6TUDWIYU.mjs";import{a as v}from"../../chunk-WAW7PQYM.mjs";import{a as Ir,b as wr,c as xe}from"../../chunk-B2O55EVA.mjs";import{a as Nr,b as Br,c as be}from"../../chunk-2UV7TQNF.mjs";import{a as dt,b as ut}from"../../chunk-TCQTXNKT.mjs";import{a as S}from"../../chunk-BK7UG4U4.mjs";import{a as ct}from"../../chunk-7GVG4HLE.mjs";import"../../chunk-TFA6HYP4.mjs";import{a as C}from"../../chunk-2YTACEBA.mjs";import"../../chunk-MSXDLSXH.mjs";import{a as j,c as T,d as lt}from"../../chunk-RX4IAAQQ.mjs";import{a as Ce,c as h}from"../../chunk-S7CSCIW4.mjs";import{a as pt,b as vr}from"../../chunk-YEKQJ4YC.mjs";var wt=pt((oa,It)=>{"use strict";var Ee=class{constructor(e){this.value=e,this.next=void 0}},De=class{constructor(){this.clear()}enqueue(e){let t=new Ee(e);this._head?(this._tail.next=t,this._tail=t):(this._head=t,this._tail=t),this._size++}dequeue(){let e=this._head;if(e)return this._head=this._head.next,this._size--,e.value}clear(){this._head=void 0,this._tail=void 0,this._size=0}get size(){return this._size}*[Symbol.iterator](){let e=this._head;for(;e;)yield e.value,e=e.next}};It.exports=De});var St=pt((aa,Tt)=>{"use strict";var Xr=wt(),Zr=r=>{if(!((Number.isInteger(r)||r===1/0)&&r>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up");let e=new Xr,t=0,o=()=>{t--,e.size>0&&e.dequeue()()},a=async(s,n,...m)=>{t++;let l=(async()=>s(...m))();n(l);try{await l}catch{}o()},p=(s,n,...m)=>{e.enqueue(a.bind(null,s,n,...m)),(async()=>(await Promise.resolve(),t<r&&e.size>0&&e.dequeue()()))()},i=(s,...n)=>new Promise(m=>{p(s,m,...n)});return Object.defineProperties(i,{activeCount:{get:()=>t},pendingCount:{get:()=>e.size},clearQueue:{value:()=>{e.clear()}}}),i};Tt.exports=Zr});import Kr from"next/dynamic";var yt=(e=>(e.AccordionItemContent="accordionItemContent",e))(yt||{}),Ve=Kr(()=>import("../../accordion-item-Y4PSNOH4.mjs").then(r=>r.AccordionItem));import{UniformText as Qr}from"@uniformdev/canvas-next-rsc/component";import{jsx as xt}from"react/jsx-runtime";var gt=({className:r,...e})=>xt("svg",{viewBox:"0 0 6 6","aria-hidden":"true",className:h("w-1.5 h-1.5",r),...e,children:xt("circle",{r:"3",cx:"3",cy:"3"})});var vt=({pill:r,size:e,dotColor:t,borderColor:o,backgroundColor:a})=>h("inline-flex items-center w-fit",{"rounded-full":r,"rounded-md":!r,"gap-x-1.5":!!t,[`ring-1 ring-inset ring-${o}`]:!!o,[`bg-${a}`]:!!a,[`p-${e}`]:e});import{jsx as Le,jsxs as Yr}from"react/jsx-runtime";var bt=({component:r,context:e,textColor:t,backgroundColor:o,borderColor:a,dotColor:p,pill:i=!1,size:s})=>Yr("div",{className:vt({pill:i,size:s,dotColor:p,borderColor:a,backgroundColor:o}),children:[p&&Le(gt,{className:h({[`fill-${p}`]:p})}),Le(v,{color:t,size:"xs",children:Le(Qr,{placeholder:"Badge text goes here",parameterId:"text",component:r,context:e})})]});var Ge=bt;import{flattenValues as Et,CanvasClient as Co}from"@uniformdev/canvas";var Nt=vr(St(),1),eo=Object.defineProperty,At=r=>{throw TypeError(r)},to=(r,e,t)=>e in r?eo(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t,ro=(r,e,t)=>to(r,typeof e!="symbol"?e+"":e,t),oo=(r,e,t)=>e.has(r)||At("Cannot "+t),P=(r,e,t)=>(oo(r,e,"read from private field"),t?t.call(r):e.get(r)),A=(r,e,t)=>e.has(r)?At("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t);var ao=(0,Nt.default)(6),no=class Bt extends Error{constructor(e,t,o,a,p,i){super(`${e}
|
|
2
|
+
${a}${p?" "+p:""} (${t} ${o}${i?` Request ID: ${i}`:""})`),this.errorMessage=e,this.fetchMethod=t,this.fetchUri=o,this.statusCode=a,this.statusText=p,this.requestId=i,Object.setPrototypeOf(this,Bt.prototype)}},b=class Ft{constructor(e){ro(this,"options");var t,o,a,p,i;if(!e.apiKey&&!e.bearerToken)throw new Error("You must provide an API key or a bearer token");let s=e.fetch;if(!s)if(typeof window<"u")s=window.fetch.bind(window);else if(typeof fetch<"u")s=fetch;else throw new Error("You must provide or polyfill a fetch implementation when not in a browser");this.options={...e,fetch:s,apiHost:this.ensureApiHost(e.apiHost),apiKey:(t=e.apiKey)!=null?t:null,projectId:(o=e.projectId)!=null?o:null,bearerToken:(a=e.bearerToken)!=null?a:null,limitPolicy:(p=e.limitPolicy)!=null?p:ao,bypassCache:(i=e.bypassCache)!=null?i:!1}}async apiClient(e,t){return(await this.apiClientWithResponse(e,t)).body}async apiClientWithResponse(e,t){return this.options.limitPolicy(async()=>{var o;let a=this.options.apiKey?{"x-api-key":this.options.apiKey}:{Authorization:`Bearer ${this.options.bearerToken}`};this.options.bypassCache&&(a["x-bypass-cache"]="true");let{fetch:p,signal:i}=this.options,n=await io(()=>p(e.toString(),{...t,signal:i,headers:{...t?.headers,...a}}));if(!n.ok){let m="";try{let l=await n.text();try{let d=JSON.parse(l);d.errorMessage?m=Array.isArray(d.errorMessage)?d.errorMessage.join(", "):d.errorMessage:m=l}catch{m=l}}catch{m="General error"}throw new no(m,(o=t?.method)!=null?o:"GET",e.toString(),n.status,n.statusText,Ft.getRequestId(n))}return t?.expectNoContent?{response:n,body:null}:{response:n,body:await n.json()}})}createUrl(e,t,o){let a=new URL(`${o??this.options.apiHost}${e}`);return Object.entries(t??{}).forEach(([p,i])=>{var s;typeof i<"u"&&i!==null&&a.searchParams.append(p,Array.isArray(i)?i.join(","):(s=i?.toString())!=null?s:"")}),a}ensureApiHost(e){if(!e)return"https://uniform.app";if(!e?.startsWith("http"))throw new Error('Your apiHost must start with "http"');if(e.indexOf("/",8)>-1)throw new Error("Your apiHost must not contain a path element after the domain");if(e.indexOf("?")>-1)throw new Error("Your apiHost must not contain a query string");return e?.endsWith("/")&&(e=e.substring(0,e.length-1)),e}static getRequestId(e){let t=e.headers.get("apigw-requestid");if(t)return t}};async function io(r){var e;let o=5,a;for(;o>0&&(a=await r(),a.status===429);){let p=0;try{let n=a.clone(),m=n.headers.get("date"),l=m?new Date(m).getTime():void 0,d=await n.json(),u=(e=d?.info)==null?void 0:e.reset;typeof l=="number"&&typeof u=="number"&&(p=Math.max(0,Math.min(Math.round(1.1*(u-l)),1e4)))}catch{}let i=Math.pow(2,5-o)*333,s=i+Math.round(Math.random()*(i/2))*(Math.random()>.5?1:-1);await new Promise(n=>setTimeout(n,p+s)),o-=1}return a}var R,so=class J extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(J,R),{...e,projectId:t});return await this.apiClient(o)}async upsert(e){let t=this.createUrl(P(J,R));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(P(J,R));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};R=new WeakMap;A(so,R,"/api/v2/aggregate");var Me,po=class kt extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(kt,Me),{...e,projectId:t});return await this.apiClient(o)}};Me=new WeakMap;A(po,Me,"/api/v2/dimension");var V,X,Ut=class _ extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(_,V),{...e,projectId:t});return await this.apiClient(o)}async upsertCategory(e){let t=this.createUrl(P(_,V));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeCategory(e){let t=this.createUrl(P(_,V));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async upsertValue(e){let t=this.createUrl(P(_,X));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async removeValue(e){let t=this.createUrl(P(_,X));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};V=new WeakMap;X=new WeakMap;A(Ut,V,"/api/v1/enrichments");A(Ut,X,"/api/v1/enrichment-values");var Oe,mo=class _t extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(_t,Oe),{...e,projectId:t});return await this.apiClient(o)}async publish(){let{projectId:e}=this.options,t=this.createUrl("/api/v1/publish",{siteId:e});await this.apiClient(t,{method:"POST",expectNoContent:!0})}};Oe=new WeakMap;A(mo,Oe,"/api/v2/manifest");var L,lo=class K extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(K,L),{...e,projectId:t});return await this.apiClient(o)}async upsert(e){let t=this.createUrl(P(K,L));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(P(K,L));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};L=new WeakMap;A(lo,L,"/api/v2/quirk");var G,co=class Q extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(Q,G),{...e,projectId:t});return await this.apiClient(o)}async upsert(e){let t=this.createUrl(P(Q,G));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(P(Q,G));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};G=new WeakMap;A(co,G,"/api/v2/signal");var E,uo=class Y extends b{constructor(e){super(e)}async get(e){let{projectId:t}=this.options,o=this.createUrl(P(Y,E),{...e,projectId:t});return await this.apiClient(o)}async upsert(e){let t=this.createUrl(P(Y,E));await this.apiClient(t,{method:"PUT",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}async remove(e){let t=this.createUrl(P(Y,E));await this.apiClient(t,{method:"DELETE",body:JSON.stringify({...e,projectId:this.options.projectId}),expectNoContent:!0})}};E=new WeakMap;A(uo,E,"/api/v2/test");import{createVariableReference as ho,parseVariableExpression as Po}from"@uniformdev/canvas";var Rt=r=>{throw TypeError(r)},$e=(r,e,t)=>e.has(r)||Rt("Cannot "+t),Z=(r,e,t)=>($e(r,e,"read from private field"),t?t.call(r):e.get(r)),Vt=(r,e,t)=>e.has(r)?Rt("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),fo=(r,e,t,o)=>($e(r,e,"write to private field"),o?o.call(r,t):e.set(r,t),t),D=(r,e,t)=>($e(r,e,"access private method"),t);var Lt=class extends b{constructor(r){super(r),this.getProjectMapDefinitions=async()=>{let{projectId:e}=this.options,t=this.createUrl("/api/v1/project-map",{projectId:e});return await this.apiClient(t)},this.getProjectMapDefinition=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map",{...e,projectId:t});return await this.apiClient(o)},this.upsertProjectMap=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map");return(await this.apiClient(o,{method:"PUT",body:JSON.stringify({...e,projectId:t})})).projectMapId},this.deleteProjectMap=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map");await this.apiClient(o,{method:"DELETE",body:JSON.stringify({...e,projectId:t}),expectNoContent:!0})},this.upsertProjectMapNodes=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(o,{method:"PUT",body:JSON.stringify({...e,projectId:t,nodes:e.nodes.map(a=>({...a,node:{...this.cleanProjectMapNode(a.node)}}))}),expectNoContent:!0})},this.deleteProjectMapNode=async e=>{let{projectId:t}=this.options,o=this.createUrl("/api/v1/project-map-nodes");await this.apiClient(o,{method:"DELETE",body:JSON.stringify({...e,projectId:t}),expectNoContent:!0})},this.getSubtree=async e=>{var t;let o=this.setFetchOptions(e);o.tree="true";let a=this.createUrl("/api/v1/project-map-nodes",o),i={...(await this.apiClient(a)).tree},s=[i];for(;s&&s.length>0;){let n=s.pop(),m;(t=n?.children)==null||t.forEach(l=>{l.parent=je(n),l.previousSibling=je(m),m&&(m.nextSibling=je(l)),m=l,s.push(l)})}return i},this.getNodes=async e=>{let t=this.setFetchOptions(e),o=this.createUrl("/api/v1/project-map-nodes",t);return await this.apiClient(o)}}setFetchOptions(r){let{projectId:e}=this.options,t={projectId:e};return Object.entries(r).forEach(([o,a])=>{if(a!==void 0){if(typeof a=="boolean"){if(!a)return;t[o]="true";return}if(typeof a=="number"){t[o]=a.toString(10);return}t[o]=a}}),t}cleanProjectMapNode(r){var e,t,o;return{id:((o=(t=(e=r.id)==null?void 0:e.match(/^[0-9A-F]{8}-[0-9A-F]{4}-[4][0-9A-F]{3}-[89AB][0-9A-F]{3}-[0-9A-F]{12}$/i))==null?void 0:t.length)!=null?o:0)==1?r.id:void 0,path:r.path,name:r.name,type:r.type,order:r.order,data:r.data,compositionId:r.compositionId,description:r.description,locales:r.locales}}};var je=r=>r?{...r,parent:void 0,children:void 0}:void 0;var F,k,We,ee,ze=class N{constructor(e){this.route=e,Vt(this,F);var t;fo(this,F,D(t=N,k,We).call(t,this.route))}get dynamicSegmentCount(){return Z(this,F).segments.reduce((e,t)=>{var o;return D(o=N,k,ee).call(o,t)?e+1:e},0)}matches(e){var t,o;let{segments:a,queryParams:p}=D(t=N,k,We).call(t,e),{segments:i}=Z(this,F);if(a.length!==i.length)return{match:!1};let s={match:!0,dynamicSegmentCount:0,pathParams:{},queryParams:{}};for(let n=0;n<i.length;n++){let m=i[n],l=a[n];if(D(o=N,k,ee).call(o,m)){let d=m.slice(1);s.pathParams[d]=l,s.dynamicSegmentCount++}else if(m!==l)return{match:!1}}for(let[n,m]of Z(this,F).queryParams)s.queryParams[n]=p.has(n)?p.get(n):m;return s}expand(e){let{dynamicInputValues:t={},allowedQueryParams:o=[],doNotEscapeVariables:a=!1}=e??{},p=Z(this,F).segments.map(n=>{let m=N.getDynamicRouteSegmentName(n);if(!m)return n;let l=t[m];return l?He(l,a):n}).join("/"),i=o.filter(n=>{let m=typeof t[n];return m==="string"||m==="number"||m==="boolean"}).map(n=>`${He(n,a)}=${He(t[n],a)}`),s=i.length?`?${i.join("&")}`:"";return`/${p}${s}`}static getDynamicRouteSegmentName(e){var t;if(D(t=N,k,ee).call(t,e))return e.slice(N.dynamicSegmentPrefix.length)}};F=new WeakMap;k=new WeakSet;We=function(r){if(!r.startsWith("/")||r==="")throw new Error(`Path must start with a slash: ${r}`);let[e,t]=r.split("?"),o=e.substring(1).split("/");o[o.length-1]===""&&o.pop();let a=new URLSearchParams(t);return{segments:o,queryParams:a}};ee=function(r){return r?r.startsWith(ze.dynamicSegmentPrefix):!1};Vt(ze,k);ze.dynamicSegmentPrefix=":";function He(r,e){if(!e)return encodeURIComponent(r);let t=[];return Po(r.toString(10),(o,a)=>{a==="variable"?t.push(ho(o)):t.push(encodeURIComponent(o))}),t.join("")}import{jsx as te}from"react/jsx-runtime";var Gt=r=>{switch(r){case"slash":return te("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:te("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 20.247 6-16.5"})});case"chevron":default:return te("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:te("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})}};import{jsx as U,jsxs as yo}from"react/jsx-runtime";var Dt=async({separator:r,links:e,size:t,color:o,font:a,transform:p,autoGenerate:i,context:s})=>{let n=!s?.matchedRoute||s?.matchedRoute==="composition",d=i?await(async()=>{if(n)return[];let u=new Lt({projectId:process.env.UNIFORM_PROJECT_ID,apiKey:process.env.UNIFORM_API_KEY}),{nodes:f}=await u.getNodes({path:s?.matchedRoute,includeAncestors:!0});return f?.length?Promise.all(f.map(async c=>{let y=c.pathSegment?.includes(":")&&c.compositionId?await new Co({projectId:process.env.UNIFORM_PROJECT_ID,apiKey:process.env.UNIFORM_API_KEY}).getCompositionById({compositionId:c.compositionId}).then(({composition:I})=>I&&Et(I)?.pageTitle||c.name).catch(()=>c.name):c.name,B=c.type==="placeholder"?void 0:j(c.path,s.dynamicInputs);return{title:y,link:B}})):[]})():await(async()=>e?.reduce((u,f)=>{let{title:c,link:x}=Et(f);return c?[...u,{title:c,link:T(x)}]:u},[])||[])();return n&&i?U("ul",{className:"flex items-center",children:U("li",{className:"flex items-center",children:U(v,{size:t,font:a,color:o,transform:p,children:"Breadcrumbs cannot be auto-generated because the project map is not accessible in this context."})})}):d.length?U("ul",{className:h("flex items-center",{[`text-${t}`]:!!t,[`text-${o}`]:!!o}),children:d.map(({title:u,link:f},c)=>yo("li",{className:"flex items-center",children:[!!c&&U("div",{className:"mx-2 size-[1em]",children:Gt(r)}),f?U(W,{variant:"link",textColor:o,className:h({[`font-${a}`]:!!a,[`text-${t}`]:!!t,[p||""]:!!p}),href:f,children:u}):U(v,{size:t,font:a,color:o,transform:p,children:u})]},`${u}-${c}`))}):null};var qe=Dt;import{useMemo as xo}from"react";import{UniformText as go}from"@uniformdev/canvas-next-rsc/component";import{jsx as re}from"react/jsx-runtime";var Mt=({component:r,context:e,link:t,textColor:o,textFont:a,textWeight:p,textTransform:i,buttonColor:s,icon:n,iconPosition:m,border:l,size:d,textSize:u,hoverButtonColor:f,hoverTextColor:c,className:x,onClick:y,text:B})=>{let I=T(t),g=e.previewMode==="editor"&&e?.isContextualEditing,w=xo(()=>{let[Pe]=C(n),{url:O,title:gr=""}=Pe||{};if(O)return{url:O,title:gr}},[n]),fe=()=>{if(!w)return;let{url:Pe,title:O}=w;return re(S,{src:Pe,alt:O,width:20,height:20,containerStyle:{width:"20px",height:"20px"}})};return!(!!B||!!w)&&!g?null:re(W,{variant:r.variant,href:I,border:l,size:d,onClick:y,className:x,textSize:u,isActive:e.matchedRoute===I,textColor:o,textFont:a,textWeight:p,textTransform:i,buttonColor:s,hoverButtonColor:f,hoverTextColor:c,icon:re(fe,{}),iconPosition:m,children:re(go,{placeholder:"Button text goes here",parameterId:"text",component:r,context:e})})};var Je=Mt;import{UniformSlot as vo}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ot}from"react/jsx-runtime";var oe=({displayName:r,anchor:e,slots:t,component:o,context:a,backgroundColor:p,spacing:i,border:s,fluidContent:n,height:m,className:l})=>Ot(ct,{title:r,id:e,backgroundColor:p,spacing:i,border:s,fluidContent:n,height:m,className:l,children:Ot(vo,{data:o,context:a,slot:t.containerContent})});var jt=(e=>(e.ContainerContent="containerContent",e))(jt||{});import{jsx as Ht}from"react/jsx-runtime";var ae=({color:r,thickness:e,width:t,alignment:o})=>Ht("div",{className:h("flex w-full",`justify-${o||"center"}`),children:Ht("div",{className:h({[`bg-${r}`]:!!r}),style:{width:t,height:e}})});import{UniformSlot as bo}from"@uniformdev/canvas-next-rsc/component";import{jsx as Wt}from"react/jsx-runtime";var $t=({direction:r,justifyContent:e,gap:t,alignItems:o,backgroundColor:a,spacing:p,border:i,fluidContent:s,slots:n,component:m,context:l,className:d,height:u,wrapperClassName:f})=>Wt(ht,{direction:r,justifyContent:e,gap:t,alignItems:o,backgroundColor:a,spacing:p,border:i,fluidContent:s,height:u,wrapperClassName:f,className:d,children:Wt(bo,{data:m,context:l,slot:n.flexItem})});var Ke=$t;import{UniformSlot as Io}from"@uniformdev/canvas-next-rsc/component";import{jsx as zt}from"react/jsx-runtime";var ne=({alignSelf:r,shrink:e,context:t,component:o,slots:a})=>zt(Pt,{alignSelf:r,shrink:e,children:zt(Io,{data:o,context:t,slot:a.inner})});import{UniformSlot as wo}from"@uniformdev/canvas-next-rsc/component";import{jsx as qt}from"react/jsx-runtime";var Jt=({columnsCount:r,gapX:e,gapY:t,backgroundColor:o,spacing:a,border:p,fluidContent:i,height:s,slots:n,component:m,context:l,className:d})=>qt(dt,{className:d,columnsCount:r,gapX:e,gapY:t,backgroundColor:o,spacing:a,border:p,fluidContent:i,height:s,children:qt(wo,{data:m,context:l,slot:n.gridInner})});var Kt=(e=>(e.GridInner="gridInner",e))(Kt||{}),Qe=Jt;import{UniformSlot as To}from"@uniformdev/canvas-next-rsc/component";import{jsx as Qt}from"react/jsx-runtime";var Yt=({columnStart:r,columnSpan:e,rowStart:t,className:o,rowSpan:a,context:p,component:i,slots:s})=>Qt(ut,{columnStart:r,columnSpan:e,rowStart:t,rowSpan:a,className:o,children:Qt(To,{data:i,context:p,slot:s.inner})});var Xt=(e=>(e.Inner="inner",e))(Xt||{}),Ye=Yt;import{UniformText as So}from"@uniformdev/canvas-next-rsc/component";import{jsx as Xe}from"react/jsx-runtime";var Zt=({icon:r,size:e,tag:t,color:o,weight:a,font:p,transform:i,decoration:s,letterSpacing:n,alignment:m,component:l,context:d})=>{let[u]=C(r),{url:f,title:c=""}=u||{};return Xe(q,{icon:f?Xe(S,{src:f,alt:c,fill:!0}):void 0,size:e,tag:t,color:o,weight:a,font:p,transform:i,decoration:s,letterSpacing:n,alignment:m,children:Xe(So,{placeholder:"Text goes here",parameterId:"text",component:l,context:d})})};var Ze=Zt;import{imageFrom as Ao}from"@uniformdev/assets";import{jsx as ie}from"react/jsx-runtime";var se=async({image:r,objectFit:e,width:t,height:o,overlayColor:a,overlayOpacity:p,border:i,priority:s,fill:n,unoptimized:m,context:l,component:d})=>{let[u]=C(r);if(!u){let g=l.previewMode==="editor"&&l.isContextualEditing,w=d?._id?.includes("placeholder_");return!g||w?null:ie("div",{style:{width:t?`${t}px`:"auto",height:o?`${o}px`:"auto"},children:ie($,{type:"image",placeholder:"Please add an asset to display an image"})})}let{focalPoint:f,title:c=""}=u,x=t||u.width,y=o||u.height;if(!n&&(!x||!y))return console.warn("No dimensions provided for the Next.js Image component. Falling back to a standard <img> tag for rendering."),ie("img",{src:u.url,alt:c});let B=Ao(u?.url).transform({width:t,height:o,fit:e,focal:f}).url();return ie(S,{src:B,alt:c,unoptimized:m,priority:s,sizes:"100%",style:{objectFit:e},overlayColor:a,overlayOpacity:p,border:i,...n?{fill:!0}:{width:x,height:y}})};import{UniformSlot as No}from"@uniformdev/canvas-next-rsc/component";import{jsx as er}from"react/jsx-runtime";var tr=({component:r,context:e,slots:t,link:o,openInNewTab:a})=>er(H,{link:T(o),openInNewTab:a,children:er(No,{data:r,context:e,slot:t.linkContent})});var rr=(e=>(e.LinkContent="linkContent",e))(rr||{}),et=tr;import{UniformText as Bo}from"@uniformdev/canvas-next-rsc/component";import{jsx as or}from"react/jsx-runtime";var ar=({href:r,isExternalLink:e,children:t})=>r?or(H,{className:"cursor-pointer hover:no-underline",link:r,openInNewTab:e,rel:e?"noopener noreferrer":"",children:t}):or("div",{className:"cursor-pointer",children:t});import{jsx as M}from"react/jsx-runtime";var nr=({icon:r,link:e,activeState:t,size:o,tag:a,color:p,weight:i,font:s,transform:n,decoration:m,letterSpacing:l,alignment:d,component:u,context:f,hoverEffect:c="",className:x})=>{let y=T(e),B=t&&j(f.matchedRoute,f.dynamicInputs)===y,[I]=C(r),{url:g,title:w=""}=I||{},fe=()=>g?g.endsWith(".svg")?M(ft,{src:g,alt:w,fill:!0}):M(S,{src:g,alt:w,fill:!0}):null,he=h("transition-all duration-150",{[Ce(c,"group-hover:{value}")]:!!c,[Ce(c,"{value}")]:!!c&&B});return M(ar,{href:y,isExternalLink:lt(y),children:M(q,{icon:fe(),className:h("group",x),iconClassName:he,textClassName:he,size:o,tag:a,color:p,weight:i,font:s,transform:n,decoration:m,letterSpacing:l,alignment:d,children:M(Bo,{placeholder:"Text goes here",parameterId:"text",className:"whitespace-nowrap",component:u,context:f})})})};var tt=nr;import{UniformRichText as Fo}from"@uniformdev/canvas-next-rsc/component";import{jsx as ir}from"react/jsx-runtime";var sr=({color:r,lineCountRestrictions:e,font:t,component:o,className:a})=>ir(v,{lineCountRestrictions:e,color:r,font:t,children:ir(Fo,{className:h("prose max-w-full marker:text-current [&_*:not(pre)]:text-current",a),parameterId:"text",component:o,placeholder:"Rich text content goes here..."})});var rt=sr;import{jsx as ko}from"react/jsx-runtime";var pe=({size:r,component:{variant:e}})=>{let t=e==="horizontal";return ko("div",{className:h({[`w-${r}`]:t,[`h-${r}`]:!t})})};var ot=(e=>(e.Horizontal="horizontal",e))(ot||{});import{UniformSlot as Uo}from"@uniformdev/canvas-next-rsc/component";import{jsx as _o}from"react/jsx-runtime";var pr=({slots:r,component:e,context:t})=>_o(Uo,{data:e,context:t,slot:r.tabContent});var mr=(e=>(e.TabContent="tabContent",e))(mr||{}),at=pr;import{UniformSlot as Ro}from"@uniformdev/canvas-next-rsc/component";import{jsx as nt}from"react/jsx-runtime";var me=({component:r,context:e,slots:t,alignment:o})=>nt("td",{children:nt("div",{className:h("w-fit",lr[o||"left"]),children:nt(Ro,{slot:t.tableCustomCellContent,context:e,data:r})})});var lr={left:"ml-0",center:"mx-auto",right:"ml-auto"},cr=(e=>(e.TableCustomCellContent="tableCustomCellContent",e))(cr||{});import{UniformText as Vo}from"@uniformdev/canvas-next-rsc/component";import{jsx as dr}from"react/jsx-runtime";var le=({component:r,context:e})=>dr("td",{children:dr(Vo,{component:r,context:e,parameterId:"value",placeholder:"Value"})});import{UniformText as Lo}from"@uniformdev/canvas-next-rsc/component";import{jsx as ur}from"react/jsx-runtime";var ce=({component:r,context:e})=>ur("th",{children:ur(Lo,{component:r,context:e,parameterId:"value",placeholder:"Value"})});import{UniformSlot as Go}from"@uniformdev/canvas-next-rsc/component";import{jsx as fr}from"react/jsx-runtime";var de=({slots:r,component:e,context:t})=>fr("tr",{children:fr(Go,{data:e,context:t,slot:r.tableRowCells})});import{UniformText as Eo}from"@uniformdev/canvas-next-rsc/component";import{jsx as hr}from"react/jsx-runtime";var Pr=({tag:r,size:e,color:t,weight:o,font:a,transform:p,decoration:i,letterSpacing:s,lineCountRestrictions:n,alignment:m,component:l,context:d})=>hr(v,{color:t,size:e,font:a,weight:o,transform:p,decoration:i,letterSpacing:s,alignment:m,lineCountRestrictions:n,children:hr(Eo,{placeholder:"Text goes here",parameterId:"text",as:r||void 0,component:l,context:d})});var it=Pr;import Do from"next/dynamic";var st=Do(()=>import("../../theme-switcher-WO5JIV2W.mjs").then(r=>r.ThemeSwitcher));import{jsx as Mo}from"react/jsx-runtime";var Cr=({context:r,component:e})=>{let t=r.previewMode==="editor"&&r.isContextualEditing,o=e?._id?.includes("placeholder_");return!t||o?null:Mo($,{type:"video",placeholder:"Please add video link to display a video"})};import{jsx as yr}from"react/jsx-runtime";var ue=({video:r,placeholderImage:e,autoPlay:t,lazyLoad:o,loop:a,controls:p,muted:i,overlayColor:s,overlayOpacity:n,border:m,component:l,context:d})=>{let[u]=C(r),[f]=C(e),c=u?.url;return c?yr(Ct,{url:c,placeholderImageUrl:f?.url,autoPlay:t,lazyLoad:o,loop:a,controls:p,muted:i,overlayColor:s,overlayOpacity:n,border:m}):yr(Cr,{component:l,context:d})};var xr={accordion:{component:ye},accordionItem:{component:Ve},badge:{component:Ge},banner:{component:xe},button:{component:Je},card:{component:ge},carousel:{component:ve},container:{component:oe},countdown:{component:be},divider:{component:ae},grid:{component:Qe},gridItem:{component:Ye},flex:{component:Ke},flexItem:{component:ne},header:{component:we},section:{component:ke},iconLabel:{component:Ze},image:{component:se},page:{component:Be},richText:{component:rt},spacer:{component:pe},text:{component:it},video:{component:ue},tabs:{component:_e},tab:{component:at},table:{component:Ue},tableRow:{component:de},tableHeaderCell:{component:ce},tableDataCell:{component:le},tableCustomCell:{component:me},modal:{component:Se},imageGallery:{component:Te},testimonial:{component:Re},breadcrumbs:{component:qe},review:{component:Fe},navigationLink:{component:tt},navigationGroup:{component:Ne},navigationFlyout:{component:Ae},footer:{component:Ie},themeSwitcher:{component:st},link:{component:et},fixedHero:{component:z.FixedHero},flexibleHero:{component:z.FlexibleHero}},tp=xr,rp=mt(xr);export{ye as Accordion,Ve as AccordionItem,yt as AccordionItemSlots,br as AccordionSlots,Ge as Badge,xe as Banner,Ir as BannerContentAlignment,wr as BannerSlots,qe as Breadcrumbs,Je as Button,ge as Card,Sr as CardSlots,Tr as CardVariants,ve as Carousel,Ar as CarouselSlots,Er as CommonPageSlots,oe as Container,jt as ContainerSlots,be as Countdown,Nr as CountdownSlots,Br as CountdownVariants,z as DemoHero,Fr as DemoHeroContentAlignment,kr as DemoHeroVariants,ae as Divider,Ke as Flex,ne as FlexItem,Ur as FlexibleHeroSlots,Ie as Footer,_r as FooterSlots,Qe as Grid,Ye as GridItem,Xt as GridItemSlots,Kt as GridSlots,we as Header,Rr as HeaderSlots,Vr as HeaderVariants,Ze as IconLabel,se as Image,Te as ImageGallery,Lr as ImageGallerySlots,et as Link,rr as LinkSlots,Se as Modal,Gr as ModalSlots,Ae as NavigationFlyout,Ne as NavigationGroup,tt as NavigationLink,Be as Page,Fe as Review,Mr as ReviewSlots,Dr as ReviewVariants,rt as RichText,ke as Section,Or as SectionContentAlignment,Hr as SectionSlots,jr as SectionVariants,pe as Spacer,ot as SpacerVariants,at as Tab,mr as TabSlots,Ue as Table,me as TableCustomCell,cr as TableCustomCellSlots,le as TableDataCell,ce as TableHeaderCell,de as TableRow,Wr as TableSlots,_e as Tabs,zr as TabsSlots,$r as TabsVariants,Re as Testimonial,Jr as TestimonialSlots,qr as TestimonialVariants,it as Text,st as ThemeSwitcher,ue as Video,rp as componentResolver,xr as cskComponentsMapping,tp as default};
|
|
@@ -33,7 +33,7 @@ type CarouselProps = Pick<ContainerProps, 'title' | 'backgroundColor' | 'spacing
|
|
|
33
33
|
gapX?: string;
|
|
34
34
|
variant?: string;
|
|
35
35
|
};
|
|
36
|
-
declare const _default$
|
|
36
|
+
declare const _default$4: react.ComponentType<CarouselProps>;
|
|
37
37
|
|
|
38
38
|
declare const Flex: FC<FlexProps>;
|
|
39
39
|
|
|
@@ -143,7 +143,7 @@ type ThemeSwitcherProps = {
|
|
|
143
143
|
iconColor?: string;
|
|
144
144
|
onChange?: (theme: string) => void;
|
|
145
145
|
};
|
|
146
|
-
declare const _default$
|
|
146
|
+
declare const _default$3: react.ComponentType<ThemeSwitcherProps>;
|
|
147
147
|
|
|
148
148
|
type VideoProps = ReactPlayerProps & {
|
|
149
149
|
autoPlay?: boolean;
|
|
@@ -153,7 +153,7 @@ type VideoProps = ReactPlayerProps & {
|
|
|
153
153
|
overlayOpacity?: NonNullable<ImageProps$1['style']>['opacity'];
|
|
154
154
|
border?: string | ViewPort<string>;
|
|
155
155
|
};
|
|
156
|
-
declare const _default$
|
|
156
|
+
declare const _default$2: react.ComponentType<VideoProps>;
|
|
157
157
|
|
|
158
158
|
declare const InlineSVG: FC<InlineSVGProps>;
|
|
159
159
|
|
|
@@ -184,6 +184,19 @@ type AccordionItemAdditionalProps = {
|
|
|
184
184
|
className?: string;
|
|
185
185
|
};
|
|
186
186
|
type AccordionItemProps = AccordionItemParameters & AccordionItemAdditionalProps;
|
|
187
|
-
declare const _default: react.ComponentType<AccordionItemProps>;
|
|
187
|
+
declare const _default$1: react.ComponentType<AccordionItemProps>;
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
type ModalProps = {
|
|
190
|
+
maxWidth?: 'small' | 'medium' | 'large';
|
|
191
|
+
className?: string;
|
|
192
|
+
backgroundColor?: string;
|
|
193
|
+
closeIconColor?: string;
|
|
194
|
+
disableCloseModalOnClickOutside?: boolean;
|
|
195
|
+
trigger: ReactNode;
|
|
196
|
+
content: ReactNode;
|
|
197
|
+
actions?: ReactNode;
|
|
198
|
+
onChangeModalState?: (state: boolean) => void;
|
|
199
|
+
};
|
|
200
|
+
declare const _default: react.ComponentType<ModalProps>;
|
|
201
|
+
|
|
202
|
+
export { Accordion, _default$1 as AccordionItem, type AccordionItemProps, type AccordionProps, Arrow as ArrowIcon, Button, ButtonProps, _default$4 as Carousel, type CarouselProps, Container, ContainerProps, Flex, FlexItem, type FlexItemProps, type FlexProps, Footer, FooterProps, Grid, GridItem, type GridItemProps, type GridProps, Header, HeaderProps, IconLabel, type IconLabelProps, Image, ImageIcon, type ImageProps, InlineSVG, type InlineSVGProps, Link, type LinkProps, MediaPlaceholder, type MediaPlaceholderType, _default as Modal, type ModalProps, Page, type PageProps, Rating, type RatingProps, Text, TextProps, _default$3 as ThemeSwitcher, type ThemeSwitcherProps, _default$2 as Video, VideoIcon, type VideoProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as
|
|
1
|
+
import{a as A}from"../../chunk-V4EBWEG4.mjs";import{b as y}from"../../chunk-2BMAPB63.mjs";import{a as F}from"../../chunk-PMMAALCQ.mjs";import{a as G,b as V,c as T}from"../../chunk-FIN5US3Q.mjs";import{a as c,b as I}from"../../chunk-RYEXR67P.mjs";import{a as r}from"../../chunk-EUVKAE6M.mjs";import{a as o,b as t,c as a,d as p,e as x,f as u,g as i,h as g,i as h}from"../../chunk-EOV2LPGC.mjs";import{a as s,b as d,c as l}from"../../chunk-6TUDWIYU.mjs";import{a as m}from"../../chunk-WAW7PQYM.mjs";import{a as n,b as P}from"../../chunk-TCQTXNKT.mjs";import{a as f}from"../../chunk-BK7UG4U4.mjs";import{a as e}from"../../chunk-7GVG4HLE.mjs";import"../../chunk-RX4IAAQQ.mjs";import"../../chunk-S7CSCIW4.mjs";import"../../chunk-YEKQJ4YC.mjs";export{o as Accordion,F as AccordionItem,s as ArrowIcon,a as Button,p as ButtonVariant,r as Carousel,e as Container,G as Flex,V as FlexItem,u as Footer,n as Grid,P as GridItem,i as Header,c as IconLabel,f as Image,d as ImageIcon,I as InlineSVG,t as Link,x as MediaPlaceholder,y as Modal,g as Page,h as Rating,m as Text,A as ThemeSwitcher,T as Video,l as VideoIcon};
|
|
@@ -36,7 +36,6 @@ export const FixedHero: FC<FixedHeroProps> = ({ textColor, overlayAutoTint, ...p
|
|
|
36
36
|
// Primary Button Parameters
|
|
37
37
|
primaryButtonSize="button-medium"
|
|
38
38
|
primaryButtonTextSize="sm"
|
|
39
|
-
primaryButtonTextColor="text-secondary"
|
|
40
39
|
primaryButtonTextWeight="normal"
|
|
41
40
|
primaryButtonButtonColor="button-primary"
|
|
42
41
|
primaryButtonTextTransform="uppercase"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC } from 'react';
|
|
2
2
|
import { imageFrom } from '@uniformdev/assets';
|
|
3
|
-
import { MediaPlaceholder } from '@/components/ui';
|
|
4
3
|
import BaseImage from '@/components/ui/Image';
|
|
4
|
+
import MediaPlaceholder from '@/components/ui/MediaPlaceholder';
|
|
5
5
|
import { resolveAsset } from '@/utils/assets';
|
|
6
6
|
import { ImageProps } from '.';
|
|
7
7
|
|
|
@@ -25,7 +25,7 @@ export const Image: FC<ImageProps> = async ({
|
|
|
25
25
|
const isEditorPreviewMode = context.previewMode === 'editor' && context.isContextualEditing;
|
|
26
26
|
const isPlaceholder = component?._id?.includes('placeholder_');
|
|
27
27
|
|
|
28
|
-
if (!isEditorPreviewMode || isPlaceholder
|
|
28
|
+
if (!isEditorPreviewMode || isPlaceholder) {
|
|
29
29
|
return null;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
|
-
import { FC
|
|
3
|
+
import { FC } from 'react';
|
|
4
4
|
import { UniformSlot } from '@uniformdev/canvas-next-rsc/component';
|
|
5
|
-
import
|
|
5
|
+
import BaseModal from '@/components/ui/Modal';
|
|
6
6
|
import { ModalProps } from '.';
|
|
7
|
-
import { CloseIcon } from './close-icon';
|
|
8
|
-
import { getCloseButtonClasses, getDialogClasses, getFormClasses } from './style-utils';
|
|
9
7
|
|
|
10
8
|
export const Modal: FC<ModalProps> = ({
|
|
11
9
|
slots,
|
|
@@ -15,68 +13,13 @@ export const Modal: FC<ModalProps> = ({
|
|
|
15
13
|
backgroundColor,
|
|
16
14
|
closeIconColor,
|
|
17
15
|
disableCloseModalOnClickOutside,
|
|
18
|
-
}) =>
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, []);
|
|
29
|
-
|
|
30
|
-
const handleClickContent = useCallback((e: MouseEvent<HTMLFormElement>) => {
|
|
31
|
-
e.stopPropagation();
|
|
32
|
-
}, []);
|
|
33
|
-
|
|
34
|
-
useEffect(() => {
|
|
35
|
-
if (!modalActionsRef.current) return;
|
|
36
|
-
const currentActions = modalActionsRef.current.querySelectorAll('button, a');
|
|
37
|
-
const handleClickButton = () => setShowModal(false);
|
|
38
|
-
|
|
39
|
-
currentActions.forEach(button => {
|
|
40
|
-
button.addEventListener('click', handleClickButton);
|
|
41
|
-
});
|
|
42
|
-
return () =>
|
|
43
|
-
currentActions.forEach(button => {
|
|
44
|
-
button.removeEventListener('click', handleClickButton);
|
|
45
|
-
});
|
|
46
|
-
}, []);
|
|
47
|
-
|
|
48
|
-
return (
|
|
49
|
-
<div>
|
|
50
|
-
<div onClick={toggleModal}>
|
|
51
|
-
<UniformSlot data={component} context={context} slot={slots.trigger} />
|
|
52
|
-
</div>
|
|
53
|
-
<div className={getDialogClasses({ showModal })}>
|
|
54
|
-
<dialog
|
|
55
|
-
open={showModal}
|
|
56
|
-
onClick={handleClickOutside}
|
|
57
|
-
aria-label="Close modal"
|
|
58
|
-
aria-modal="true"
|
|
59
|
-
className="flex size-full items-center justify-center bg-black/50 px-4"
|
|
60
|
-
>
|
|
61
|
-
<form method="dialog" className={getFormClasses({ maxWidth, backgroundColor })} onClick={handleClickContent}>
|
|
62
|
-
<button onClick={toggleModal} className={getCloseButtonClasses({ disableCloseModalOnClickOutside })}>
|
|
63
|
-
<CloseIcon
|
|
64
|
-
className={cn({
|
|
65
|
-
[`fill-${closeIconColor}`]: closeIconColor,
|
|
66
|
-
})}
|
|
67
|
-
/>
|
|
68
|
-
</button>
|
|
69
|
-
<div className="p-6 md:p-8">
|
|
70
|
-
<UniformSlot data={component} context={context} slot={slots.modalContent} />
|
|
71
|
-
</div>
|
|
72
|
-
{slots?.modalActions?.items?.length && (
|
|
73
|
-
<div ref={modalActionsRef} className="border-t p-6 md:p-8">
|
|
74
|
-
<UniformSlot data={component} context={context} slot={slots.modalActions} />
|
|
75
|
-
</div>
|
|
76
|
-
)}
|
|
77
|
-
</form>
|
|
78
|
-
</dialog>
|
|
79
|
-
</div>
|
|
80
|
-
</div>
|
|
81
|
-
);
|
|
82
|
-
};
|
|
16
|
+
}) => (
|
|
17
|
+
<BaseModal
|
|
18
|
+
{...{ maxWidth, backgroundColor, closeIconColor, disableCloseModalOnClickOutside }}
|
|
19
|
+
trigger={<UniformSlot data={component} context={context} slot={slots.trigger} />}
|
|
20
|
+
content={<UniformSlot data={component} context={context} slot={slots.modalContent} />}
|
|
21
|
+
actions={
|
|
22
|
+
slots?.modalActions?.items?.length && <UniformSlot data={component} context={context} slot={slots.modalActions} />
|
|
23
|
+
}
|
|
24
|
+
/>
|
|
25
|
+
);
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
);
|
|
@@ -0,0 +1,9 @@
|
|
|
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';
|
|
@@ -0,0 +1,41 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FC, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export const IconArrowDown: FC<SVGProps<SVGSVGElement>> = ({ className, ...restProps }) => (
|
|
4
|
+
<svg
|
|
5
|
+
className={className}
|
|
6
|
+
width="15"
|
|
7
|
+
height="9"
|
|
8
|
+
viewBox="0 0 15 9"
|
|
9
|
+
fill="currentColor"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{...restProps}
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
fillRule="evenodd"
|
|
15
|
+
clipRule="evenodd"
|
|
16
|
+
d="M7.50013 0L0 7.13651L1.95843 9L7.5 3.7271L13.0416 9L15 7.13651L7.50013 0Z"
|
|
17
|
+
fill="currentColor"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { FC, SVGProps } from 'react';
|
|
2
|
+
|
|
3
|
+
export const IconArrowUp: FC<SVGProps<SVGSVGElement>> = ({ className, ...restProps }) => (
|
|
4
|
+
<svg
|
|
5
|
+
className={className}
|
|
6
|
+
width="15"
|
|
7
|
+
height="9"
|
|
8
|
+
viewBox="0 0 15 9"
|
|
9
|
+
fill="currentColor"
|
|
10
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
11
|
+
{...restProps}
|
|
12
|
+
>
|
|
13
|
+
<path
|
|
14
|
+
fillRule="evenodd"
|
|
15
|
+
clipRule="evenodd"
|
|
16
|
+
d="M7.49987 9L15 1.86349L13.0416 0L7.5 5.2729L1.95843 0L0 1.86349L7.49987 9Z"
|
|
17
|
+
fill="currentColor"
|
|
18
|
+
/>
|
|
19
|
+
</svg>
|
|
20
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
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));
|
|
@@ -0,0 +1,13 @@
|
|
|
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';
|
|
@@ -0,0 +1,59 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
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));
|
|
@@ -0,0 +1,89 @@
|
|
|
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,5 +1,5 @@
|
|
|
1
1
|
import { cn } from '@/utils/styling';
|
|
2
|
-
import { MaxWidthMap,
|
|
2
|
+
import { MaxWidthMap, ModalProps } from '.';
|
|
3
3
|
|
|
4
4
|
type DialogClassesProps = {
|
|
5
5
|
showModal?: boolean;
|
|
@@ -11,8 +11,8 @@ export const getDialogClasses = ({ showModal }: DialogClassesProps) =>
|
|
|
11
11
|
});
|
|
12
12
|
|
|
13
13
|
type FormClassesProps = {
|
|
14
|
-
maxWidth?:
|
|
15
|
-
backgroundColor?:
|
|
14
|
+
maxWidth?: ModalProps['maxWidth'];
|
|
15
|
+
backgroundColor?: ModalProps['backgroundColor'];
|
|
16
16
|
};
|
|
17
17
|
export const getFormClasses = ({ maxWidth, backgroundColor }: FormClassesProps) =>
|
|
18
18
|
cn('rounded-lg shadow-lg relative', MaxWidthMap[maxWidth || 'small'], {
|
|
@@ -20,7 +20,7 @@ export const getFormClasses = ({ maxWidth, backgroundColor }: FormClassesProps)
|
|
|
20
20
|
});
|
|
21
21
|
|
|
22
22
|
type CloseButtonClassesProps = {
|
|
23
|
-
disableCloseModalOnClickOutside?:
|
|
23
|
+
disableCloseModalOnClickOutside?: ModalProps['disableCloseModalOnClickOutside'];
|
|
24
24
|
};
|
|
25
25
|
export const getCloseButtonClasses = ({ disableCloseModalOnClickOutside }: CloseButtonClassesProps) =>
|
|
26
26
|
cn('group absolute right-4 top-4 opacity-40 hover:opacity-100', {
|
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as x,b as y,c as w,d as E,e as F,f as S,g as P,h as R,i as $,j as I,k as _}from"./chunk-
|
|
1
|
+
import{a as x,b as y,c as w,d as E,e as F,f as S,g as P,h as R,i as $,j as I,k as _}from"./chunk-TFA6HYP4.mjs";import"./chunk-YEKQJ4YC.mjs";import{program as V}from"commander";import g from"node:path";import*as b from"ora";import{dirname as N}from"path";import{fileURLToPath as ee}from"url";import{checkbox as te}from"@inquirer/prompts";import U from"node:fs";var q=(r,t)=>U.readdirSync(r,{withFileTypes:!0}).filter(e=>t==="folder"?e.isDirectory():e.isFile()).map(e=>e.name),T=r=>q(r,"folder");import f from"node:fs";import a from"node:path";import{confirm as z}from"@inquirer/prompts";var K=async r=>{f.existsSync(r)||await f.promises.mkdir(r,{recursive:!0})};var O=r=>{let t=y.find(o=>f.existsSync(r+o));if(t)return r+t;let e=y.find(o=>f.existsSync(a.join(r,`index${o}`)));if(e)return a.join(r,`index${e}`)},Q=r=>{let e=f.readFileSync(r,"utf8").match(x)?.map(n=>n.replace(/['"]/g,"")),o=e?.filter(n=>n.startsWith("@/")).map(n=>n.replace("@/","")),s=e?.filter(n=>!n.startsWith("@/")).map(n=>n);return{aliases:o,relativePaths:s}},h=async(r,t,e)=>{e.add(r);let{aliases:o=[],relativePaths:s=[]}=Q(r);if(o.length)for(let n of o){let i=O(a.join(t,n));i&&!e.has(i)&&await h(i,t,e)}if(s.length)for(let n of s){let i=O(a.join(a.dirname(r),n));i&&!e.has(i)&&await h(i,t,e)}},j=5,A=async(r,t,e,o,s)=>{try{let n=new Set;s?.start("Searching for all canvas components and their dependencies...");for(let c of e){let l=a.join(r,c),d=f.readdirSync(l,{withFileTypes:!0}).filter(m=>m.isFile()&&w.includes(m.name));for(let m of d)await h(a.join(m?.path||m.parentPath,m.name),o,n)}let i=Array.from(n),p=i.filter(c=>{let l=a.join(t,a.relative(o,c));return f.existsSync(l)&&f.readFileSync(l,"utf8")!==f.readFileSync(c,"utf8")}),u=await(async()=>{if(!p.length)return!0;s?.stop();let c=p.slice(0,j).map(d=>a.relative(process.cwd(),a.join(t,a.relative(o,d)))).join(`
|
|
2
2
|
`),l=p.length>j?`
|
|
3
3
|
...`:"";return z({message:`Found ${p.length} files that will be overridden:
|
|
4
4
|
${c}${l}
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
|
@@ -0,0 +1 @@
|
|
|
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};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@uniformdev/csk-components",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.118-alpha.1",
|
|
4
4
|
"description": "Components Starter Kit that provides a set of basic components for building websites within a Uniform project",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.txt",
|
|
6
6
|
"engines": {
|
|
@@ -77,9 +77,9 @@
|
|
|
77
77
|
"devDependencies": {
|
|
78
78
|
"@repo/eslint-config": "*",
|
|
79
79
|
"@repo/typescript-config": "*",
|
|
80
|
-
"@uniformdev/assets": "^20.
|
|
81
|
-
"@uniformdev/canvas": "^20.
|
|
82
|
-
"@uniformdev/canvas-next-rsc": "^20.
|
|
80
|
+
"@uniformdev/assets": "^20.24.0",
|
|
81
|
+
"@uniformdev/canvas": "^20.24.0",
|
|
82
|
+
"@uniformdev/canvas-next-rsc": "^20.24.0",
|
|
83
83
|
"next": "^15.3.2",
|
|
84
84
|
"react": "^19.1.0",
|
|
85
85
|
"react-dom": "^19.1.0",
|
|
@@ -105,4 +105,4 @@
|
|
|
105
105
|
"publishConfig": {
|
|
106
106
|
"access": "public"
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|
package/dist/chunk-2SEOCBRK.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as r}from"./chunk-MSXDLSXH.mjs";import m from"next/dynamic";import{jsx as a}from"react/jsx-runtime";var l=o=>{switch(o.slotName){case"trigger":return{component:()=>a("div",{className:"h-20 w-full"})};default:return r}};var c={small:"max-w-xl",medium:"max-w-2xl",large:"max-w-4xl"},t=(e=>(e.Trigger="trigger",e.ModalContent="modalContent",e.ModalActions="modalActions",e))(t||{}),x=m(()=>import("./modal-HKMQGV4B.mjs").then(o=>o.Modal));export{c as a,t as b,x as c,l as d};
|
package/dist/chunk-EIEZRPWW.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as i}from"./chunk-7GVG4HLE.mjs";import{a as e,c as p}from"./chunk-S7CSCIW4.mjs";import{jsx as n}from"react/jsx-runtime";var f=({className:r,wrapperClassName:t,direction:o,justifyContent:a,gap:s,alignItems:m,backgroundColor:P,spacing:x,border:u,fluidContent:y,height:l,children:c})=>n(i,{backgroundColor:P,spacing:x,border:u,fluidContent:y,height:l,wrapperClassName:t,children:n("div",{className:p("flex",{[e(o,"flex-{value}")]:o,[e(a,"justify-{value}")]:a,[e(s,"gap-{value}")]:s,[e(m,"items-{value}")]:m,[e(l,"h-{value}")]:l},r),children:c})});import{jsx as g}from"react/jsx-runtime";var d=({className:r,alignSelf:t,shrink:o,children:a})=>g("div",{className:p({[e(t,"self-{value}")]:t,[`shrink-${o}`]:o},r),children:a});import I from"next/dynamic";var v=I(()=>import("./video-RC2QHJS2.mjs").then(r=>r.Video));export{f as a,d as b,v as c};
|
package/dist/chunk-LG7MD2DH.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as be,c as Ne,e as Fe,f as we,g as Ee,h as He,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 Ae}from"@uniformdev/canvas-next-rsc/component";import{jsx as j}from"react/jsx-runtime";var yo=({slots:e,component:o,context:t,backgroundColor:r,spacing:a,border:i,fluidContent:n,height:s})=>j(be,{accordionContent:j(Ae,{data:o,context:t,slot:e.accordionContent}),accordionItems:j(Ae,{data:o,context:t,slot:e.accordionItems}),backgroundColor:r,spacing:a,border:i,fluidContent:n,height:s});import{jsx as Be}from"react/jsx-runtime";var ho=e=>{switch(e.slotName){case"accordionContent":return{component:()=>Be("div",{className:"h-20"})};case"accordionItems":return{component:()=>Be("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 bo}from"react/jsx-runtime";var Ro=e=>{switch(e.slotName){case"cardMedia":return{component:()=>null};case"cardContent":return{component:()=>bo("div",{className:"h-20"})};default:return l}};var Ve=(o=>(o.BackgroundImage="backgroundImage",o))(Ve||{}),Le=(t=>(t.CardMedia="cardMedia",t.CardContent="cardContent",t))(Le||{});import{jsx as k,jsxs as To}from"react/jsx-runtime";var No=({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 To(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 Eo from"next/dynamic";import{jsx as wo}from"react/jsx-runtime";var Fo=e=>{switch(e.slotName){case"carouselItems":return{component:()=>wo("div",{className:"mx-20 h-20 w-full"})};default:return l}};var De=(o=>(o.Items="carouselItems",o))(De||{}),Lr=Eo(()=>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(Fe,{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 Ke=({contentAlignment:e})=>p("justify-center",{"!justify-start":e==="left","!justify-end":e==="right"}),Ye=({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 Ao}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:At,descriptionSize:Bt,descriptionColor:It,descriptionWeight:Lt,descriptionFont:Vt,descriptionAlignment:St,descriptionTransform:Dt,descriptionDecoration:Ot,descriptionLetterSpacing:kt,descriptionLineCountRestrictions:Mt,primaryButtonVariant:_t,primaryButtonText:Ut,primaryButtonLink:zt,primaryButtonTextColor:Wt,primaryButtonTextWeight:Kt,primaryButtonTextFont:Yt,primaryButtonTextTransform:Gt,primaryButtonButtonColor:$t,primaryButtonBorder:qt,primaryButtonSize:Xt,primaryButtonIcon:Jt,primaryButtonTextSize:Qt,primaryButtonIconPosition:Zt,primaryButtonHoverButtonColor:jt,primaryButtonHoverTextColor:eo,image:to,imageWidth:oo,imageHeight:ro,imageObjectFit:ao,imageOverlayColor:io,imageContrastBaseColor:no,imageOverlayOpacity:so,imageBorder:mo,imagePriority:lo,imageUnoptimized:po,imageFill:co,contentAlignment:Ce,backgroundColor:fo,spacing:Po,border:uo,fluidContent:go,height:Co,isFlexibleHero:xe=!1,component:x,context:v,slots:ve})=>{let ye=x.variant,xo=xe?P(qe,{data:x,context:v,slot:ve.flexibleHeroContent}):Ao(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:At,descriptionSize:Bt,descriptionColor:It,descriptionWeight:Lt,descriptionFont:Vt,descriptionAlignment:St,descriptionTransform:Dt,descriptionDecoration:Ot,descriptionLetterSpacing:kt,descriptionLineCountRestrictions:Mt},"description"),component:x,context:v,parameterId:"descriptionText"})]}),vo=xe?P(qe,{data:x,context:v,slot:ve.flexibleHeroCta}):P(oe,{children:P(ke,{...R({primaryButtonVariant:_t,primaryButtonText:Ut,primaryButtonLink:zt,primaryButtonTextColor:Wt,primaryButtonTextWeight:Kt,primaryButtonTextFont:Yt,primaryButtonTextTransform:Gt,primaryButtonButtonColor:$t,primaryButtonBorder:qt,primaryButtonSize:Xt,primaryButtonIcon:Jt,primaryButtonTextSize:Qt,primaryButtonIconPosition:Zt,primaryButtonHoverButtonColor:jt,primaryButtonHoverTextColor:eo},"primaryButton"),component:x,context:v,parameterId:"primaryButtonText"})}),he={variant:ye,backgroundColor:fo,spacing:Po,border:uo,fluidContent:go,height:Co,textAlignmentClass:Ye({contentAlignment:Ce}),buttonAlignmentClass:Ke({contentAlignment:Ce}),demoHeroMedia:P(oe,{children:P(Me,{image:to,...R({imageWidth:oo,imageHeight:ro,imageObjectFit:ao,imageOverlayColor:io,imageContrastBaseColor:no,imageOverlayOpacity:so,imageBorder:mo,imagePriority:lo,imageUnoptimized:po,imageFill:co},"image"),component:x,context:v})}),demoHeroContent:xo,demoHeroCTA:vo};switch(ye){case"columns":case"columnsReverse":return P(Ue,{...he});default:return P(We,{...he})}};import{jsx as Bo}from"react/jsx-runtime";var Xe=({textColor:e,overlayAutoTint:o,...t})=>Bo(_,{...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",primaryButtonTextColor:"text-secondary",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 Io}from"react/jsx-runtime";var Je=e=>Io(_,{...e,isFlexibleHero:!0});import{jsx as Qe}from"react/jsx-runtime";var Lo=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||{}),Vo={FixedHero:Xe,FlexibleHero:Je},La=Vo;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(we,{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 So=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||{}),Ya=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 Do=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||{}),ii=tt;import Mo from"next/dynamic";import{jsx as ko}from"react/jsx-runtime";var Oo=e=>{switch(e.slotName){case"imageGalleryItems":return{component:()=>ko("div",{className:" mx-auto size-48"})};default:return l}};var at=(o=>(o.Items="imageGalleryItems",o))(at||{}),fi=Mo(()=>import("./image-gallery-AMU6FS7N.mjs").then(e=>e.ImageGallery));import Uo from"next/dynamic";import{jsx as it}from"react/jsx-runtime";var _o=e=>{switch(e.slotName){case"navigationFlyoutLeftContent":return{component:()=>it("div",{className:"h-40 w-48"})};case"navigationFlyoutRightContent":return{component:()=>it("div",{className:"h-40 w-48"})};default:return l}};var Ri=Uo(()=>import("./navigation-flyout-NAU6O2WG.mjs").then(e=>e.NavigationFlyout));import Ko from"next/dynamic";import{jsx as Wo}from"react/jsx-runtime";var zo=e=>{switch(e.slotName){case"links":return{component:()=>Wo("div",{className:"h-40 w-48"})};default:return l}};var Bi=Ko(()=>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 Yo=({slots:e,component:o,context:t,backgroundColor:r,headerCustomRenderer:a,contentCustomRenderer:i,footerCustomRenderer:n})=>W(He,{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 Go=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 nt=(r=>(r.PageContent="pageContent",r.PageHeader="pageHeader",r.PageFooter="pageFooter",r))(nt||{});import{UniformSlot as pe}from"@uniformdev/canvas-next-rsc/component";import{jsx as F}from"react/jsx-runtime";var $o=({parentComponent:e,slotName:o})=>{let t=e?.variant==="multiColumn";switch(o){case"reviewImage":return{component:()=>t?F("div",{className:"size-full"}):null};case"reviewPersonInfo":return{component:()=>t?F("div",{className:"h-20 w-full"}):F("div",{className:"h-20 w-52"})};case"reviewContent":return{component:()=>t?F("div",{className:"h-20 w-full"}):F("div",{className:"h-20 w-52"})};default:return l}};var le=(o=>(o.MultiColumn="multiColumn",o))(le||{}),st=(r=>(r.ReviewImage="reviewImage",r.ReviewPersonInfo="reviewPersonInfo",r.ReviewContent="reviewContent",r))(st||{});import{jsx as w,jsxs as mt}from"react/jsx-runtime";var lt=({stars:e,starsColor:o,activeStarsColor:t,showRatingLabel:r,backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,ReviewImage:d,ReviewPersonInfo:f,ReviewContent:u})=>w(c,{backgroundColor:a,spacing:i,border:n,fluidContent:s,height:m,children:mt("div",{className:"mx-auto flex lg:max-w-[60%]",children:[w("div",{className:"aspect-square size-12 shrink-0 rounded-full",children:d}),mt("div",{className:"ml-6",children:[f,w("div",{className:"py-4",children:w(O,{rating:e,showReviewLabel:r,starsColor:o,activeStarsColor:t})}),w("div",{className:"flex flex-col gap-y-5",children:u})]})]})});import{jsx as b,jsxs as pt}from"react/jsx-runtime";var dt=({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:pt("div",{className:"grid md:grid-cols-12",children:[pt("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 qo=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(dt,{...i});default:return E(lt,{...i})}};import{UniformSlot as Pe}from"@uniformdev/canvas-next-rsc/component";import{jsx as de}from"react/jsx-runtime";var Xo=({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 ft=(r=>(r.Left="left",r.Center="center",r.Right="right",r))(ft||{}),ce=(t=>(t.Columns="columns",t.ColumnsReverse="columnsReverse",t))(ce||{}),ct=(r=>(r.SectionContent="sectionContent",r.SectionMedia="sectionMedia",r.SectionCTA="sectionCTA",r))(ct||{});import{jsx as H,jsxs as Pt}from"react/jsx-runtime";var ut=({backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,variant:i,sectionMedia:n,sectionContent:s,sectionCTA:m,textAlignmentClass:d,buttonAlignmentClass:f})=>H(c,{backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,children:Pt("div",{className:p("grid grid-cols-1 items-center gap-4 px-4 lg:grid-cols-2 xl:px-0"),children:[H("div",{className:p("aspect-square",{"order-last":i==="columnsReverse"}),children:H("div",{className:"flex size-full items-center justify-center overflow-hidden",children:n})}),Pt("div",{className:"flex flex-col justify-center gap-8",children:[H("div",{className:p("flex flex-col gap-4",d),children:s}),H("div",{className:p("flex flex-wrap gap-2",f),children:m})]})]})});import{jsx as fe,jsxs as gt}from"react/jsx-runtime";var Ct=({backgroundColor:e,spacing:o,border:t,fluidContent:r,height:a,sectionMedia:i,sectionContent:n,sectionCTA:s,textAlignmentClass:m,buttonAlignmentClass:d})=>gt(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}),gt(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 xt=({contentAlignment:e})=>p("justify-center",{"!justify-start":e==="left","!justify-end":e==="right"}),vt=({contentAlignment:e})=>p("text-center",{"text-start":e==="left","text-end":e==="right"});import{jsx as A}from"react/jsx-runtime";var Jo=({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:vt({contentAlignment:e}),buttonAlignmentClass:xt({contentAlignment:e}),sectionMedia:A(Pe,{data:t,context:r,slot:o.sectionMedia}),sectionContent:A(Pe,{data:t,context:r,slot:o.sectionContent}),sectionCTA:A(Pe,{data:t,context:r,slot:o.sectionCTA})};switch(d){case"columns":case"columnsReverse":return A(ut,{...f});default:return A(Ct,{...f})}};import{UniformSlot as ht}from"@uniformdev/canvas-next-rsc/component";var yt=({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 Zo}from"react/jsx-runtime";var Qo=({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:Zo("table",{className:yt({size:e,textColor:o}),children:[N("thead",{children:N(ht,{slot:t.tableHead,context:a,data:r})}),N("tbody",{children:N(ht,{slot:t.tableBody,context:a,data:r})})]})})});import{jsx as Rt}from"react/jsx-runtime";var jo=e=>{switch(e.slotName){case"tableHead":return{component:()=>Rt("tr",{className:"h-20"})};case"tableBody":return{component:()=>Rt("tr",{className:"h-40"})};default:return l}};var bt=(t=>(t.TableHead="tableHead",t.TableBody="tableBody",t))(bt||{});import{UniformSlot as G}from"@uniformdev/canvas-next-rsc/component";import{jsx as K}from"react/jsx-runtime";var er=({slotName:e})=>{switch(e){case"testimonialSecondaryImage":return{component:()=>K("div",{className:"h-20 w-64"})};case"testimonialContent":return{component:()=>K("div",{className:"h-20 w-64"})};case"testimonialPrimaryImage":return{component:()=>K("div",{className:"size-full"})};case"testimonialAuthor":return{component:()=>K("div",{className:"h-20 w-64"})};default:return l}};var Tt=(t=>(t.WithLargeAvatar="withLargeAvatar",t.WithOverlappingImage="withOverlappingImage",t))(Tt||{}),Nt=(a=>(a.TestimonialSecondaryImage="testimonialSecondaryImage",a.TestimonialContent="testimonialContent",a.TestimonialPrimaryImage="testimonialPrimaryImage",a.TestimonialAuthor="testimonialAuthor",a))(Nt||{});import{jsx as B,jsxs as or}from"react/jsx-runtime";var Ft=({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:or("div",{className:"mx-auto flex flex-col items-center md:max-w-[80%]",children:[B("div",{children:r}),B("div",{className:"my-8",children:o}),B("div",{className:"size-10 rounded-full",children:e}),B("div",{className:"mt-4 flex gap-3",children:t})]})});import{jsx as I,jsxs as Y}from"react/jsx-runtime";var wt=({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:Y("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}),Y("div",{className:"flex flex-col gap-y-8",children:[I("div",{className:"",children:o}),Y("div",{className:"flex items-center justify-between",children:[Y("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 L,jsxs as ue}from"react/jsx-runtime";var Et=({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:L(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:[L("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:[L("div",{className:"",children:o}),ue("div",{className:"flex items-center justify-between",children:[L("div",{className:"gap-3",children:t}),r]})]})]})})});import{jsx as y}from"react/jsx-runtime";var tr=({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(wt,{...d});case"withOverlappingImage":return y(Et,{...d});default:return y(Ft,{...d})}};export{yo as a,Ie as b,ho as c,No as d,Ve as e,Le as f,Ro as g,De as h,Lr as i,Fo as j,Ge as k,ee as l,Ze as m,La as n,Lo as o,et as p,Ya as q,So as r,rt as s,ot as t,ii as u,Do as v,at as w,fi as x,Oo as y,Ri as z,_o as A,Bi as B,zo as C,Yo as D,nt as E,Go as F,qo as G,le as H,st as I,$o as J,Jo as K,ft as L,ce as M,ct as N,Xo as O,Qo as P,bt as Q,jo as R,tr as S,Tt as T,Nt as U,er as V};
|
package/dist/modal-HKMQGV4B.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use client";import{a as u}from"./chunk-2SEOCBRK.mjs";import"./chunk-MSXDLSXH.mjs";import{c as s}from"./chunk-S7CSCIW4.mjs";import"./chunk-YEKQJ4YC.mjs";import{useCallback as d,useState as N,useRef as S,useEffect as y}from"react";import{UniformSlot as c}from"@uniformdev/canvas-next-rsc/component";import{jsx as v}from"react/jsx-runtime";var h=({className:o,...t})=>v("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:s("size-8",o),...t,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 M=({showModal:o})=>s("fixed left-0 top-0 size-full",{hidden:!o,block:o}),P=({maxWidth:o,backgroundColor:t})=>s("rounded-lg shadow-lg relative",u[o||"small"],{[`bg-${t}`]:!!t}),b=({disableCloseModalOnClickOutside:o})=>s("group absolute right-4 top-4 opacity-40 hover:opacity-100",{hidden:o});import{jsx as e,jsxs as k}from"react/jsx-runtime";var O=({slots:o,component:t,context:a,maxWidth:x,backgroundColor:E,closeIconColor:p,disableCloseModalOnClickOutside:r})=>{let i=S(null),[C,n]=N(!1),F=d(()=>{r||n(!1)},[r]),f=d(()=>{n(l=>!l)},[]),w=d(l=>{l.stopPropagation()},[]);return y(()=>{if(!i.current)return;let l=i.current.querySelectorAll("button, a"),g=()=>n(!1);return l.forEach(m=>{m.addEventListener("click",g)}),()=>l.forEach(m=>{m.removeEventListener("click",g)})},[]),k("div",{children:[e("div",{onClick:f,children:e(c,{data:t,context:a,slot:o.trigger})}),e("div",{className:M({showModal:C}),children:e("dialog",{open:C,onClick:F,"aria-label":"Close modal","aria-modal":"true",className:"flex size-full items-center justify-center bg-black/50 px-4",children:k("form",{method:"dialog",className:P({maxWidth:x,backgroundColor:E}),onClick:w,children:[e("button",{onClick:f,className:b({disableCloseModalOnClickOutside:r}),children:e(h,{className:s({[`fill-${p}`]:p})})}),e("div",{className:"p-6 md:p-8",children:e(c,{data:t,context:a,slot:o.modalContent})}),o?.modalActions?.items?.length&&e("div",{ref:i,className:"border-t p-6 md:p-8",children:e(c,{data:t,context:a,slot:o.modalActions})})]})})})]})};export{O as Modal};
|
|
File without changes
|