@uniformdev/csk-components 6.0.41-alpha.1 → 6.0.44

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.
@@ -0,0 +1 @@
1
+ import{a as s}from"./chunk-RZFK2OR7.mjs";import{a as e,c as l}from"./chunk-S7CSCIW4.mjs";import{jsx as m}from"react/jsx-runtime";var v=({className:r,wrapperClassName:t,direction:o,justifyContent:i,gap:a,alignItems:p,backgroundColor:n,spacing:f,border:P,fluidContent:c,fullHeight:y,children:x})=>m(s,{backgroundColor:n,spacing:f,border:P,fluidContent:c,fullHeight:y,wrapperClassName:t,children:m("div",{className:l("flex",{[e(o,"flex-{value}")]:o,[e(i,"justify-{value}")]:i,[e(a,"gap-{value}")]:a,[e(p,"items-{value}")]:p},r),children:x})});import{jsx as u}from"react/jsx-runtime";var d=({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 T=g(()=>import("./video-VG6ZQCKN.mjs").then(r=>r.Video));export{v as a,d as b,T as c};
@@ -595,6 +595,7 @@ declare const _default: react.ComponentType<ComponentProps<ThemeSwitcherProps>>;
595
595
  declare const Video: FC<VideoProps>;
596
596
 
597
597
  type VideoParameters = {
598
+ video?: AssetParamValue;
598
599
  url?: LinkParamValue;
599
600
  placeholderImage?: AssetParamValue;
600
601
  autoPlay?: boolean;
@@ -602,6 +603,9 @@ type VideoParameters = {
602
603
  loop?: boolean;
603
604
  controls?: boolean;
604
605
  muted?: boolean;
606
+ overlayColor?: string;
607
+ overlayOpacity?: string;
608
+ border?: string | ViewPort<string>;
605
609
  };
606
610
  type VideoProps = ComponentProps<VideoParameters>;
607
611
 
@@ -1 +1 @@
1
- import{B as re,D as te,E as Yo,G as ae,H as qo,I as Ko,K as pe,L as Qo,M as Zo,N as jo,P as me,Q as er,S as ie,T as tr,U as ar,a as O,b as Vo,d as Y,e as Ro,f as Do,h as Ho,i as q,k as Mo,l as $o,m as zo,n as w,p as Eo,q as Q,s as _o,t as Jo,u as Z,w as Oo,x as j,z as oe}from"../../chunk-DBSKI4UW.mjs";import{b as Xo,c as ee}from"../../chunk-HDWSBDVE.mjs";import{a as or,b as rr,c as ne}from"../../chunk-PC5W2GRG.mjs";import{a as Ne,b as Re,c as De}from"../../chunk-BHR3T7BX.mjs";import{a as F}from"../../chunk-VEUVLMJO.mjs";import{a as v,b as I,d as B}from"../../chunk-26BSLQVU.mjs";import"../../chunk-3TBBNSCU.mjs";import{a as g}from"../../chunk-EIQPM3DQ.mjs";import{a as y}from"../../chunk-QHIWJPL6.mjs";import{a as Lo,b as No,c as X}from"../../chunk-CLSZO62H.mjs";import{a as Wo,b as Uo,c as K}from"../../chunk-UDP47PNB.mjs";import{a as Ve,b as Le}from"../../chunk-VZCFPWET.mjs";import{a as Ge}from"../../chunk-RZFK2OR7.mjs";import"../../chunk-6POLDE2K.mjs";import{a as n}from"../../chunk-HDKBSM4X.mjs";import{a as x}from"../../chunk-JNIJ5N3Y.mjs";import{a as Se}from"../../chunk-56OQGKRM.mjs";import"../../chunk-MSXDLSXH.mjs";import{a as Ae,c as C,d as ke}from"../../chunk-2OD4OVSF.mjs";import{c as d}from"../../chunk-S7CSCIW4.mjs";import pr from"next/dynamic";var He=(e=>(e.AccordionItemContent="accordionItemContent",e))(He||{}),se=pr(()=>import("../../accordion-item-ZS3TSISI.mjs").then(o=>o.AccordionItem));import{UniformText as mr}from"@uniformdev/canvas-next-rsc/component";import{jsx as We}from"react/jsx-runtime";var Ue=({className:o,...e})=>We("svg",{viewBox:"0 0 6 6","aria-hidden":"true",className:d("w-1.5 h-1.5",o),...e,children:We("circle",{r:"3",cx:"3",cy:"3"})});var Me=({pill:o,size:e,dotColor:r,borderColor:t,backgroundColor:a})=>d("inline-flex items-center w-fit",{"rounded-full":o,"rounded-md":!o,"gap-x-1.5":!!r,[`ring-1 ring-inset ring-${t}`]:!!t,[`bg-${a}`]:!!a,[`p-${e}`]:e});import{jsx as le,jsxs as nr}from"react/jsx-runtime";var $e=({component:o,context:e,textColor:r,backgroundColor:t,borderColor:a,dotColor:p,pill:i=!1,size:m})=>nr("div",{className:Me({pill:i,size:m,dotColor:p,borderColor:a,backgroundColor:t}),children:[p&&le(Ue,{className:d({[`fill-${p}`]:p})}),le(y,{color:r,size:"xs",children:le(mr,{placeholder:"Badge text goes here",parameterId:"text",component:o,context:e})})]});var de=n($e);import{flattenValues as ir}from"@uniformdev/canvas";import{jsx as S}from"react/jsx-runtime";var ze=o=>{switch(o){case"slash":return S("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:S("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 20.247 6-16.5"})});case"chevron":default:return S("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:S("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})}};import{jsx as A,jsxs as sr}from"react/jsx-runtime";var Ee=({separator:o,links:e,size:r,color:t,font:a,transform:p})=>{let i=e?.reduce((m,s)=>{let{title:l,link:f}=ir(s)||{};return l?[...m,{title:l,link:C(f)}]:m},[])||[];return i.length?A("ul",{className:d("flex items-center",{[`text-${r}`]:!!r,[`text-${t}`]:!!t}),children:i.map(({title:m,link:s},l)=>sr("li",{className:"flex items-center",children:[!!l&&A("div",{className:"mx-2 size-[1em]",children:ze(o)}),s?A(I,{variant:"link",textColor:t,className:d({[`font-${a}`]:!!a,[`text-${r}`]:!!r,[p||""]:!!p}),href:s,children:m}):A(y,{size:r,font:a,color:t,transform:p,children:m})]},`${m}-${l}`))}):null};var fe=n(Ee);import{useMemo as lr}from"react";import{UniformText as dr}from"@uniformdev/canvas-next-rsc/component";import{jsx as k}from"react/jsx-runtime";var _e=({component:o,context:e,link:r,textColor:t,textFont:a,textWeight:p,textTransform:i,buttonColor:m,icon:s,iconPosition:l,border:f,size:P,textSize:u,hoverButtonColor:c,hoverTextColor:b,className:z,onClick:T,text:E})=>{let Fe=C(r),Ao=e.previewMode==="editor"&&e?.isContextualEditing,_=lr(()=>{let[J]=x(s),{url:h,title:Go=""}=J||{};if(h)return{url:h,title:Go}},[s]),ko=()=>{if(!_)return;let{url:J,title:h}=_;return k(g,{src:J,alt:h,width:20,height:20,containerStyle:{width:"20px",height:"20px"}})};return!(!!E||!!_)&&!Ao?null:k(I,{variant:o.variant,href:Fe,border:f,size:P,onClick:T,className:z,textSize:u,isActive:e.matchedRoute===Fe,textColor:t,textFont:a,textWeight:p,textTransform:i,buttonColor:m,hoverButtonColor:c,hoverTextColor:b,icon:k(ko,{}),iconPosition:l,children:k(dr,{placeholder:"Button text goes here",parameterId:"text",component:o,context:e})})};var Pe=n(_e);import{UniformSlot as fr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Je}from"react/jsx-runtime";var G=({displayName:o,anchor:e,slots:r,component:t,context:a,backgroundColor:p,spacing:i,border:m,fluidContent:s,fullHeight:l,className:f})=>Je(Ge,{title:o,id:e,backgroundColor:p,spacing:i,border:m,fluidContent:s,fullHeight:l,className:f,children:Je(fr,{data:t,context:a,slot:r.containerContent})});var Oe=(e=>(e.ContainerContent="containerContent",e))(Oe||{});import{jsx as Xe}from"react/jsx-runtime";var V=({color:o,thickness:e,width:r,alignment:t})=>Xe("div",{className:d("flex w-full",`justify-${t||"center"}`),children:Xe("div",{className:d({[`bg-${o}`]:!!o}),style:{width:r,height:e}})});import{UniformSlot as Pr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ye}from"react/jsx-runtime";var qe=({direction:o,justifyContent:e,gap:r,alignItems:t,backgroundColor:a,spacing:p,border:i,fluidContent:m,fullHeight:s,slots:l,component:f,context:P,className:u,wrapperClassName:c})=>Ye(Ne,{direction:o,justifyContent:e,gap:r,alignItems:t,backgroundColor:a,spacing:p,border:i,fluidContent:m,fullHeight:s,wrapperClassName:c,className:u,children:Ye(Pr,{data:f,context:P,slot:l.flexItem})});var ce=n(qe);import{UniformSlot as cr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ke}from"react/jsx-runtime";var L=({alignSelf:o,shrink:e,context:r,component:t,slots:a})=>Ke(Re,{alignSelf:o,shrink:e,children:Ke(cr,{data:t,context:r,slot:a.inner})});import{UniformSlot as xr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Qe}from"react/jsx-runtime";var Ze=({columnsCount:o,gapX:e,gapY:r,backgroundColor:t,spacing:a,border:p,fluidContent:i,fullHeight:m,slots:s,component:l,context:f,className:P})=>Qe(Ve,{className:P,columnsCount:o,gapX:e,gapY:r,backgroundColor:t,spacing:a,border:p,fluidContent:i,fullHeight:m,children:Qe(xr,{data:l,context:f,slot:s.gridInner})});var je=(e=>(e.GridInner="gridInner",e))(je||{}),xe=n(Ze);import{UniformSlot as ur}from"@uniformdev/canvas-next-rsc/component";import{jsx as eo}from"react/jsx-runtime";var oo=({columnStart:o,columnSpan:e,rowStart:r,className:t,rowSpan:a,context:p,component:i,slots:m})=>eo(Le,{columnStart:o,columnSpan:e,rowStart:r,rowSpan:a,className:t,children:eo(ur,{data:i,context:p,slot:m.inner})});var ro=(e=>(e.Inner="inner",e))(ro||{}),ue=n(oo);import{UniformText as Cr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ce}from"react/jsx-runtime";var to=({icon:o,size:e,tag:r,color:t,weight:a,font:p,transform:i,decoration:m,letterSpacing:s,alignment:l,component:f,context:P})=>{let[u]=x(o),{url:c,title:b=""}=u||{};return Ce(F,{icon:c?Ce(g,{src:c,alt:b,fill:!0}):void 0,size:e,tag:r,color:t,weight:a,font:p,transform:i,decoration:m,letterSpacing:s,alignment:l,children:Ce(Cr,{placeholder:"Text goes here",parameterId:"text",component:f,context:P})})};var ge=n(to);import{jsx as ao}from"react/jsx-runtime";var po=({context:o,component:e,width:r,height:t})=>{let a=o.previewMode==="editor"&&o.isContextualEditing,p=e?._id?.includes("placeholder_");return!a||p?null:ao("div",{style:{width:r?`${r}px`:"auto",height:t?`${t}px`:"auto"},children:ao(B,{type:"image",placeholder:"Please add an asset to display an image"})})};import{jsx as mo}from"react/jsx-runtime";var N=({image:o,objectFit:e,width:r,height:t,overlayColor:a,overlayOpacity:p,border:i,priority:m,unoptimized:s,context:l,component:f})=>{let[P]=x(o);if(!P)return mo(po,{context:l,component:f,width:r,height:t});let{url:u,title:c=""}=P;return mo(g,{containerStyle:{...r?{width:`${r}px`}:{},...t?{height:`${t}px`}:{}},src:u,alt:c,fill:!0,unoptimized:s,priority:m,sizes:"100%",style:{objectFit:e},overlayColor:a,overlayOpacity:p,border:i})};import{UniformSlot as gr}from"@uniformdev/canvas-next-rsc/component";import{jsx as no}from"react/jsx-runtime";var io=({component:o,context:e,slots:r,link:t,openInNewTab:a})=>no(v,{link:C(t),openInNewTab:a,children:no(gr,{data:o,context:e,slot:r.linkContent})});var so=(e=>(e.LinkContent="linkContent",e))(so||{}),ye=n(io);import{UniformText as br}from"@uniformdev/canvas-next-rsc/component";var lo=({activeState:o,context:e,href:r})=>d("hover:underline",{underline:o&&Ae(e.matchedRoute,e.dynamicInputs)===r});import{Fragment as yr}from"react";import{jsx as fo}from"react/jsx-runtime";var Po=({href:o,isExternalLink:e,children:r})=>o?fo(v,{link:o,openInNewTab:e,rel:e?"noopener noreferrer":"",children:r}):fo(yr,{children:r});import{jsx as R}from"react/jsx-runtime";var co=({icon:o,link:e,activeState:r,size:t,tag:a,color:p,weight:i,font:m,transform:s,decoration:l,letterSpacing:f,alignment:P,component:u,context:c})=>{let b=C(e),[z]=x(o),{url:T,title:E=""}=z||{};return R(Po,{href:b,isExternalLink:ke(b),children:R(F,{textClassName:lo({activeState:r,context:c,href:b}),icon:T&&R(g,{src:T,alt:E,fill:!0}),size:t,tag:a,color:p,weight:i,font:m,transform:s,decoration:l,letterSpacing:f,alignment:P,children:R(br,{placeholder:"Text goes here",parameterId:"text",className:"whitespace-nowrap",component:u,context:c})})})};var be=n(co);import{UniformRichText as Tr}from"@uniformdev/canvas-next-rsc/component";import{jsx as xo}from"react/jsx-runtime";var uo=({color:o,lineCountRestrictions:e,font:r,component:t,className:a})=>xo(y,{lineCountRestrictions:e,color:o,font:r,children:xo(Tr,{className:d("prose max-w-full marker:text-current [&_*:not(pre)]:text-current",a),parameterId:"text",component:t,placeholder:"Rich text content goes here..."})});var Te=n(uo);import{jsx as hr}from"react/jsx-runtime";var D=({size:o,component:{variant:e}})=>{let r=e==="horizontal";return hr("div",{className:d({[`w-${o}`]:r,[`h-${o}`]:!r})})};var he=(e=>(e.Horizontal="horizontal",e))(he||{});import{UniformSlot as vr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ir}from"react/jsx-runtime";var Co=({slots:o,component:e,context:r})=>Ir(vr,{data:e,context:r,slot:o.tabContent});var go=(e=>(e.TabContent="tabContent",e))(go||{}),ve=n(Co);import{UniformSlot as Br}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ie}from"react/jsx-runtime";var H=({component:o,context:e,slots:r,alignment:t})=>Ie("td",{children:Ie("div",{className:d("w-fit",yo[t||"left"]),children:Ie(Br,{slot:r.tableCustomCellContent,context:e,data:o})})});var yo={left:"ml-0",center:"mx-auto",right:"ml-auto"},bo=(e=>(e.TableCustomCellContent="tableCustomCellContent",e))(bo||{});import{UniformText as wr}from"@uniformdev/canvas-next-rsc/component";import{jsx as To}from"react/jsx-runtime";var W=({component:o,context:e})=>To("td",{children:To(wr,{component:o,context:e,parameterId:"value",placeholder:"Value"})});import{UniformText as Fr}from"@uniformdev/canvas-next-rsc/component";import{jsx as ho}from"react/jsx-runtime";var U=({component:o,context:e})=>ho("th",{children:ho(Fr,{component:o,context:e,parameterId:"value",placeholder:"Value"})});import{UniformSlot as Sr}from"@uniformdev/canvas-next-rsc/component";import{jsx as vo}from"react/jsx-runtime";var M=({slots:o,component:e,context:r})=>vo("tr",{children:vo(Sr,{data:e,context:r,slot:o.tableRowCells})});import{UniformText as Ar}from"@uniformdev/canvas-next-rsc/component";import{jsx as Io}from"react/jsx-runtime";var Bo=({tag:o,size:e,color:r,weight:t,font:a,transform:p,decoration:i,letterSpacing:m,lineCountRestrictions:s,alignment:l,component:f,context:P})=>Io(y,{color:r,size:e,font:a,weight:t,transform:p,decoration:i,letterSpacing:m,alignment:l,lineCountRestrictions:s,children:Io(Ar,{placeholder:"Text goes here",parameterId:"text",as:o||void 0,component:f,context:P})});var Be=n(Bo);import kr from"next/dynamic";var we=kr(()=>import("../../theme-switcher-JE6MRNXM.mjs").then(o=>n(o.ThemeSwitcher)));import{jsx as Gr}from"react/jsx-runtime";var wo=({context:o,component:e})=>{let r=o.previewMode==="editor"&&o.isContextualEditing,t=e?._id?.includes("placeholder_");return!r||t?null:Gr(B,{type:"video",placeholder:"Please add video link to display a video"})};import{jsx as Fo}from"react/jsx-runtime";var $=({url:o,placeholderImage:e,autoPlay:r,lazyLoad:t,loop:a,controls:p,muted:i,component:m,context:s})=>{if(!o||o.type!=="url"||!o.path)return Fo(wo,{component:m,context:s});let[l]=x(e);return Fo(De,{url:o.path,placeholderImageUrl:l?.url,autoPlay:r,lazyLoad:t,loop:a,controls:p,muted:i})};var So={accordion:{component:O},accordionItem:{component:se},badge:{component:de},banner:{component:X},button:{component:Pe},card:{component:Y},carousel:{component:q},container:{component:G},countdown:{component:K},divider:{component:V},grid:{component:xe},gridItem:{component:ue},flex:{component:ce},flexItem:{component:L},header:{component:Z},section:{component:pe},iconLabel:{component:ge},image:{component:N},page:{component:te},richText:{component:Te},spacer:{component:D},text:{component:Be},video:{component:$},tabs:{component:ne},tab:{component:ve},table:{component:me},tableRow:{component:M},tableHeaderCell:{component:U},tableDataCell:{component:W},tableCustomCell:{component:H},modal:{component:ee},imageGallery:{component:j},testimonial:{component:ie},breadcrumbs:{component:fe},review:{component:ae},navigationLink:{component:be},navigationGroup:{component:re},navigationFlyout:{component:oe},footer:{component:Q},themeSwitcher:{component:we},link:{component:ye},fixedHero:{component:w.FixedHero},flexibleHero:{component:w.FlexibleHero}},an=So,pn=Se(So);export{O as Accordion,se as AccordionItem,He as AccordionItemSlots,Vo as AccordionSlots,de as Badge,X as Banner,Lo as BannerContentAlignment,No as BannerSlots,fe as Breadcrumbs,Pe as Button,Y as Card,Do as CardSlots,Ro as CardVariants,q as Carousel,Ho as CarouselSlots,Yo as CommonPageSlots,G as Container,Oe as ContainerSlots,K as Countdown,Wo as CountdownSlots,Uo as CountdownVariants,w as DemoHero,Mo as DemoHeroContentAlignment,$o as DemoHeroVariants,V as Divider,ce as Flex,L as FlexItem,zo as FlexibleHeroSlots,Q as Footer,Eo as FooterSlots,xe as Grid,ue as GridItem,ro as GridItemSlots,je as GridSlots,Z as Header,_o as HeaderSlots,Jo as HeaderVariants,ge as IconLabel,N as Image,j as ImageGallery,Oo as ImageGallerySlots,ye as Link,so as LinkSlots,ee as Modal,Xo as ModalSlots,oe as NavigationFlyout,re as NavigationGroup,be as NavigationLink,te as Page,ae as Review,Ko as ReviewSlots,qo as ReviewVariants,Te as RichText,pe as Section,Qo as SectionContentAlignment,jo as SectionSlots,Zo as SectionVariants,D as Spacer,he as SpacerVariants,ve as Tab,go as TabSlots,me as Table,H as TableCustomCell,bo as TableCustomCellSlots,W as TableDataCell,U as TableHeaderCell,M as TableRow,er as TableSlots,ne as Tabs,rr as TabsSlots,or as TabsVariants,ie as Testimonial,ar as TestimonialSlots,tr as TestimonialVariants,Be as Text,we as ThemeSwitcher,$ as Video,pn as componentResolver,So as cskComponentsMapping,an as default};
1
+ import{B as re,D as te,E as Yo,G as ae,H as qo,I as Ko,K as pe,L as Qo,M as Zo,N as jo,P as me,Q as er,S as ie,T as tr,U as ar,a as O,b as Go,d as Y,e as Ro,f as Do,h as Ho,i as q,k as Mo,l as $o,m as zo,n as F,p as Eo,q as Q,s as _o,t as Jo,u as Z,w as Oo,x as j,z as oe}from"../../chunk-DBSKI4UW.mjs";import{b as Xo,c as ee}from"../../chunk-HDWSBDVE.mjs";import{a as or,b as rr,c as ne}from"../../chunk-PC5W2GRG.mjs";import{a as Ne,b as Re,c as De}from"../../chunk-JTRZPR2Q.mjs";import{a as S}from"../../chunk-VEUVLMJO.mjs";import{a as I,b as B,d as w}from"../../chunk-26BSLQVU.mjs";import"../../chunk-3TBBNSCU.mjs";import{a as y}from"../../chunk-EIQPM3DQ.mjs";import{a as b}from"../../chunk-QHIWJPL6.mjs";import{a as Lo,b as No,c as X}from"../../chunk-CLSZO62H.mjs";import{a as Wo,b as Uo,c as K}from"../../chunk-UDP47PNB.mjs";import{a as Ge,b as Le}from"../../chunk-VZCFPWET.mjs";import{a as Ve}from"../../chunk-RZFK2OR7.mjs";import"../../chunk-6POLDE2K.mjs";import{a as n}from"../../chunk-HDKBSM4X.mjs";import{a as u}from"../../chunk-JNIJ5N3Y.mjs";import{a as Se}from"../../chunk-56OQGKRM.mjs";import"../../chunk-MSXDLSXH.mjs";import{a as Ae,c as g,d as ke}from"../../chunk-2OD4OVSF.mjs";import{c as d}from"../../chunk-S7CSCIW4.mjs";import pr from"next/dynamic";var He=(e=>(e.AccordionItemContent="accordionItemContent",e))(He||{}),se=pr(()=>import("../../accordion-item-ZS3TSISI.mjs").then(o=>o.AccordionItem));import{UniformText as mr}from"@uniformdev/canvas-next-rsc/component";import{jsx as We}from"react/jsx-runtime";var Ue=({className:o,...e})=>We("svg",{viewBox:"0 0 6 6","aria-hidden":"true",className:d("w-1.5 h-1.5",o),...e,children:We("circle",{r:"3",cx:"3",cy:"3"})});var Me=({pill:o,size:e,dotColor:r,borderColor:t,backgroundColor:a})=>d("inline-flex items-center w-fit",{"rounded-full":o,"rounded-md":!o,"gap-x-1.5":!!r,[`ring-1 ring-inset ring-${t}`]:!!t,[`bg-${a}`]:!!a,[`p-${e}`]:e});import{jsx as le,jsxs as nr}from"react/jsx-runtime";var $e=({component:o,context:e,textColor:r,backgroundColor:t,borderColor:a,dotColor:p,pill:i=!1,size:m})=>nr("div",{className:Me({pill:i,size:m,dotColor:p,borderColor:a,backgroundColor:t}),children:[p&&le(Ue,{className:d({[`fill-${p}`]:p})}),le(b,{color:r,size:"xs",children:le(mr,{placeholder:"Badge text goes here",parameterId:"text",component:o,context:e})})]});var de=n($e);import{flattenValues as ir}from"@uniformdev/canvas";import{jsx as A}from"react/jsx-runtime";var ze=o=>{switch(o){case"slash":return A("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m9 20.247 6-16.5"})});case"chevron":default:return A("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor",children:A("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m8.25 4.5 7.5 7.5-7.5 7.5"})})}};import{jsx as k,jsxs as sr}from"react/jsx-runtime";var Ee=({separator:o,links:e,size:r,color:t,font:a,transform:p})=>{let i=e?.reduce((m,s)=>{let{title:l,link:f}=ir(s)||{};return l?[...m,{title:l,link:g(f)}]:m},[])||[];return i.length?k("ul",{className:d("flex items-center",{[`text-${r}`]:!!r,[`text-${t}`]:!!t}),children:i.map(({title:m,link:s},l)=>sr("li",{className:"flex items-center",children:[!!l&&k("div",{className:"mx-2 size-[1em]",children:ze(o)}),s?k(B,{variant:"link",textColor:t,className:d({[`font-${a}`]:!!a,[`text-${r}`]:!!r,[p||""]:!!p}),href:s,children:m}):k(b,{size:r,font:a,color:t,transform:p,children:m})]},`${m}-${l}`))}):null};var fe=n(Ee);import{useMemo as lr}from"react";import{UniformText as dr}from"@uniformdev/canvas-next-rsc/component";import{jsx as V}from"react/jsx-runtime";var _e=({component:o,context:e,link:r,textColor:t,textFont:a,textWeight:p,textTransform:i,buttonColor:m,icon:s,iconPosition:l,border:f,size:P,textSize:x,hoverButtonColor:c,hoverTextColor:C,className:T,onClick:h,text:E})=>{let Fe=g(r),Ao=e.previewMode==="editor"&&e?.isContextualEditing,_=lr(()=>{let[J]=u(s),{url:v,title:Vo=""}=J||{};if(v)return{url:v,title:Vo}},[s]),ko=()=>{if(!_)return;let{url:J,title:v}=_;return V(y,{src:J,alt:v,width:20,height:20,containerStyle:{width:"20px",height:"20px"}})};return!(!!E||!!_)&&!Ao?null:V(B,{variant:o.variant,href:Fe,border:f,size:P,onClick:h,className:T,textSize:x,isActive:e.matchedRoute===Fe,textColor:t,textFont:a,textWeight:p,textTransform:i,buttonColor:m,hoverButtonColor:c,hoverTextColor:C,icon:V(ko,{}),iconPosition:l,children:V(dr,{placeholder:"Button text goes here",parameterId:"text",component:o,context:e})})};var Pe=n(_e);import{UniformSlot as fr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Je}from"react/jsx-runtime";var G=({displayName:o,anchor:e,slots:r,component:t,context:a,backgroundColor:p,spacing:i,border:m,fluidContent:s,fullHeight:l,className:f})=>Je(Ve,{title:o,id:e,backgroundColor:p,spacing:i,border:m,fluidContent:s,fullHeight:l,className:f,children:Je(fr,{data:t,context:a,slot:r.containerContent})});var Oe=(e=>(e.ContainerContent="containerContent",e))(Oe||{});import{jsx as Xe}from"react/jsx-runtime";var L=({color:o,thickness:e,width:r,alignment:t})=>Xe("div",{className:d("flex w-full",`justify-${t||"center"}`),children:Xe("div",{className:d({[`bg-${o}`]:!!o}),style:{width:r,height:e}})});import{UniformSlot as Pr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ye}from"react/jsx-runtime";var qe=({direction:o,justifyContent:e,gap:r,alignItems:t,backgroundColor:a,spacing:p,border:i,fluidContent:m,fullHeight:s,slots:l,component:f,context:P,className:x,wrapperClassName:c})=>Ye(Ne,{direction:o,justifyContent:e,gap:r,alignItems:t,backgroundColor:a,spacing:p,border:i,fluidContent:m,fullHeight:s,wrapperClassName:c,className:x,children:Ye(Pr,{data:f,context:P,slot:l.flexItem})});var ce=n(qe);import{UniformSlot as cr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ke}from"react/jsx-runtime";var N=({alignSelf:o,shrink:e,context:r,component:t,slots:a})=>Ke(Re,{alignSelf:o,shrink:e,children:Ke(cr,{data:t,context:r,slot:a.inner})});import{UniformSlot as xr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Qe}from"react/jsx-runtime";var Ze=({columnsCount:o,gapX:e,gapY:r,backgroundColor:t,spacing:a,border:p,fluidContent:i,fullHeight:m,slots:s,component:l,context:f,className:P})=>Qe(Ge,{className:P,columnsCount:o,gapX:e,gapY:r,backgroundColor:t,spacing:a,border:p,fluidContent:i,fullHeight:m,children:Qe(xr,{data:l,context:f,slot:s.gridInner})});var je=(e=>(e.GridInner="gridInner",e))(je||{}),xe=n(Ze);import{UniformSlot as ur}from"@uniformdev/canvas-next-rsc/component";import{jsx as eo}from"react/jsx-runtime";var oo=({columnStart:o,columnSpan:e,rowStart:r,className:t,rowSpan:a,context:p,component:i,slots:m})=>eo(Le,{columnStart:o,columnSpan:e,rowStart:r,rowSpan:a,className:t,children:eo(ur,{data:i,context:p,slot:m.inner})});var ro=(e=>(e.Inner="inner",e))(ro||{}),ue=n(oo);import{UniformText as Cr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ce}from"react/jsx-runtime";var to=({icon:o,size:e,tag:r,color:t,weight:a,font:p,transform:i,decoration:m,letterSpacing:s,alignment:l,component:f,context:P})=>{let[x]=u(o),{url:c,title:C=""}=x||{};return Ce(S,{icon:c?Ce(y,{src:c,alt:C,fill:!0}):void 0,size:e,tag:r,color:t,weight:a,font:p,transform:i,decoration:m,letterSpacing:s,alignment:l,children:Ce(Cr,{placeholder:"Text goes here",parameterId:"text",component:f,context:P})})};var ge=n(to);import{jsx as ao}from"react/jsx-runtime";var po=({context:o,component:e,width:r,height:t})=>{let a=o.previewMode==="editor"&&o.isContextualEditing,p=e?._id?.includes("placeholder_");return!a||p?null:ao("div",{style:{width:r?`${r}px`:"auto",height:t?`${t}px`:"auto"},children:ao(w,{type:"image",placeholder:"Please add an asset to display an image"})})};import{jsx as mo}from"react/jsx-runtime";var R=({image:o,objectFit:e,width:r,height:t,overlayColor:a,overlayOpacity:p,border:i,priority:m,unoptimized:s,context:l,component:f})=>{let[P]=u(o);if(!P)return mo(po,{context:l,component:f,width:r,height:t});let{url:x,title:c=""}=P;return mo(y,{containerStyle:{...r?{width:`${r}px`}:{},...t?{height:`${t}px`}:{}},src:x,alt:c,fill:!0,unoptimized:s,priority:m,sizes:"100%",style:{objectFit:e},overlayColor:a,overlayOpacity:p,border:i})};import{UniformSlot as gr}from"@uniformdev/canvas-next-rsc/component";import{jsx as no}from"react/jsx-runtime";var io=({component:o,context:e,slots:r,link:t,openInNewTab:a})=>no(I,{link:g(t),openInNewTab:a,children:no(gr,{data:o,context:e,slot:r.linkContent})});var so=(e=>(e.LinkContent="linkContent",e))(so||{}),ye=n(io);import{UniformText as br}from"@uniformdev/canvas-next-rsc/component";var lo=({activeState:o,context:e,href:r})=>d("hover:underline",{underline:o&&Ae(e.matchedRoute,e.dynamicInputs)===r});import{Fragment as yr}from"react";import{jsx as fo}from"react/jsx-runtime";var Po=({href:o,isExternalLink:e,children:r})=>o?fo(I,{link:o,openInNewTab:e,rel:e?"noopener noreferrer":"",children:r}):fo(yr,{children:r});import{jsx as D}from"react/jsx-runtime";var co=({icon:o,link:e,activeState:r,size:t,tag:a,color:p,weight:i,font:m,transform:s,decoration:l,letterSpacing:f,alignment:P,component:x,context:c})=>{let C=g(e),[T]=u(o),{url:h,title:E=""}=T||{};return D(Po,{href:C,isExternalLink:ke(C),children:D(S,{textClassName:lo({activeState:r,context:c,href:C}),icon:h&&D(y,{src:h,alt:E,fill:!0}),size:t,tag:a,color:p,weight:i,font:m,transform:s,decoration:l,letterSpacing:f,alignment:P,children:D(br,{placeholder:"Text goes here",parameterId:"text",className:"whitespace-nowrap",component:x,context:c})})})};var be=n(co);import{UniformRichText as Tr}from"@uniformdev/canvas-next-rsc/component";import{jsx as xo}from"react/jsx-runtime";var uo=({color:o,lineCountRestrictions:e,font:r,component:t,className:a})=>xo(b,{lineCountRestrictions:e,color:o,font:r,children:xo(Tr,{className:d("prose max-w-full marker:text-current [&_*:not(pre)]:text-current",a),parameterId:"text",component:t,placeholder:"Rich text content goes here..."})});var Te=n(uo);import{jsx as hr}from"react/jsx-runtime";var H=({size:o,component:{variant:e}})=>{let r=e==="horizontal";return hr("div",{className:d({[`w-${o}`]:r,[`h-${o}`]:!r})})};var he=(e=>(e.Horizontal="horizontal",e))(he||{});import{UniformSlot as vr}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ir}from"react/jsx-runtime";var Co=({slots:o,component:e,context:r})=>Ir(vr,{data:e,context:r,slot:o.tabContent});var go=(e=>(e.TabContent="tabContent",e))(go||{}),ve=n(Co);import{UniformSlot as Br}from"@uniformdev/canvas-next-rsc/component";import{jsx as Ie}from"react/jsx-runtime";var W=({component:o,context:e,slots:r,alignment:t})=>Ie("td",{children:Ie("div",{className:d("w-fit",yo[t||"left"]),children:Ie(Br,{slot:r.tableCustomCellContent,context:e,data:o})})});var yo={left:"ml-0",center:"mx-auto",right:"ml-auto"},bo=(e=>(e.TableCustomCellContent="tableCustomCellContent",e))(bo||{});import{UniformText as wr}from"@uniformdev/canvas-next-rsc/component";import{jsx as To}from"react/jsx-runtime";var U=({component:o,context:e})=>To("td",{children:To(wr,{component:o,context:e,parameterId:"value",placeholder:"Value"})});import{UniformText as Fr}from"@uniformdev/canvas-next-rsc/component";import{jsx as ho}from"react/jsx-runtime";var M=({component:o,context:e})=>ho("th",{children:ho(Fr,{component:o,context:e,parameterId:"value",placeholder:"Value"})});import{UniformSlot as Sr}from"@uniformdev/canvas-next-rsc/component";import{jsx as vo}from"react/jsx-runtime";var $=({slots:o,component:e,context:r})=>vo("tr",{children:vo(Sr,{data:e,context:r,slot:o.tableRowCells})});import{UniformText as Ar}from"@uniformdev/canvas-next-rsc/component";import{jsx as Io}from"react/jsx-runtime";var Bo=({tag:o,size:e,color:r,weight:t,font:a,transform:p,decoration:i,letterSpacing:m,lineCountRestrictions:s,alignment:l,component:f,context:P})=>Io(b,{color:r,size:e,font:a,weight:t,transform:p,decoration:i,letterSpacing:m,alignment:l,lineCountRestrictions:s,children:Io(Ar,{placeholder:"Text goes here",parameterId:"text",as:o||void 0,component:f,context:P})});var Be=n(Bo);import kr from"next/dynamic";var we=kr(()=>import("../../theme-switcher-JE6MRNXM.mjs").then(o=>n(o.ThemeSwitcher)));import{jsx as Vr}from"react/jsx-runtime";var wo=({context:o,component:e})=>{let r=o.previewMode==="editor"&&o.isContextualEditing,t=e?._id?.includes("placeholder_");return!r||t?null:Vr(w,{type:"video",placeholder:"Please add video link to display a video"})};import{jsx as Fo}from"react/jsx-runtime";var z=({video:o,url:e,placeholderImage:r,autoPlay:t,lazyLoad:a,loop:p,controls:i,muted:m,overlayColor:s,overlayOpacity:l,border:f,component:P,context:x})=>{let[c]=u(o),[C]=u(r),T=c?.url||(e?.type==="url"?e.path:void 0);return T?Fo(De,{url:T,placeholderImageUrl:C?.url,autoPlay:t,lazyLoad:a,loop:p,controls:i,muted:m,overlayColor:s,overlayOpacity:l,border:f}):Fo(wo,{component:P,context:x})};var So={accordion:{component:O},accordionItem:{component:se},badge:{component:de},banner:{component:X},button:{component:Pe},card:{component:Y},carousel:{component:q},container:{component:G},countdown:{component:K},divider:{component:L},grid:{component:xe},gridItem:{component:ue},flex:{component:ce},flexItem:{component:N},header:{component:Z},section:{component:pe},iconLabel:{component:ge},image:{component:R},page:{component:te},richText:{component:Te},spacer:{component:H},text:{component:Be},video:{component:z},tabs:{component:ne},tab:{component:ve},table:{component:me},tableRow:{component:$},tableHeaderCell:{component:M},tableDataCell:{component:U},tableCustomCell:{component:W},modal:{component:ee},imageGallery:{component:j},testimonial:{component:ie},breadcrumbs:{component:fe},review:{component:ae},navigationLink:{component:be},navigationGroup:{component:re},navigationFlyout:{component:oe},footer:{component:Q},themeSwitcher:{component:we},link:{component:ye},fixedHero:{component:F.FixedHero},flexibleHero:{component:F.FlexibleHero}},an=So,pn=Se(So);export{O as Accordion,se as AccordionItem,He as AccordionItemSlots,Go as AccordionSlots,de as Badge,X as Banner,Lo as BannerContentAlignment,No as BannerSlots,fe as Breadcrumbs,Pe as Button,Y as Card,Do as CardSlots,Ro as CardVariants,q as Carousel,Ho as CarouselSlots,Yo as CommonPageSlots,G as Container,Oe as ContainerSlots,K as Countdown,Wo as CountdownSlots,Uo as CountdownVariants,F as DemoHero,Mo as DemoHeroContentAlignment,$o as DemoHeroVariants,L as Divider,ce as Flex,N as FlexItem,zo as FlexibleHeroSlots,Q as Footer,Eo as FooterSlots,xe as Grid,ue as GridItem,ro as GridItemSlots,je as GridSlots,Z as Header,_o as HeaderSlots,Jo as HeaderVariants,ge as IconLabel,R as Image,j as ImageGallery,Oo as ImageGallerySlots,ye as Link,so as LinkSlots,ee as Modal,Xo as ModalSlots,oe as NavigationFlyout,re as NavigationGroup,be as NavigationLink,te as Page,ae as Review,Ko as ReviewSlots,qo as ReviewVariants,Te as RichText,pe as Section,Qo as SectionContentAlignment,jo as SectionSlots,Zo as SectionVariants,H as Spacer,he as SpacerVariants,ve as Tab,go as TabSlots,me as Table,W as TableCustomCell,bo as TableCustomCellSlots,U as TableDataCell,M as TableHeaderCell,$ as TableRow,er as TableSlots,ne as Tabs,rr as TabsSlots,or as TabsVariants,ie as Testimonial,ar as TestimonialSlots,tr as TestimonialVariants,Be as Text,we as ThemeSwitcher,z as Video,pn as componentResolver,So as cskComponentsMapping,an as default};
@@ -150,6 +150,9 @@ type VideoProps = ReactPlayerProps & {
150
150
  autoPlay?: boolean;
151
151
  lazyLoad?: boolean;
152
152
  placeholderImageUrl?: string;
153
+ overlayColor?: string;
154
+ overlayOpacity?: NonNullable<ImageProps$1['style']>['opacity'];
155
+ border?: string | ViewPort<string>;
153
156
  };
154
157
  declare const _default: react.ComponentType<VideoProps>;
155
158
 
@@ -1 +1 @@
1
- import{a as F}from"../../chunk-ZWDCDE5W.mjs";import{a as g,b as h,c as C}from"../../chunk-BHR3T7BX.mjs";import{a as i}from"../../chunk-VEUVLMJO.mjs";import{a as t,b as r,c as a,d as x,e as u,f as y,g as I,h as c}from"../../chunk-26BSLQVU.mjs";import{a as f,b as s,c as d,d as l}from"../../chunk-3TBBNSCU.mjs";import{a as p}from"../../chunk-EIQPM3DQ.mjs";import{a as m}from"../../chunk-QHIWJPL6.mjs";import{a as o}from"../../chunk-J2GMOCYV.mjs";import{a as P,b as n}from"../../chunk-VZCFPWET.mjs";import{a as e}from"../../chunk-RZFK2OR7.mjs";import"../../chunk-2OD4OVSF.mjs";import"../../chunk-S7CSCIW4.mjs";export{f as ArrowIcon,r as Button,a as ButtonVariant,o as Carousel,s as ChevronDownIcon,e as Container,g as Flex,h as FlexItem,u as Footer,P as Grid,n as GridItem,y as Header,i as IconLabel,p as Image,d as ImageIcon,t as Link,x as MediaPlaceholder,I as Page,c as Rating,m as Text,F as ThemeSwitcher,C as Video,l as VideoIcon};
1
+ import{a as F}from"../../chunk-ZWDCDE5W.mjs";import{a as g,b as h,c as C}from"../../chunk-JTRZPR2Q.mjs";import{a as i}from"../../chunk-VEUVLMJO.mjs";import{a as t,b as r,c as a,d as x,e as u,f as y,g as I,h as c}from"../../chunk-26BSLQVU.mjs";import{a as f,b as s,c as d,d as l}from"../../chunk-3TBBNSCU.mjs";import{a as p}from"../../chunk-EIQPM3DQ.mjs";import{a as m}from"../../chunk-QHIWJPL6.mjs";import{a as o}from"../../chunk-J2GMOCYV.mjs";import{a as P,b as n}from"../../chunk-VZCFPWET.mjs";import{a as e}from"../../chunk-RZFK2OR7.mjs";import"../../chunk-2OD4OVSF.mjs";import"../../chunk-S7CSCIW4.mjs";export{f as ArrowIcon,r as Button,a as ButtonVariant,o as Carousel,s as ChevronDownIcon,e as Container,g as Flex,h as FlexItem,u as Footer,P as Grid,n as GridItem,y as Header,i as IconLabel,p as Image,d as ImageIcon,t as Link,x as MediaPlaceholder,I as Page,c as Rating,m as Text,F as ThemeSwitcher,C as Video,l as VideoIcon};
@@ -1,15 +1,20 @@
1
1
  import { AssetParamValue } from '@uniformdev/assets';
2
2
  import { LinkParamValue } from '@uniformdev/canvas';
3
3
  import { ComponentProps } from '@uniformdev/canvas-next-rsc/component';
4
+ import { ViewPort } from '@/types/cskTypes';
4
5
 
5
6
  export type VideoParameters = {
6
- url?: LinkParamValue;
7
+ video?: AssetParamValue;
8
+ url?: LinkParamValue; // Deprecated. Please use video parameter instead of url
7
9
  placeholderImage?: AssetParamValue;
8
10
  autoPlay?: boolean;
9
11
  lazyLoad?: boolean;
10
12
  loop?: boolean;
11
13
  controls?: boolean;
12
14
  muted?: boolean;
15
+ overlayColor?: string;
16
+ overlayOpacity?: string;
17
+ border?: string | ViewPort<string>;
13
18
  };
14
19
 
15
20
  export type VideoProps = ComponentProps<VideoParameters>;
@@ -7,27 +7,34 @@ import { VideoProps } from '.';
7
7
  import { VideoPlaceholder } from './placeholder';
8
8
 
9
9
  export const Video: FC<VideoProps> = ({
10
- url,
10
+ video,
11
+ url, // Deprecated. Please use video parameter instead of url
11
12
  placeholderImage,
12
13
  autoPlay,
13
14
  lazyLoad,
14
15
  loop,
15
16
  controls,
16
17
  muted,
18
+ overlayColor,
19
+ overlayOpacity,
20
+ border,
17
21
  component,
18
22
  context,
19
23
  }) => {
20
- if (!url || url.type !== 'url' || !url.path) {
24
+ const [resolvedVideo] = resolveAsset(video);
25
+ const [resolvedImage] = resolveAsset(placeholderImage);
26
+
27
+ const resolvedVideoUrl = resolvedVideo?.url || (url?.type === 'url' ? url.path : undefined);
28
+
29
+ if (!resolvedVideoUrl) {
21
30
  return <VideoPlaceholder component={component} context={context} />;
22
31
  }
23
32
 
24
- const [resolvedImage] = resolveAsset(placeholderImage);
25
-
26
33
  return (
27
34
  <BaseVideo
28
- url={url.path}
35
+ url={resolvedVideoUrl}
29
36
  placeholderImageUrl={resolvedImage?.url}
30
- {...{ autoPlay, lazyLoad, loop, controls, muted }}
37
+ {...{ autoPlay, lazyLoad, loop, controls, muted, overlayColor, overlayOpacity, border }}
31
38
  />
32
39
  );
33
40
  };
@@ -1,10 +1,15 @@
1
1
  import dynamic from 'next/dynamic';
2
+ import { ImageProps as NextImageProps } from 'next/image';
2
3
  import { ReactPlayerProps } from 'react-player';
4
+ import { ViewPort } from '@/types/cskTypes';
3
5
 
4
6
  export type VideoProps = ReactPlayerProps & {
5
7
  autoPlay?: boolean;
6
8
  lazyLoad?: boolean;
7
9
  placeholderImageUrl?: string;
10
+ overlayColor?: string;
11
+ overlayOpacity?: NonNullable<NextImageProps['style']>['opacity'];
12
+ border?: string | ViewPort<string>;
8
13
  };
9
14
 
10
15
  export default dynamic(() => import('./video').then(mod => mod.Video));
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { FC, useCallback, useState } from 'react';
4
4
  import dynamic from 'next/dynamic';
5
+ import { cn, resolveViewPort } from '@/utils/styling';
5
6
  import { VideoProps } from '.';
6
7
  import { PlayButton } from './play-button';
7
8
 
@@ -15,6 +16,9 @@ export const Video: FC<VideoProps> = ({
15
16
  lazyLoad = false,
16
17
  placeholderImageUrl,
17
18
  muted,
19
+ overlayColor,
20
+ overlayOpacity,
21
+ border,
18
22
  }) => {
19
23
  const [playing, setPlaying] = useState(autoPlay);
20
24
 
@@ -24,21 +28,33 @@ export const Video: FC<VideoProps> = ({
24
28
  return (
25
29
  <div className="relative aspect-video size-full [&_video]:!object-cover">
26
30
  {url && (
27
- <ReactPlayer
28
- className="absolute left-0 top-0"
29
- url={url}
30
- playing={playing}
31
- onPause={onPause}
32
- onPlay={onPlay}
33
- width="100%"
34
- height="100%"
35
- controls={controls}
36
- muted={muted}
37
- loop={loop}
38
- light={(lazyLoad && placeholderImageUrl) || lazyLoad}
39
- playIcon={<PlayButton onClick={onPlay} />}
40
- />
31
+ <div
32
+ className={cn('absolute left-0 top-0 size-full overflow-hidden', {
33
+ [resolveViewPort(border, '{value}')]: border,
34
+ })}
35
+ >
36
+ <ReactPlayer
37
+ url={url}
38
+ playing={playing}
39
+ onPause={onPause}
40
+ onPlay={onPlay}
41
+ width="100%"
42
+ height="100%"
43
+ controls={controls}
44
+ muted={muted}
45
+ loop={loop}
46
+ light={(lazyLoad && placeholderImageUrl) || lazyLoad}
47
+ playIcon={<PlayButton onClick={onPlay} />}
48
+ />
49
+ </div>
41
50
  )}
51
+ <div
52
+ className={cn('absolute inset-0 pointer-events-none', {
53
+ [`bg-${overlayColor}`]: overlayColor,
54
+ [resolveViewPort(border, '{value}')]: border,
55
+ })}
56
+ style={{ opacity: overlayOpacity || 0 }}
57
+ />
42
58
  </div>
43
59
  );
44
60
  };
@@ -0,0 +1 @@
1
+ "use client";import{a,c as e}from"./chunk-S7CSCIW4.mjs";import{useCallback as m,useState as V}from"react";import C from"next/dynamic";import{jsx as l,jsxs as b}from"react/jsx-runtime";var w=({className:t,...i})=>b("svg",{className:e("size-full",t),viewBox:"0 0 123 123",fill:"none",xmlns:"http://www.w3.org/2000/svg",...i,children:[l("circle",{cx:"61.5",cy:"61.5",r:"61.5",fillOpacity:"0.922864"}),l("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M82.7064 62.0304L48.7754 81.6468V42.4141L82.7064 62.0304Z",stroke:"white"})]}),u=({onClick:t})=>l("button",{className:"absolute left-1/2 top-1/2 w-1/5 -translate-x-1/2 -translate-y-1/2 transition hover:scale-90",type:"button","aria-label":"Play video",onClick:t,children:l(w,{})});import{jsx as s,jsxs as N}from"react/jsx-runtime";var F=C(()=>import("react-player/lazy").then(t=>t.default),{ssr:!1}),R=({url:t,autoPlay:i=!1,loop:f,controls:v,lazyLoad:n=!1,placeholderImageUrl:d,muted:y,overlayColor:c,overlayOpacity:P,border:o})=>{let[g,r]=V(i),p=m(()=>r(!0),[]),h=m(()=>r(!1),[]);return N("div",{className:"relative aspect-video size-full [&_video]:!object-cover",children:[t&&s("div",{className:e("absolute left-0 top-0 size-full overflow-hidden",{[a(o,"{value}")]:o}),children:s(F,{url:t,playing:g,onPause:h,onPlay:p,width:"100%",height:"100%",controls:v,muted:y,loop:f,light:n&&d||n,playIcon:s(u,{onClick:p})})}),s("div",{className:e("absolute inset-0 pointer-events-none",{[`bg-${c}`]:c,[a(o,"{value}")]:o}),style:{opacity:P||0}})]})};export{R as Video};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uniformdev/csk-components",
3
- "version": "6.0.41-alpha.1",
3
+ "version": "6.0.44",
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": {
@@ -109,4 +109,4 @@
109
109
  "publishConfig": {
110
110
  "access": "public"
111
111
  }
112
- }
112
+ }
@@ -1 +0,0 @@
1
- import{a as s}from"./chunk-RZFK2OR7.mjs";import{a as e,c as i}from"./chunk-S7CSCIW4.mjs";import{jsx as n}from"react/jsx-runtime";var u=({className:r,wrapperClassName:o,direction:t,justifyContent:l,gap:a,alignItems:p,backgroundColor:m,spacing:f,border:c,fluidContent:P,fullHeight:x,children:d})=>n(s,{backgroundColor:m,spacing:f,border:c,fluidContent:P,fullHeight:x,wrapperClassName:o,children:n("div",{className:i("flex",{[e(t,"flex-{value}")]:t,[e(l,"justify-{value}")]:l,[e(a,"gap-{value}")]:a,[e(p,"items-{value}")]:p},r),children:d})});import{jsx as y}from"react/jsx-runtime";var v=({className:r,alignSelf:o,shrink:t,children:l})=>y("div",{className:i({[e(o,"self-{value}")]:o,[`shrink-${t}`]:t},r),children:l});import F from"next/dynamic";var B=F(()=>import("./video-KDSPOKOF.mjs").then(r=>r.Video));export{u as a,v as b,B as c};
@@ -1 +0,0 @@
1
- "use client";import{c as n}from"./chunk-S7CSCIW4.mjs";import{useCallback as c,useState as b}from"react";import g from"next/dynamic";import{jsx as o,jsxs as P}from"react/jsx-runtime";var v=({className:t,...e})=>P("svg",{className:n("size-full",t),viewBox:"0 0 123 123",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[o("circle",{cx:"61.5",cy:"61.5",r:"61.5",fillOpacity:"0.922864"}),o("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M82.7064 62.0304L48.7754 81.6468V42.4141L82.7064 62.0304Z",stroke:"white"})]}),r=({onClick:t})=>o("button",{className:"absolute left-1/2 top-1/2 w-1/5 -translate-x-1/2 -translate-y-1/2 transition hover:scale-90",type:"button","aria-label":"Play video",onClick:t,children:o(v,{})});import{jsx as l}from"react/jsx-runtime";var h=g(()=>import("react-player/lazy").then(t=>t.default),{ssr:!1}),B=({url:t,autoPlay:e=!1,loop:p,controls:u,lazyLoad:s=!1,placeholderImageUrl:m,muted:f})=>{let[d,a]=b(e),i=c(()=>a(!0),[]),y=c(()=>a(!1),[]);return l("div",{className:"relative aspect-video size-full [&_video]:!object-cover",children:t&&l(h,{className:"absolute left-0 top-0",url:t,playing:d,onPause:y,onPlay:i,width:"100%",height:"100%",controls:u,muted:f,loop:p,light:s&&m||s,playIcon:l(r,{onClick:i})})})};export{B as Video};