@wistia/vhs 2.71.1 → 2.72.0
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 +2 -0
- package/dist/components/Modal/Dialog.d.ts.map +1 -1
- package/dist/components/Modal/Modal.d.ts +5 -0
- package/dist/components/Modal/Modal.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +3 -3
- package/dist/index.mjs +3 -3
- package/dist/index.mjs.map +3 -3
- package/package.json +1 -1
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import type { ModalProps } from './Modal';
|
|
1
2
|
export type DialogProps = {
|
|
2
3
|
fullHeight: boolean;
|
|
3
4
|
width?: string | undefined;
|
|
5
|
+
overflow?: ModalProps['overflow'];
|
|
4
6
|
};
|
|
5
7
|
export declare const Dialog: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, DialogProps, never>;
|
|
6
8
|
//# sourceMappingURL=Dialog.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dialog.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Dialog.tsx"],"names":[],"mappings":"
|
|
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,UAAU,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,QAAQ,CAAC,EAAE,UAAU,CAAC,UAAU,CAAC,CAAC;CACnC,CAAC;AAEF,eAAO,MAAM,MAAM,kHAqBlB,CAAC"}
|
|
@@ -46,6 +46,11 @@ export type ModalProps = ComponentPropsWithoutRef<'div'> & {
|
|
|
46
46
|
shouldTrapFocus?: boolean;
|
|
47
47
|
/** The base width to apply to the Modal */
|
|
48
48
|
width?: string;
|
|
49
|
+
/**
|
|
50
|
+
* The overflow behavior to apply to the modal
|
|
51
|
+
* @default 'auto'
|
|
52
|
+
*/
|
|
53
|
+
overflow?: 'auto' | 'clip' | 'hidden' | 'scroll' | 'visible';
|
|
49
54
|
};
|
|
50
55
|
export declare const Modal: {
|
|
51
56
|
(props: ModalProps): JSX.Element;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,wBAAwB,EAAE,SAAS,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAcjF,MAAM,MAAM,UAAU,GAAG,wBAAwB,CAAC,KAAK,CAAC,GAAG;IACzD;;OAEG;IACH,eAAe,CAAC,EAAE,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;IACzD;;OAEG;IACH,aAAa,CAAC,EAAE,QAAQ,GAAG,QAAQ,GAAG,QAAQ,GAAG,KAAK,CAAC;IACvD;;OAEG;IACH,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,UAAU,CAAC,EAAE,OAAO,CAAC;IAErB;;OAEG;IACH,eAAe,CAAC,EAAE,SAAS,CAAC,WAAW,GAAG,SAAS,CAAC,CAAC;IAErD;;OAEG;IACH,MAAM,EAAE,OAAO,CAAC;IAEhB;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAE5B;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAE1B,2CAA2C;IAC3C,KAAK,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"Modal.d.ts","sourceRoot":"","sources":["../../../src/components/Modal/Modal.tsx"],"names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
|
|
@@ -2418,7 +2418,7 @@
|
|
|
2418
2418
|
|
|
2419
2419
|
/* latest versions of FF, Safari, and Chrome support dynamic viewport units; 100vh left as a fallback */
|
|
2420
2420
|
height: 100vh;
|
|
2421
|
-
overflow: auto;
|
|
2421
|
+
overflow: ${({overflow:e})=>e??"auto"};
|
|
2422
2422
|
position: relative;
|
|
2423
2423
|
width: 100vw;
|
|
2424
2424
|
|
|
@@ -2439,7 +2439,7 @@
|
|
|
2439
2439
|
display: flex;
|
|
2440
2440
|
flex-direction: column;
|
|
2441
2441
|
width: 100%;
|
|
2442
|
-
`,Jne=e=>(0,Fo.isNotNil)(e)&&(0,Fo.hasKey)(e,"current")&&(0,Fo.isNotNil)(e.current),Zne=e=>{(0,Li.useEffect)(()=>{let t=document.activeElement;if(Jne(e)){let r=e.current;(0,Fo.isNotNil)(r)&&r.focus()}return()=>{t!==null&&setTimeout(()=>{t.focus()},0)}},[e])},xI=(0,Li.forwardRef)(({alignHorizontal:e="center",alignVertical:t="center",children:r,className:n,fullHeight:o=!1,initialFocusRef:a,shouldTrapFocus:s=!0,onRequestClose:u,shouldCloseOnClickOutside:l=!0,width:c,...
|
|
2442
|
+
`,Jne=e=>(0,Fo.isNotNil)(e)&&(0,Fo.hasKey)(e,"current")&&(0,Fo.isNotNil)(e.current),Zne=e=>{(0,Li.useEffect)(()=>{let t=document.activeElement;if(Jne(e)){let r=e.current;(0,Fo.isNotNil)(r)&&r.focus()}return()=>{t!==null&&setTimeout(()=>{t.focus()},0)}},[e])},xI=(0,Li.forwardRef)(({alignHorizontal:e="center",alignVertical:t="center",children:r,className:n,fullHeight:o=!1,initialFocusRef:a,shouldTrapFocus:s=!0,onRequestClose:u,shouldCloseOnClickOutside:l=!0,width:c,overflow:p="auto",...d},m)=>{Zne(m);let g=(0,Li.useRef)(null),v=Cd(s,{focusSelector:a?.current});return tu(g,()=>{u&&l&&u()}),u1(d.isOpen),s1("Escape",h=>{u&&u(),h.preventDefault()}),(0,za.jsx)(yI,{value:u,children:(0,za.jsx)(Xne,{alignHorizontal:e,alignVertical:t,children:(0,za.jsx)(hI,{ref:v,"aria-modal":"true",fullHeight:o,overflow:p,role:"dialog",tabIndex:-1,width:c,...d,children:(0,za.jsx)(Yne,{ref:g,children:r})})})})}),T6=e=>{let{id:t,...r}=e,n=document.createElement("div");n.classList.add("Modal"),(0,Fo.isNotUndefined)(e.className)&&n.classList.add(e.className),(0,Fo.isNotUndefined)(t)&&(n.id=t);let o=(0,Li.useRef)(n);return(0,Li.useEffect)(()=>{let a=o.current;return document.body.appendChild(a),()=>a.remove()},[]),(0,CI.createPortal)((0,za.jsx)(Zl,{children:e.isOpen?(0,za.jsx)(xI,{ref:o,...r}):null}),o.current)};T6.displayName="Modal_VHS";xI.displayName="ModalContent";i();var pf=A(require("styled-components"));var A6=require("react/jsx-runtime"),wI=pf.default.div`
|
|
2443
2443
|
align-items: center;
|
|
2444
2444
|
display: flex;
|
|
2445
2445
|
padding: ${({theme:e})=>e.spacing.space04} ${({theme:e})=>e.spacing.space04};
|