@frigade/react 2.2.6 → 2.2.7

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/index.cjs CHANGED
@@ -55,7 +55,7 @@ var vo=Object.defineProperty,er=Object.defineProperties;var or=Object.getOwnProp
55
55
  to {
56
56
  opacity: 1;
57
57
  }
58
- `;function lt(o){var e=m(o,[]);let[t,r]=sn__default.default({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step"}),[n,i]=ro.useState(),[s,p]=ro.useState();return ro.useLayoutEffect(()=>{r&&(n==null&&i(r.canScrollNext()),s==null&&p(r.canScrollPrev()),r.on("select",()=>{i(r.canScrollNext()),p(r.canScrollPrev());}));},[r]),jsxRuntime.jsx(K,d(a({as:b,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:({flow:c})=>{let u=c.getNumberOfCompletedSteps(),f=c.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(C.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:T.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(C.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(S.H3,{children:c.title}),jsxRuntime.jsx(S.Body2,{color:"neutral.400",children:c.subtitle})]}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(S.Body2,{fontWeight:"demibold",part:"progress-text",children:[u,"/",f]}),jsxRuntime.jsx(ge,{current:u,total:f,minWidth:"200px"})]})]}),jsxRuntime.jsxs(g,{margin:`0 ${T.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"5",position:"relative",ref:t,children:[jsxRuntime.jsx(C.Row,{gap:4,part:"carousel-content",children:Array.from(c.steps.values()).map(P=>jsxRuntime.jsx(it,{onPrimary:e.onPrimary,onSecondary:e.onSecondary,step:P},P.id))}),s&&jsxRuntime.jsx(C.Column,{animation:`${st} 300ms ease-out`,background:"linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",left:"0",justifyContent:"center",paddingLeft:"3",part:"carousel-prev-wrapper",position:"absolute",top:"0",children:jsxRuntime.jsx(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>r.scrollPrev(),padding:"2",children:jsxRuntime.jsx(outline.ArrowLeftIcon,{height:"24px",width:"24px"})})}),n&&jsxRuntime.jsx(C.Column,{animation:`${st} 300ms ease-out`,background:"linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",justifyContent:"center",paddingRight:"3",part:"carousel-next-wrapper",position:"absolute",right:"0",top:"0",children:jsxRuntime.jsx(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>r.scrollNext(),padding:"2",children:jsxRuntime.jsx(outline.ArrowRightIcon,{height:"24px",width:"24px"})})})]})]})}}))}var Re={};Z(Re,{Content:()=>so,Root:()=>lo,Trigger:()=>po});var dn=react.keyframes`
58
+ `;function lt(o){var e=m(o,[]);let[t,r]=sn__default.default({align:"start",container:".fr-carousel-content",skipSnaps:!0,slides:".fr-carousel-step"}),[n,i]=ro.useState(),[s,p]=ro.useState();return ro.useLayoutEffect(()=>{r&&(n==null&&i(r.canScrollNext()),s==null&&p(r.canScrollPrev()),r.on("select",()=>{i(r.canScrollNext()),p(r.canScrollPrev());}));},[r]),jsxRuntime.jsx(K,d(a({as:b,borderWidth:1,containerType:"inline-size",p:"4",part:"carousel"},e),{children:({flow:c})=>{let u=c.getNumberOfCompletedSteps(),f=c.getNumberOfAvailableSteps();return jsxRuntime.jsxs(jsxRuntime.Fragment,{children:[jsxRuntime.jsxs(C.Row,{css:{"@container (max-width: 750px)":{flexDirection:"column",gap:T.space[5]}},justifyContent:"space-between",part:"carousel-header",children:[jsxRuntime.jsxs(C.Column,{part:"carousel-header-content",children:[jsxRuntime.jsx(S.H3,{children:c.title}),jsxRuntime.jsx(S.Body2,{color:"neutral.400",children:c.subtitle})]}),jsxRuntime.jsxs(C.Row,{alignItems:"center",gap:2,part:"progress",children:[jsxRuntime.jsxs(S.Body2,{fontWeight:"demibold",part:"progress-text",children:[u,"/",f]}),jsxRuntime.jsx(ge,{current:u,total:f,minWidth:"200px"})]})]}),jsxRuntime.jsxs(g,{margin:`0 ${T.space[-4]}`,overflow:"hidden",part:"carousel-wrapper",px:"4",position:"relative",ref:t,children:[jsxRuntime.jsx(C.Row,{gap:4,part:"carousel-content",children:Array.from(c.steps.values()).map(P=>jsxRuntime.jsx(it,{onPrimary:e.onPrimary,onSecondary:e.onSecondary,step:P},P.id))}),s&&jsxRuntime.jsx(C.Column,{animation:`${st} 300ms ease-out`,background:"linear-gradient(to right, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",left:"0",justifyContent:"center",paddingLeft:"3",part:"carousel-prev-wrapper",position:"absolute",top:"0",children:jsxRuntime.jsx(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>r.scrollPrev(),padding:"2",children:jsxRuntime.jsx(outline.ArrowLeftIcon,{height:"24px",width:"24px"})})}),n&&jsxRuntime.jsx(C.Column,{animation:`${st} 300ms ease-out`,background:"linear-gradient(to left, rgba(255, 255, 255, 0.5), transparent 50%)",bottom:"0",justifyContent:"center",paddingRight:"3",part:"carousel-next-wrapper",position:"absolute",right:"0",top:"0",children:jsxRuntime.jsx(D.Plain,{border:"1px solid neutral.border",borderRadius:"100%",boxShadow:"md",backgroundColor:"neutral.background",color:"primary.surface",onClick:()=>r.scrollNext(),padding:"2",children:jsxRuntime.jsx(outline.ArrowRightIcon,{height:"24px",width:"24px"})})})]})]})}}))}var Re={};Z(Re,{Content:()=>so,Root:()=>lo,Trigger:()=>po});var dn=react.keyframes`
59
59
  from {
60
60
  height: 0;
61
61
  opacity: 0;