@theroutingcompany/components 0.0.121 → 0.0.123-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.
@@ -278,7 +278,7 @@ Valid keys: `+JSON.stringify(Object.keys(z),null," "));var le=_e(Z,se,U,ae,q+".
278
278
  `,H3=R.default(fe)`
279
279
  ${k3}
280
280
  ${A3}
281
- `,To=c.forwardRef(function(t,n){const{children:r,className:o,closeOnEscape:a=!0,closeOnOutsideClick:i=!0,onClose:l,open:s,portalId:u,size:d="medium"}=t;let{maxWidth:f}=t;f||(f=oi[d]);const[g,m]=c.useState(""),h=c.useRef(),b=c.useRef(),v=c.useRef();function _(w){if(!i)return;w.target!==null&&h.current&&h.current.contains(w.target)&&b.current&&!b.current.contains(w.target)&&s&&l&&l()}function y(w){a&&s&&l&&$p("escape",l)(w)}return yr("keydown",y),yr("click",_),c.useLayoutEffect(()=>{s&&b.current&&b.current.focus()},[s]),Q(fn,{children:[E(pm,{isActive:s}),E(gc,{containerId:u,children:E(ei.TouchScrollable,{children:E(j3,{$open:s,className:o,role:"dialog","aria-modal":"true","aria-label":g,"aria-labelledby":g,children:E(fe,{size:"100%",ref:h,"data-id":"modal-overlay",children:E(U3,{children:E(W3,{disabled:!s||Z5(),returnFocus:!0,children:E(hm,{mountOnEnter:!0,unmountOnExit:!0,in:s,timeout:{enter:ni(p.motion_duration_fast),exit:ni(p.motion_duration_fast)},nodeRef:v,children:w=>E("div",{ref:v,children:E(H3,{$state:w,tabIndex:-1,ref:n,display:"flex",justifyContent:"center","data-id":"modal-content-wrapper",children:E(fe,{ref:b,width:"100%",maxWidth:f,m:`0 ${p.spacing_100}`,bg:"white",tabIndex:-1,"data-id":"modal-content-panel",borderRadius:p.border_radius_400,overflow:"hidden",children:E($m.Provider,{value:{setModalTitle:m,onClose:l,open:s,size:d},children:r})})})})})})})})})})})]})});To.displayName="Modal",To.Header=B3,To.Content=I3,To.Footer=O3;const G3=To,Y3=({initialOpen:e=!1,id:t="pingo-modal"}={})=>{const[n,r]=c.useState(e),o=c.useCallback(()=>{r(!n)},[n]),a=c.useCallback(()=>{r(!0)},[]),i=c.useCallback(()=>{r(!1)},[]);function l(u={}){return{"aria-controls":t,onClick:o,...u}}function s(u={}){return{id:t,onClose:i,open:n,...u}}return{isOpen:n,toggleModal:o,openModal:a,closeModal:i,getActivatorProps:l,getModalProps:s}},q3=ie.keyframes`
281
+ `,To=c.forwardRef(function(t,n){const{children:r,className:o,closeOnEscape:a=!0,closeOnOutsideClick:i=!0,onClose:l,open:s,portalId:u,size:d="medium"}=t;let{maxWidth:f}=t;f||(f=oi[d]);const[g,m]=c.useState(""),h=c.useRef(),b=c.useRef(),v=c.useRef();function _(w){if(!i)return;w.target!==null&&h.current&&h.current.contains(w.target)&&b.current&&!b.current.contains(w.target)&&s&&l&&l()}function y(w){a&&s&&l&&$p("escape",l)(w)}return yr("keydown",y),yr("click",_),c.useLayoutEffect(()=>{s&&b.current&&b.current.focus()},[s]),Q(fn,{children:[E(pm,{isActive:s}),E(gc,{containerId:u,children:E(ei.TouchScrollable,{children:E(j3,{$open:s,className:o,role:"dialog","aria-modal":"true","aria-label":g,"aria-labelledby":g,children:E(fe,{size:"100%",ref:h,"data-id":"modal-overlay",children:E(U3,{children:E(W3,{disabled:!s||Z5(),returnFocus:!0,children:E(hm,{mountOnEnter:!0,unmountOnExit:!0,in:s,timeout:{enter:ni(p.motion_duration_fast),exit:ni(p.motion_duration_fast)},nodeRef:v,children:w=>E("div",{ref:v,children:E(H3,{$state:w,tabIndex:-1,ref:n,display:"flex",justifyContent:"center","data-id":"modal-content-wrapper",children:E(fe,{ref:b,width:"100%",maxWidth:f,m:`0 ${p.spacing_100}`,bg:"white",tabIndex:-1,"data-id":"modal-content-panel",borderRadius:p.border_radius_400,overflow:"hidden",children:E($m.Provider,{value:{setModalTitle:m,onClose:l,open:s,size:d},children:r})})})})})})})})})})})]})});To.displayName="Modal",To.Header=B3,To.Content=I3,To.Footer=O3;const G3=To,Y3=({initialOpen:e=!1,id:t="pingo-modal"}={})=>{const[n,r]=c.useState(e),o=c.useCallback(()=>{r(!n)},[n]),a=c.useCallback(()=>{r(!0)},[]),i=c.useCallback(()=>{r(!1)},[]);function l(u={}){return{"aria-controls":t,onClick:o,...u}}function s(u={}){return{id:t,onClose:i,open:n,...u}}return{open:n,isOpen:n,toggleModal:o,openModal:a,closeModal:i,onClose:i,getActivatorProps:l,getModalProps:s}},q3=ie.keyframes`
282
282
  0% {
283
283
  opacity: 0;
284
284
  }