@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
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { ModalProps } from './Modal';
|
|
2
2
|
export type DialogProps = {
|
|
3
|
-
$fullHeight
|
|
4
|
-
width?: string | undefined;
|
|
5
|
-
$overflow?: ModalProps['overflow'];
|
|
3
|
+
$fullHeight?: boolean | undefined;
|
|
4
|
+
$width?: string | undefined;
|
|
5
|
+
$overflow?: ModalProps['overflow'] | undefined;
|
|
6
6
|
};
|
|
7
7
|
export declare const Dialog: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, DialogProps, never>;
|
|
8
8
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,EAAE,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Dialog.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAE1C,MAAM,MAAM,WAAW,GAAG;IACxB,WAAW,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAClC,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,SAAS,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,GAAG,SAAS,CAAC;CAChD,CAAC;AAEF,eAAO,MAAM,MAAM,kHAqBlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAcjE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAC1E,eAAO,MAAM,aAAa,EAAE,aAAa,EAAiD,CAAC;AAC3F,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,cAAc,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Toast.d.ts","sourceRoot":"","sources":["../../../src/components/Toast/Toast.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAcjE,MAAM,MAAM,aAAa,GAAG,WAAW,GAAG,OAAO,GAAG,SAAS,GAAG,SAAS,CAAC;AAC1E,eAAO,MAAM,aAAa,EAAE,aAAa,EAAiD,CAAC;AAC3F,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,kBAAkB,YAAY,CAAC;AAC5C,eAAO,MAAM,cAAc,OAAO,CAAC;AA4EnC,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACzD;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,MAAM,IAAI,CAAC,GAAG,SAAS,CAAC;IAC7C;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC;;;OAGG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,OAAO,EAAE,MAAM,CAAC;IAChB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC7B;;OAEG;IACH,OAAO,CAAC,EAAE,aAAa,GAAG,SAAS,CAAC;CACrC,CAAC;AAEF,eAAO,MAAM,KAAK,oKAYb,UAAU,6CAqFd,CAAC"}
|
package/dist/index.cjs
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 @@
|
|
|
335
335
|
> * {
|
|
336
336
|
margin: 0;
|
|
337
337
|
}
|
|
338
|
-
`,E$=({children:e})=>{if(Lg())return null;let t=document.getElementById("toast-portal");return t?(0,_x.createPortal)(e,t):null},Pu=null,Tu=(0,Xr.memo)(({actionInterceptor:e=void 0,actionLabel:t=Hg,colorOverride:r=void 0,renderInPlace:n=!1,isOpen:o=!1,message:a,onClose:s,timeout:l=jg,variant:u=Gg,...c})=>{let[p,d]=(0,Xr.useState)(o),g=u==="error"||u==="warning"?"assertive":"polite",v=(0,Xr.useCallback)(()=>{clearTimeout(Pu??void 0),Pu=null},[]),m=()=>{v(),s()},y=()=>{Pu=setTimeout(()=>{m()},l)};(0,Xr.useEffect)(()=>(p&&!n&&y(),()=>{Gn(Pu)&&v()})),(0,Xr.useEffect)(()=>(d(o),()=>{Gn(Pu)&&v()}),[o,v,d]);let b=w$(r,u,Me());return(0,Ko.jsx)(n?Xr.Fragment:E$,{children:(0,Ko.jsx)(Db,{in:p,renderInPlace:n,children:(0,Ko.jsxs)(S$,{$accentColor:b
|
|
338
|
+
`,E$=({children:e})=>{if(Lg())return null;let t=document.getElementById("toast-portal");return t?(0,_x.createPortal)(e,t):null},Pu=null,Tu=(0,Xr.memo)(({actionInterceptor:e=void 0,actionLabel:t=Hg,colorOverride:r=void 0,renderInPlace:n=!1,isOpen:o=!1,message:a,onClose:s,timeout:l=jg,variant:u=Gg,...c})=>{let[p,d]=(0,Xr.useState)(o),g=u==="error"||u==="warning"?"assertive":"polite",v=(0,Xr.useCallback)(()=>{clearTimeout(Pu??void 0),Pu=null},[]),m=()=>{v(),s()},y=()=>{Pu=setTimeout(()=>{m()},l)};(0,Xr.useEffect)(()=>(p&&!n&&y(),()=>{Gn(Pu)&&v()})),(0,Xr.useEffect)(()=>(d(o),()=>{Gn(Pu)&&v()}),[o,v,d]);let b=w$(r,u,Me());return(0,Ko.jsx)(n?Xr.Fragment:E$,{children:(0,Ko.jsx)(Db,{in:p,renderInPlace:n,children:(0,Ko.jsxs)(S$,{$accentColor:b,"aria-hidden":!p,onMouseEnter:v,onMouseLeave:y,...c,children:[(0,Ko.jsxs)(D$,{"data-testid":"toast-message",children:[(0,Ko.jsx)(Jl,{"aria-live":g,message:a}),a]}),(0,Ko.jsx)(rt,{colorOverride:b,"data-testid":"toast-action",label:t,onClick:e??m,variant:"tertiary"})]},a)})})});Tu.displayName="Toast_VHS";i();var Ux=require("react"),Kp=(0,Ux.createContext)(null);var qo=require("react/jsx-runtime"),qp=({children:e})=>{let[t,r]=(0,yn.useState)(void 0),[n,o]=(0,yn.useState)(""),[a,s]=(0,yn.useState)(void 0),[l,u]=(0,yn.useState)(""),[c,p]=(0,yn.useState)(!1),[d,h]=(0,yn.useState)(void 0),[g,v]=(0,yn.useState)(void 0),m=(0,yn.useCallback)(({message:y,variant:b=Gg,actionLabel:x=Hg,actionInterceptor:w,timeout:D=jg,colorOverride:E})=>{r(w?()=>w:void 0),o(x),s(E),u(y),p(!0),h(D),v(b)},[]);return(0,qo.jsxs)(qo.Fragment,{children:[(0,qo.jsx)(Kp.Provider,{value:m,children:e}),(0,qo.jsx)(Tu,{actionInterceptor:t,actionLabel:n,colorOverride:a,isOpen:c,message:l,onClose:()=>p(!1),timeout:d,variant:g}),(0,qo.jsx)("div",{id:"toast-portal"})]})};i();var Yr=require("react");i();var Xp=require("react"),Wg=(0,Xp.createContext)({}),_g=()=>(0,Xp.useContext)(Wg);var Kx=require("react/jsx-runtime"),Yp=({children:e})=>{let r=(0,Yr.useRef)(new Set).current,n=(0,Yr.useCallback)(p=>r.values().next().value===p,[r]),o=(0,Yr.useCallback)(()=>{let p=r.values().next().value;Nn(p)&&p(!0)},[r]),a=(0,Yr.useCallback)(()=>{let p=r.values().next().value;Nn(p)&&p(!1)},[r]),s=(0,Yr.useCallback)(p=>{r.add(p),n(p)&&o()},[r,n,o]),l=(0,Yr.useCallback)(p=>{r.add(p),n(p)?(a(),r.delete(p),o()):r.delete(p)},[r,n,a,o]),u=(0,Yr.useCallback)(p=>{r.delete(p)},[r]),c=(0,Yr.useMemo)(()=>({attemptShowModal:s,attemptHideModal:l,removeModalFromQueue:u}),[s,l,u]);return(0,Kx.jsx)(Wg.Provider,{value:c,children:e})};i();var Zx=require("styled-components");i();var qx=require("styled-components"),Xx=qx.css`
|
|
339
339
|
/* normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
|
|
340
340
|
|
|
341
341
|
/* Document
|
|
@@ -2453,7 +2453,7 @@
|
|
|
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();var Xm=require("react"),gM=(0,Xm.createContext)(void 0),vM=gM.Provider,yM=()=>{let e=(0,Xm.useContext)(gM);if(te(e))return e;throw new Error("useModalClose must be used within a ModalCloseProvider")};var Pa=require("react/jsx-runtime"),Dre=(0,Ta.default)(Jr)`
|
|
@@ -2476,7 +2476,7 @@
|
|
|
2476
2476
|
margin: auto;
|
|
2477
2477
|
}
|
|
2478
2478
|
`}
|
|
2479
|
-
`,Tre=e=>F(e)&&O6(e,"current")&&F(e.current),Are=e=>{(0,Ai.useEffect)(()=>{let t=document.activeElement;if(Tre(e)){let r=e.current;F(r)&&r.focus()}return()=>{t!==null&&setTimeout(()=>{t.focus()},0)}},[e])},CM=(0,Ai.forwardRef)(({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)=>{Are(g);let v=(0,Ai.useRef)(null),m=rd(l,{focusSelector:te(s)?s:null});return Gs(v,()=>{u&&c&&u()}),Wd(h.isOpen),jd("Escape",y=>{u&&u(),y.preventDefault()}),(0,Pa.jsx)(vM,{value:u,children:(0,Pa.jsx)(Dre,{$allowModalToExceedViewportBounds:r,alignHorizontal:e,alignVertical:t,children:(0,Pa.jsx)(Pre,{ref:m,$allowModalToExceedViewportBounds:r,$fullHeight:a,$overflow:d,"aria-modal":"true",role:"dialog",tabIndex:-1
|
|
2479
|
+
`,Tre=e=>F(e)&&O6(e,"current")&&F(e.current),Are=e=>{(0,Ai.useEffect)(()=>{let t=document.activeElement;if(Tre(e)){let r=e.current;F(r)&&r.focus()}return()=>{t!==null&&setTimeout(()=>{t.focus()},0)}},[e])},CM=(0,Ai.forwardRef)(({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)=>{Are(g);let v=(0,Ai.useRef)(null),m=rd(l,{focusSelector:te(s)?s:null});return Gs(v,()=>{u&&c&&u()}),Wd(h.isOpen),jd("Escape",y=>{u&&u(),y.preventDefault()}),(0,Pa.jsx)(vM,{value:u,children:(0,Pa.jsx)(Dre,{$allowModalToExceedViewportBounds:r,alignHorizontal:e,alignVertical:t,children:(0,Pa.jsx)(Pre,{ref:m,$allowModalToExceedViewportBounds:r,$fullHeight:a,$overflow:d,$width:p,"aria-modal":"true",role:"dialog",tabIndex:-1,...h,children:(0,Pa.jsx)(Ere,{ref:v,children:n})})})})}),e6=e=>{let{id:t,...r}=e,n=document.createElement("div");n.classList.add("Modal"),te(e.className)&&n.classList.add(e.className),te(t)&&(n.id=t);let o=(0,Ai.useRef)(n);return(0,Ai.useEffect)(()=>{let a=o.current;return document.body.appendChild(a),()=>a.remove()},[]),(0,bM.createPortal)((0,Pa.jsx)(Iu,{children:e.isOpen?(0,Pa.jsx)(CM,{ref:o,...r}):null}),o.current)};e6.displayName="Modal_VHS";CM.displayName="ModalContent";i();var _c=k(require("styled-components"));var t6=require("react/jsx-runtime"),xM=_c.default.div`
|
|
2480
2480
|
align-items: center;
|
|
2481
2481
|
display: flex;
|
|
2482
2482
|
padding: ${({theme:e})=>e.spacing.space04} ${({theme:e})=>e.spacing.space04};
|