@frigade/react 2.4.12 → 2.4.13
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -63,7 +63,7 @@ var zo=Object.defineProperty,kr=Object.defineProperties;var Er=Object.getOwnProp
|
|
|
63
63
|
to {
|
|
64
64
|
opacity: 1;
|
|
65
65
|
}
|
|
66
|
-
`;function M(r){var a=r,{children:e,className:o,modal:t=!0}=a,n=f(a,["children","className","modal"]);let{rootProps:s,contentProps:p,otherProps:y}=Br(n),b=y,{zIndex:c}=b,u=f(b,["zIndex"]);return jsx(U.Root,l(i({defaultOpen:!0,modal:t},s),{children:jsx(U.Portal,{children:jsxs(g,{animation:`${Qi} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:c!=null?c:10,children:[jsx(U.Overlay,{asChild:!0,children:jsx(g,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsx(U.Content,l(i({asChild:!0,onOpenAutoFocus:x=>x.preventDefault(),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault()},p),{children:jsx(h,l(i({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxWidth:"430px",
|
|
66
|
+
`;function M(r){var a=r,{children:e,className:o,modal:t=!0}=a,n=f(a,["children","className","modal"]);let{rootProps:s,contentProps:p,otherProps:y}=Br(n),b=y,{zIndex:c}=b,u=f(b,["zIndex"]);return jsx(U.Root,l(i({defaultOpen:!0,modal:t},s),{children:jsx(U.Portal,{children:jsxs(g,{animation:`${Qi} 300ms ease-out`,className:o,display:"grid",inset:"0",padding:"6",part:"dialog-wrapper",pointerEvents:"none",position:"fixed",zIndex:c!=null?c:10,children:[jsx(U.Overlay,{asChild:!0,children:jsx(g,{background:"rgb(0 0 0 / 0.5)",inset:"0",part:"dialog-overlay",position:"absolute"})}),jsx(U.Content,l(i({asChild:!0,onOpenAutoFocus:x=>x.preventDefault(),onPointerDownOutside:x=>x.preventDefault(),onInteractOutside:x=>x.preventDefault()},p),{children:jsx(h,l(i({alignSelf:"center",boxShadow:"md",justifySelf:"center",maxHeight:"100%",maxWidth:"430px",overflowY:"auto",padding:8,part:"dialog",pointerEvents:"auto",position:"relative"},u),{children:e}))}))]})})}))}M.Dismiss=e=>jsx(U.Close,{"aria-label":"Close",asChild:!0,children:jsx(I.Plain,l(i({part:"close",position:"absolute",right:"2px",top:"2px"},e),{children:jsx(Pe,{height:"20",fill:"currentColor"})}))});M.Subtitle=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsx(U.Description,{asChild:!0,children:jsx(C.Body2,l(i({part:"subtitle"},o),{children:e}))})};M.Media=t=>{var n=t,{src:e}=n,o=f(n,["src"]);return e==null?null:jsx(de,i({borderRadius:"md",src:e},o))};M.Primary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsx(I.Primary,i({title:o,onClick:e},t))};M.ProgressDots=({current:e,total:o})=>{if(o==1)return null;let t=[...Array(o)].map((n,r)=>jsx(g,{as:"circle",r:4,cx:4+16*r,cy:"4px",fill:e===r?R.colors.blue500:R.colors.blue800,part:e===r?"progress-dot-selected":"progress-dot"},r));return jsx(g,{as:"svg",height:"8px",marginInline:"auto",part:"progress",viewBox:`0 0 ${16*o-8} 8`,width:16*o-8,children:t})};M.Secondary=n=>{var r=n,{onClick:e,title:o}=r,t=f(r,["onClick","title"]);return o==null?null:jsx(I.Secondary,i({title:o,onClick:e},t))};M.Title=t=>{var n=t,{children:e}=n,o=f(n,["children"]);return jsx(U.Title,{asChild:!0,children:jsx(C.H4,l(i({part:"title"},o),{children:e}))})};M.displayName="Dialog";var Rr=["dismissible","flowId","forceMount","onComplete","onDismiss","onPrimary","onSecondary","variables"];function Wo(n){var r=n,{flowId:e,part:o}=r,t=f(r,["flowId","part"]);let a=Object.fromEntries(Object.entries(t).filter(([p])=>Rr.some(c=>p===c))),s=Object.fromEntries(Object.entries(t).filter(([p])=>Rr.indexOf(p)===-1));return jsx(j,l(i({as:null,flowId:e},a),{children:({flow:p,handleDismiss:c,handlePrimary:u,handleSecondary:y,parentProps:{containerProps:b,dismissible:x},step:m})=>{var k,E,T,w,D,O;let F=(k=m.props)!=null?k:{},S=(T=(E=m.primaryButton)==null?void 0:E.title)!=null?T:m.primaryButtonTitle,B=(D=(w=m.secondaryButton)==null?void 0:w.title)!=null?D:m.secondaryButtonTitle,v=m.$state.blocked;return jsx(M,l(i(i({part:["announcement",o],textAlign:"center"},b),s),{onEscapeKeyDown:q=>{if(t.dismissible===!1){q.preventDefault();return}typeof t.onEscapeKeyDown=="function"&&t.onEscapeKeyDown(q),q.defaultPrevented||c(q);},children:jsxs(P.Column,l(i({gap:5,part:"announcement-step"},F),{children:[x&&jsx(M.Dismiss,{onClick:c}),jsxs(P.Column,{gap:1,part:"announcement-header",children:[jsx(M.Title,{children:m.title}),jsx(M.Subtitle,{children:m.subtitle})]}),jsx(M.Media,{src:(O=m.videoUri)!=null?O:m.imageUri,type:m.videoUri?"video":"image",css:{objectFit:"cover",width:"100%"}}),jsx(M.ProgressDots,{current:p.getCurrentStepIndex(),total:p.getNumberOfAvailableSteps()}),jsxs(P.Row,{css:{"& > button":{flexBasis:"50%",flexGrow:1}},gap:3,part:"announcement-footer",children:[B&&jsx(M.Secondary,{disabled:v,onClick:y,title:B}),S&&jsx(M.Primary,{disabled:v,onClick:u,title:S})]})]}))}))}}))}function ta(){let{userId:e,frigade:o}=useContext(H);function t(r){return W(this,null,function*(){yield o.identify(e,r);})}function n(r,a){return W(this,null,function*(){yield o.track(r,a);})}return {userId:e,addProperties:t,track:n}}function na(){var r;let{frigade:e}=useContext(H);function o(a){return W(this,null,function*(){if(!e.config.groupId){console.error("No Group ID is set. Cannot set properties without a Group ID.");return}yield e.group(e.config.groupId,a);})}function t(a,s){return W(this,null,function*(){yield e.track(a,s);})}function n(a,s){return W(this,null,function*(){yield e.group(a,s);})}return {groupId:(r=e==null?void 0:e.config)==null?void 0:r.groupId,setGroupId:n,addProperties:o,track:t}}
|
|
67
67
|
|
|
68
68
|
export { Wo as Announcement, bo as Banner, Q as BaseField, g as Box, I as Button, h as Card, Ye as Checklist, Mo as Collection, M as Dialog, P as Flex, j as Flow, Re as Form, io as Image, vo as Label, de as Media, He as Progress, Pr as Provider, Bo as RadioField, Ro as SelectField, ro as Survey, C as Text, ko as TextField, Eo as TextareaField, $ as Tooltip, Ho as Tour, ao as Video, fo as themeVariables, Ke as tokens, no as useBoundingClientRect, se as useFlow, xe as useFlowHandlers, Ne as useFrigade, na as useGroup, $e as useModal, ie as useStepHandlers, ta as useUser };
|
|
69
69
|
//# sourceMappingURL=out.js.map
|