@wistia/vhs 2.75.3-beta.9ee474aa.482a4b5 → 2.75.3-beta.c139ae77.e8b8265
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/components/Modal/Dialog.d.ts +3 -3
- package/dist/components/Modal/Dialog.d.ts.map +1 -1
- package/dist/components/Toast/Toast.d.ts.map +1 -1
- package/dist/index.cjs +4 -4
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +4 -4
- package/dist/index.mjs.map +3 -3
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
/*
|
|
3
|
-
* @license @wistia/vhs v2.75.3-beta.
|
|
3
|
+
* @license @wistia/vhs v2.75.3-beta.c139ae77.e8b8265
|
|
4
4
|
*
|
|
5
5
|
* Copyright (c) 2021-2025, Wistia, Inc. and its affiliates.
|
|
6
6
|
*
|
|
@@ -335,7 +335,7 @@ var bO=Object.create;var Eu=Object.defineProperty;var CO=Object.getOwnPropertyDe
|
|
|
335
335
|
> * {
|
|
336
336
|
margin: 0;
|
|
337
337
|
}
|
|
338
|
-
`,jV=({children:e})=>{if(p0())return null;let t=document.getElementById("toast-portal");return t?$V(e,t):null},fl=null,pf=IV(({actionInterceptor:e=void 0,actionLabel:t=m0,colorOverride:r=void 0,renderInPlace:n=!1,isOpen:o=!1,message:a,onClose:s,timeout:l=h0,variant:u=d0,...c})=>{let[p,d]=kV(o),g=u==="error"||u==="warning"?"assertive":"polite",v=NV(()=>{clearTimeout(fl??void 0),fl=null},[]),m=()=>{v(),s()},y=()=>{fl=setTimeout(()=>{m()},l)};Vb(()=>(p&&!n&&y(),()=>{Cn(fl)&&v()})),Vb(()=>(d(o),()=>{Cn(fl)&&v()}),[o,v,d]);let b=zV(r,u,Be());return ff(n?VV:jV,{children:ff(y7,{in:p,renderInPlace:n,children:$b(GV,{$accentColor:b
|
|
338
|
+
`,jV=({children:e})=>{if(p0())return null;let t=document.getElementById("toast-portal");return t?$V(e,t):null},fl=null,pf=IV(({actionInterceptor:e=void 0,actionLabel:t=m0,colorOverride:r=void 0,renderInPlace:n=!1,isOpen:o=!1,message:a,onClose:s,timeout:l=h0,variant:u=d0,...c})=>{let[p,d]=kV(o),g=u==="error"||u==="warning"?"assertive":"polite",v=NV(()=>{clearTimeout(fl??void 0),fl=null},[]),m=()=>{v(),s()},y=()=>{fl=setTimeout(()=>{m()},l)};Vb(()=>(p&&!n&&y(),()=>{Cn(fl)&&v()})),Vb(()=>(d(o),()=>{Cn(fl)&&v()}),[o,v,d]);let b=zV(r,u,Be());return ff(n?VV:jV,{children:ff(y7,{in:p,renderInPlace:n,children:$b(GV,{$accentColor:b,"aria-hidden":!p,onMouseEnter:v,onMouseLeave:y,...c,children:[$b(HV,{"data-testid":"toast-message",children:[ff(zs,{"aria-live":g,message:a}),a]}),ff(rt,{colorOverride:b,"data-testid":"toast-action",label:t,onClick:e??m,variant:"tertiary"})]},a)})})});pf.displayName="Toast_VHS";i();import{createContext as WV}from"react";var df=WV(null);import{Fragment as UV,jsx as g0,jsxs as KV}from"react/jsx-runtime";var v0=({children:e})=>{let[t,r]=Qo(void 0),[n,o]=Qo(""),[a,s]=Qo(void 0),[l,u]=Qo(""),[c,p]=Qo(!1),[d,h]=Qo(void 0),[g,v]=Qo(void 0),m=_V(({message:y,variant:b=d0,actionLabel:x=m0,actionInterceptor:w,timeout:D=h0,colorOverride:E})=>{r(w?()=>w:void 0),o(x),s(E),u(y),p(!0),h(D),v(b)},[]);return KV(UV,{children:[g0(df.Provider,{value:m,children:e}),g0(pf,{actionInterceptor:t,actionLabel:n,colorOverride:a,isOpen:c,message:l,onClose:()=>p(!1),timeout:d,variant:g}),g0("div",{id:"toast-portal"})]})};i();import{useRef as YV,useCallback as Ta,useMemo as JV}from"react";i();import{createContext as qV,useContext as XV}from"react";var y0=qV({}),b0=()=>XV(y0);import{jsx as ZV}from"react/jsx-runtime";var mf=({children:e})=>{let r=YV(new Set).current,n=Ta(p=>r.values().next().value===p,[r]),o=Ta(()=>{let p=r.values().next().value;hn(p)&&p(!0)},[r]),a=Ta(()=>{let p=r.values().next().value;hn(p)&&p(!1)},[r]),s=Ta(p=>{r.add(p),n(p)&&o()},[r,n,o]),l=Ta(p=>{r.add(p),n(p)?(a(),r.delete(p),o()):r.delete(p)},[r,n,a,o]),u=Ta(p=>{r.delete(p)},[r]),c=JV(()=>({attemptShowModal:s,attemptHideModal:l,removeModalFromQueue:u}),[s,l,u]);return ZV(y0.Provider,{value:c,children:e})};i();import{createGlobalStyle as t$}from"styled-components";i();import{css as QV}from"styled-components";var zb=QV`
|
|
339
339
|
/* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
|
340
340
|
|
|
341
341
|
/* Document
|
|
@@ -2453,7 +2453,7 @@ var bO=Object.create;var Eu=Object.defineProperty;var CO=Object.getOwnPropertyDe
|
|
|
2453
2453
|
max-height: 90vh;
|
|
2454
2454
|
${({$fullHeight:e})=>e?"min-height: calc(100vh - 48px);":""}
|
|
2455
2455
|
max-width: 90vw;
|
|
2456
|
-
min-width: ${({width:e})=>e??"480px"};
|
|
2456
|
+
min-width: ${({$width:e})=>e??"480px"};
|
|
2457
2457
|
width: min-content;
|
|
2458
2458
|
}
|
|
2459
2459
|
`;i();import{createContext as Eie,useContext as Pie}from"react";var dB=Eie(void 0),mB=dB.Provider,hB=()=>{let e=Pie(dB);if(Q(e))return e;throw new Error("useModalClose must be used within a ModalCloseProvider")};import{jsx as xs}from"react/jsx-runtime";var Rie=m3(en)`
|
|
@@ -2476,7 +2476,7 @@ var bO=Object.create;var Eu=Object.defineProperty;var CO=Object.getOwnPropertyDe
|
|
|
2476
2476
|
margin: auto;
|
|
2477
2477
|
}
|
|
2478
2478
|
`}
|
|
2479
|
-
`,Oie=e=>F(e)&&N3(e,"current")&&F(e.current),Mie=e=>{gB(()=>{let t=document.activeElement;if(Oie(e)){let r=e.current;F(r)&&r.focus()}return()=>{t!==null&&setTimeout(()=>{t.focus()},0)}},[e])},bB=Tie(({alignHorizontal:e="center",alignVertical:t="center",allowModalToExceedViewportBounds:r=!1,children:n,className:o,fullHeight:a=!1,initialFocusRef:s,shouldTrapFocus:l=!0,onRequestClose:u,shouldCloseOnClickOutside:c=!0,width:p,overflow:d="auto",...h},g)=>{Mie(g);let v=vB(null),m=A0(l,{focusSelector:Q(s)?s:null});return bl(v,()=>{u&&c&&u()}),Q0(h.isOpen),Z0("Escape",y=>{u&&u(),y.preventDefault()}),xs(mB,{value:u,children:xs(Rie,{$allowModalToExceedViewportBounds:r,alignHorizontal:e,alignVertical:t,children:xs(Bie,{ref:m,$allowModalToExceedViewportBounds:r,$fullHeight:a,$overflow:d,"aria-modal":"true",role:"dialog",tabIndex:-1
|
|
2479
|
+
`,Oie=e=>F(e)&&N3(e,"current")&&F(e.current),Mie=e=>{gB(()=>{let t=document.activeElement;if(Oie(e)){let r=e.current;F(r)&&r.focus()}return()=>{t!==null&&setTimeout(()=>{t.focus()},0)}},[e])},bB=Tie(({alignHorizontal:e="center",alignVertical:t="center",allowModalToExceedViewportBounds:r=!1,children:n,className:o,fullHeight:a=!1,initialFocusRef:s,shouldTrapFocus:l=!0,onRequestClose:u,shouldCloseOnClickOutside:c=!0,width:p,overflow:d="auto",...h},g)=>{Mie(g);let v=vB(null),m=A0(l,{focusSelector:Q(s)?s:null});return bl(v,()=>{u&&c&&u()}),Q0(h.isOpen),Z0("Escape",y=>{u&&u(),y.preventDefault()}),xs(mB,{value:u,children:xs(Rie,{$allowModalToExceedViewportBounds:r,alignHorizontal:e,alignVertical:t,children:xs(Bie,{ref:m,$allowModalToExceedViewportBounds:r,$fullHeight:a,$overflow:d,$width:p,"aria-modal":"true",role:"dialog",tabIndex:-1,...h,children:xs(Fie,{ref:v,children:n})})})})}),CB=e=>{let{id:t,...r}=e,n=document.createElement("div");n.classList.add("Modal"),Q(e.className)&&n.classList.add(e.className),Q(t)&&(n.id=t);let o=vB(n);return gB(()=>{let a=o.current;return document.body.appendChild(a),()=>a.remove()},[]),Aie(xs(xl,{children:e.isOpen?xs(bB,{ref:o,...r}):null}),o.current)};CB.displayName="Modal_VHS";bB.displayName="ModalContent";i();import l1 from"styled-components";import{jsx as xB}from"react/jsx-runtime";var Iie=l1.div`
|
|
2480
2480
|
align-items: center;
|
|
2481
2481
|
display: flex;
|
|
2482
2482
|
padding: ${({theme:e})=>e.spacing.space04} ${({theme:e})=>e.spacing.space04};
|