@fluentui/react-migration-v0-v9 9.2.7 → 9.2.9
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/CHANGELOG.md +25 -2
- package/dist/index.d.ts +36 -0
- package/lib/components/Video/Video.js +42 -0
- package/lib/components/Video/Video.js.map +1 -0
- package/lib/components/Video/Video.styles.js +12 -0
- package/lib/components/Video/Video.styles.js.map +1 -0
- package/lib/components/Video/index.js +1 -0
- package/lib/components/Video/index.js.map +1 -0
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib-commonjs/components/Video/Video.js +61 -0
- package/lib-commonjs/components/Video/Video.js.map +1 -0
- package/lib-commonjs/components/Video/Video.styles.js +26 -0
- package/lib-commonjs/components/Video/Video.styles.js.map +1 -0
- package/lib-commonjs/components/Video/index.js +6 -0
- package/lib-commonjs/components/Video/index.js.map +1 -0
- package/lib-commonjs/index.js +7 -0
- package/lib-commonjs/index.js.map +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,35 @@
|
|
|
1
1
|
# Change Log - @fluentui/react-migration-v0-v9
|
|
2
2
|
|
|
3
|
-
This log was last generated on
|
|
3
|
+
This log was last generated on Thu, 15 Aug 2024 13:46:54 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## [9.2.9](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.2.9)
|
|
8
|
+
|
|
9
|
+
Thu, 15 Aug 2024 13:46:54 GMT
|
|
10
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.2.8..@fluentui/react-migration-v0-v9_v9.2.9)
|
|
11
|
+
|
|
12
|
+
### Patches
|
|
13
|
+
|
|
14
|
+
- Bump @fluentui/react-aria to v9.13.4 ([PR #32313](https://github.com/microsoft/fluentui/pull/32313) by beachball)
|
|
15
|
+
- Bump @fluentui/react-components to v9.54.12 ([PR #32313](https://github.com/microsoft/fluentui/pull/32313) by beachball)
|
|
16
|
+
- Bump @fluentui/react-tabster to v9.22.5 ([PR #32313](https://github.com/microsoft/fluentui/pull/32313) by beachball)
|
|
17
|
+
|
|
18
|
+
## [9.2.8](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.2.8)
|
|
19
|
+
|
|
20
|
+
Thu, 15 Aug 2024 08:22:12 GMT
|
|
21
|
+
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.2.7..@fluentui/react-migration-v0-v9_v9.2.8)
|
|
22
|
+
|
|
23
|
+
### Patches
|
|
24
|
+
|
|
25
|
+
- v9 migration: Add Video shim component ([PR #31885](https://github.com/microsoft/fluentui/pull/31885) by jukapsia@microsoft.com)
|
|
26
|
+
- Bump @fluentui/react-aria to v9.13.3 ([PR #31885](https://github.com/microsoft/fluentui/pull/31885) by beachball)
|
|
27
|
+
- Bump @fluentui/react-components to v9.54.11 ([PR #31885](https://github.com/microsoft/fluentui/pull/31885) by beachball)
|
|
28
|
+
- Bump @fluentui/react-tabster to v9.22.4 ([PR #31885](https://github.com/microsoft/fluentui/pull/31885) by beachball)
|
|
29
|
+
|
|
7
30
|
## [9.2.7](https://github.com/microsoft/fluentui/tree/@fluentui/react-migration-v0-v9_v9.2.7)
|
|
8
31
|
|
|
9
|
-
Wed, 07 Aug 2024 12:31:
|
|
32
|
+
Wed, 07 Aug 2024 12:31:57 GMT
|
|
10
33
|
[Compare changes](https://github.com/microsoft/fluentui/compare/@fluentui/react-migration-v0-v9_v9.2.6..@fluentui/react-migration-v0-v9_v9.2.7)
|
|
11
34
|
|
|
12
35
|
### Patches
|
package/dist/index.d.ts
CHANGED
|
@@ -460,6 +460,42 @@ export declare const v9HoverClasses: () => GriffelStyle;
|
|
|
460
460
|
|
|
461
461
|
export declare const v9Icon: () => GriffelStyle;
|
|
462
462
|
|
|
463
|
+
export declare const Video: React_2.ForwardRefExoticComponent<VideoProps & React_2.RefAttributes<HTMLVideoElement>>;
|
|
464
|
+
|
|
465
|
+
export declare const videoClassName = "fui-Video";
|
|
466
|
+
|
|
467
|
+
/**
|
|
468
|
+
* Video component props
|
|
469
|
+
*/
|
|
470
|
+
declare interface VideoProps extends React_2.VideoHTMLAttributes<HTMLVideoElement> {
|
|
471
|
+
/**
|
|
472
|
+
* The source URL of the video
|
|
473
|
+
*/
|
|
474
|
+
src: string;
|
|
475
|
+
/**
|
|
476
|
+
* Whether the video should start playing automatically
|
|
477
|
+
* @default false
|
|
478
|
+
*/
|
|
479
|
+
autoPlay?: boolean;
|
|
480
|
+
/**
|
|
481
|
+
* Whether the video should display controls
|
|
482
|
+
* @default true
|
|
483
|
+
*/
|
|
484
|
+
controls?: boolean;
|
|
485
|
+
/**
|
|
486
|
+
* Whether the video should loop
|
|
487
|
+
*/
|
|
488
|
+
loop?: boolean;
|
|
489
|
+
/**
|
|
490
|
+
* Whether the video should be muted
|
|
491
|
+
*/
|
|
492
|
+
muted?: boolean;
|
|
493
|
+
/**
|
|
494
|
+
* The URL of an image to display while the video is loading
|
|
495
|
+
*/
|
|
496
|
+
poster?: string;
|
|
497
|
+
}
|
|
498
|
+
|
|
463
499
|
declare type WithContent = ObjectShorthandValue<React_2.HTMLAttributes<HTMLDivElement>> | string;
|
|
464
500
|
|
|
465
501
|
export { }
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { mergeClasses, useMergedRefs } from '@fluentui/react-components';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { useVideoStyles } from './Video.styles';
|
|
4
|
+
export const videoClassName = 'fui-Video';
|
|
5
|
+
export const Video = /*#__PURE__*/ React.forwardRef((props, ref)=>{
|
|
6
|
+
'use no memo';
|
|
7
|
+
const { className, muted, ...rest } = props;
|
|
8
|
+
const videoRef = React.useRef();
|
|
9
|
+
const classes = useVideoStyles();
|
|
10
|
+
React.useEffect(()=>{
|
|
11
|
+
// this is a workaround for a potential memory leak in Chromium which retains a Detached HTMLVideoElement when <video autoplay> is unmounted
|
|
12
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=969049
|
|
13
|
+
return ()=>{
|
|
14
|
+
if (videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) {
|
|
15
|
+
// we want to perform the cleanup on the latest element rendered
|
|
16
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
17
|
+
videoRef.current.src = '';
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
}, [
|
|
21
|
+
videoRef
|
|
22
|
+
]);
|
|
23
|
+
React.useEffect(()=>{
|
|
24
|
+
// React doesn't guarantee that props will be set:
|
|
25
|
+
// https://github.com/facebook/react/issues/10389
|
|
26
|
+
if (videoRef.current) {
|
|
27
|
+
videoRef.current.muted = !!muted;
|
|
28
|
+
}
|
|
29
|
+
}, [
|
|
30
|
+
muted
|
|
31
|
+
]);
|
|
32
|
+
return /*#__PURE__*/ React.createElement("video", {
|
|
33
|
+
ref: useMergedRefs(ref, videoRef),
|
|
34
|
+
role: "application",
|
|
35
|
+
className: mergeClasses(videoClassName, classes.root, className),
|
|
36
|
+
controls: true,
|
|
37
|
+
autoPlay: false,
|
|
38
|
+
muted: muted,
|
|
39
|
+
...rest
|
|
40
|
+
});
|
|
41
|
+
});
|
|
42
|
+
Video.displayName = 'Video';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Video.tsx"],"sourcesContent":["import { mergeClasses, useMergedRefs } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useVideoStyles } from './Video.styles';\n\nexport const videoClassName = 'fui-Video';\n\n/**\n * Video component props\n */\nexport interface VideoProps extends React.VideoHTMLAttributes<HTMLVideoElement> {\n /**\n * The source URL of the video\n */\n src: string;\n\n /**\n * Whether the video should start playing automatically\n * @default false\n */\n autoPlay?: boolean;\n\n /**\n * Whether the video should display controls\n * @default true\n */\n controls?: boolean;\n\n /**\n * Whether the video should loop\n */\n loop?: boolean;\n\n /**\n * Whether the video should be muted\n */\n muted?: boolean;\n\n /**\n * The URL of an image to display while the video is loading\n */\n poster?: string;\n}\n\nexport const Video = React.forwardRef<HTMLVideoElement, VideoProps>((props, ref) => {\n 'use no memo';\n\n const { className, muted, ...rest } = props;\n\n const videoRef = React.useRef<HTMLVideoElement>();\n\n const classes = useVideoStyles();\n React.useEffect(() => {\n // this is a workaround for a potential memory leak in Chromium which retains a Detached HTMLVideoElement when <video autoplay> is unmounted\n // https://bugs.chromium.org/p/chromium/issues/detail?id=969049\n return () => {\n if (videoRef?.current) {\n // we want to perform the cleanup on the latest element rendered\n // eslint-disable-next-line react-hooks/exhaustive-deps\n videoRef.current.src = '';\n }\n };\n }, [videoRef]);\n\n React.useEffect(() => {\n // React doesn't guarantee that props will be set:\n // https://github.com/facebook/react/issues/10389\n if (videoRef.current) {\n videoRef.current.muted = !!muted;\n }\n }, [muted]);\n\n return (\n <video\n ref={useMergedRefs(ref, videoRef) as React.Ref<HTMLVideoElement>}\n role=\"application\"\n className={mergeClasses(videoClassName, classes.root, className)}\n controls={true}\n autoPlay={false}\n muted={muted}\n {...rest}\n />\n );\n});\n\nVideo.displayName = 'Video';\n"],"names":["mergeClasses","useMergedRefs","React","useVideoStyles","videoClassName","Video","forwardRef","props","ref","className","muted","rest","videoRef","useRef","classes","useEffect","current","src","video","role","root","controls","autoPlay","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":"AAAA,SAASA,YAAY,EAAEC,aAAa,QAAQ,6BAA6B;AACzE,YAAYC,WAAW,QAAQ;AAC/B,SAASC,cAAc,QAAQ,iBAAiB;AAEhD,OAAO,MAAMC,iBAAiB,YAAY;AAuC1C,OAAO,MAAMC,sBAAQH,MAAMI,UAAU,CAA+B,CAACC,OAAOC;IAC1E;IAEA,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGJ;IAEtC,MAAMK,WAAWV,MAAMW,MAAM;IAE7B,MAAMC,UAAUX;IAChBD,MAAMa,SAAS,CAAC;QACd,4IAA4I;QAC5I,+DAA+D;QAC/D,OAAO;YACL,IAAIH,qBAAAA,+BAAAA,SAAUI,OAAO,EAAE;gBACrB,gEAAgE;gBAChE,uDAAuD;gBACvDJ,SAASI,OAAO,CAACC,GAAG,GAAG;YACzB;QACF;IACF,GAAG;QAACL;KAAS;IAEbV,MAAMa,SAAS,CAAC;QACd,kDAAkD;QAClD,iDAAiD;QACjD,IAAIH,SAASI,OAAO,EAAE;YACpBJ,SAASI,OAAO,CAACN,KAAK,GAAG,CAAC,CAACA;QAC7B;IACF,GAAG;QAACA;KAAM;IAEV,qBACE,oBAACQ;QACCV,KAAKP,cAAcO,KAAKI;QACxBO,MAAK;QACLV,WAAWT,aAAaI,gBAAgBU,QAAQM,IAAI,EAAEX;QACtDY,UAAU;QACVC,UAAU;QACVZ,OAAOA;QACN,GAAGC,IAAI;;AAGd,GAAG;AAEHN,MAAMkB,WAAW,GAAG"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { __styles } from '@fluentui/react-components';
|
|
2
|
+
export const useVideoStyles = /*#__PURE__*/__styles({
|
|
3
|
+
root: {
|
|
4
|
+
mc9l5x: "f14t3ns0",
|
|
5
|
+
ha4doy: "fmrv4ls",
|
|
6
|
+
a9b677: "fly5x3f",
|
|
7
|
+
Bqenvij: "f11ysow2"
|
|
8
|
+
}
|
|
9
|
+
}, {
|
|
10
|
+
d: [".f14t3ns0{display:inline-block;}", ".fmrv4ls{vertical-align:middle;}", ".fly5x3f{width:100%;}", ".f11ysow2{height:auto;}"]
|
|
11
|
+
});
|
|
12
|
+
//# sourceMappingURL=Video.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["__styles","useVideoStyles","root","mc9l5x","ha4doy","a9b677","Bqenvij","d"],"sources":["Video.styles.js"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nexport const useVideoStyles = makeStyles({\n root: {\n display: 'inline-block',\n verticalAlign: 'middle',\n width: '100%',\n height: 'auto'\n }\n});\n"],"mappings":"AAAA,SAAAA,QAAA,QAA2B,4BAA4B;AACvD,OAAO,MAAMC,cAAc,gBAAGD,QAAA;EAAAE,IAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,MAAA;IAAAC,OAAA;EAAA;AAAA;EAAAC,CAAA;AAAA,CAO7B,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Video';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Video';\n"],"names":[],"rangeMappings":"","mappings":"AAAA,cAAc,UAAU"}
|
package/lib/index.js
CHANGED
|
@@ -2,6 +2,7 @@ export { GridShim, grid, gridClassName, useGridStyles } from './components/Grid/
|
|
|
2
2
|
export { FormFieldShim } from './components/FormField';
|
|
3
3
|
export { Segment } from './components/Segment';
|
|
4
4
|
export { slider } from './components/Slider';
|
|
5
|
+
export { Video, videoClassName } from './components/Video';
|
|
5
6
|
export { input } from './components/Input';
|
|
6
7
|
export { v0Icon, v9CustomSizeIcon, v9DisabledCursor, v9HoverClasses, v9Icon } from './components/Button';
|
|
7
8
|
export { spinner } from './components/Spinner';
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { GridShim, grid, gridClassName, useGridStyles } from './components/Grid/index';\nexport type { GridShimProps } from './components/Grid/index';\nexport { FormFieldShim } from './components/FormField';\nexport { Segment } from './components/Segment';\nexport { slider } from './components/Slider';\nexport { input } from './components/Input';\nexport { v0Icon, v9CustomSizeIcon, v9DisabledCursor, v9HoverClasses, v9Icon } from './components/Button';\nexport { spinner } from './components/Spinner';\nexport { StyledText, styledTextClassName } from './components/StyledText';\nexport type { StyledTextProps, StyledTextSlots } from './components/StyledText';\nexport { Primitive, primitiveClassName } from './components/Primitive';\nexport { ItemLayout, itemLayoutClassName, useItemLayoutStyles } from './components/ItemLayout';\nexport { Flex, flexClassName, flexItem, useFlexStyles } from './components/Flex';\nexport {\n List,\n ListItem,\n listClassNames,\n listItemClassNames,\n renderListItem_unstable,\n renderList_unstable,\n useListItemStyles_unstable,\n useListItem_unstable,\n useListSelection,\n useListStyles_unstable,\n useList_unstable,\n} from './components/List';\nexport type { ListItemProps, ListItemSlots, ListItemState, ListProps, ListSlots, ListState } from './components/List';\nexport {\n Attachment,\n AttachmentAction,\n AttachmentBody,\n AttachmentDescription,\n AttachmentHeader,\n AttachmentIcon,\n attachmentClassName,\n attachmentActionClassName,\n attachmentBodyClassName,\n attachmentDescriptionClassName,\n attachmentHeaderClassName,\n attachmentIconClassName,\n attachmentProgressBarClassName,\n attachmentProgressContainerClassName,\n} from './components/Attachment';\n\nexport type {\n AttachmentProps,\n AttachmentActionProps,\n AttachmentBodyProps,\n AttachmentDescriptionProps,\n AttachmentHeaderProps,\n AttachmentIconProps,\n} from './components/Attachment';\n"],"names":["GridShim","grid","gridClassName","useGridStyles","FormFieldShim","Segment","slider","input","v0Icon","v9CustomSizeIcon","v9DisabledCursor","v9HoverClasses","v9Icon","spinner","StyledText","styledTextClassName","Primitive","primitiveClassName","ItemLayout","itemLayoutClassName","useItemLayoutStyles","Flex","flexClassName","flexItem","useFlexStyles","List","ListItem","listClassNames","listItemClassNames","renderListItem_unstable","renderList_unstable","useListItemStyles_unstable","useListItem_unstable","useListSelection","useListStyles_unstable","useList_unstable","Attachment","AttachmentAction","AttachmentBody","AttachmentDescription","AttachmentHeader","AttachmentIcon","attachmentClassName","attachmentActionClassName","attachmentBodyClassName","attachmentDescriptionClassName","attachmentHeaderClassName","attachmentIconClassName","attachmentProgressBarClassName","attachmentProgressContainerClassName"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { GridShim, grid, gridClassName, useGridStyles } from './components/Grid/index';\nexport type { GridShimProps } from './components/Grid/index';\nexport { FormFieldShim } from './components/FormField';\nexport { Segment } from './components/Segment';\nexport { slider } from './components/Slider';\nexport { Video, videoClassName } from './components/Video';\nexport { input } from './components/Input';\nexport { v0Icon, v9CustomSizeIcon, v9DisabledCursor, v9HoverClasses, v9Icon } from './components/Button';\nexport { spinner } from './components/Spinner';\nexport { StyledText, styledTextClassName } from './components/StyledText';\nexport type { StyledTextProps, StyledTextSlots } from './components/StyledText';\nexport { Primitive, primitiveClassName } from './components/Primitive';\nexport { ItemLayout, itemLayoutClassName, useItemLayoutStyles } from './components/ItemLayout';\nexport { Flex, flexClassName, flexItem, useFlexStyles } from './components/Flex';\nexport {\n List,\n ListItem,\n listClassNames,\n listItemClassNames,\n renderListItem_unstable,\n renderList_unstable,\n useListItemStyles_unstable,\n useListItem_unstable,\n useListSelection,\n useListStyles_unstable,\n useList_unstable,\n} from './components/List';\nexport type { ListItemProps, ListItemSlots, ListItemState, ListProps, ListSlots, ListState } from './components/List';\nexport {\n Attachment,\n AttachmentAction,\n AttachmentBody,\n AttachmentDescription,\n AttachmentHeader,\n AttachmentIcon,\n attachmentClassName,\n attachmentActionClassName,\n attachmentBodyClassName,\n attachmentDescriptionClassName,\n attachmentHeaderClassName,\n attachmentIconClassName,\n attachmentProgressBarClassName,\n attachmentProgressContainerClassName,\n} from './components/Attachment';\n\nexport type {\n AttachmentProps,\n AttachmentActionProps,\n AttachmentBodyProps,\n AttachmentDescriptionProps,\n AttachmentHeaderProps,\n AttachmentIconProps,\n} from './components/Attachment';\n"],"names":["GridShim","grid","gridClassName","useGridStyles","FormFieldShim","Segment","slider","Video","videoClassName","input","v0Icon","v9CustomSizeIcon","v9DisabledCursor","v9HoverClasses","v9Icon","spinner","StyledText","styledTextClassName","Primitive","primitiveClassName","ItemLayout","itemLayoutClassName","useItemLayoutStyles","Flex","flexClassName","flexItem","useFlexStyles","List","ListItem","listClassNames","listItemClassNames","renderListItem_unstable","renderList_unstable","useListItemStyles_unstable","useListItem_unstable","useListSelection","useListStyles_unstable","useList_unstable","Attachment","AttachmentAction","AttachmentBody","AttachmentDescription","AttachmentHeader","AttachmentIcon","attachmentClassName","attachmentActionClassName","attachmentBodyClassName","attachmentDescriptionClassName","attachmentHeaderClassName","attachmentIconClassName","attachmentProgressBarClassName","attachmentProgressContainerClassName"],"rangeMappings":";;;;;;;;;;;;;","mappings":"AAAA,SAASA,QAAQ,EAAEC,IAAI,EAAEC,aAAa,EAAEC,aAAa,QAAQ,0BAA0B;AAEvF,SAASC,aAAa,QAAQ,yBAAyB;AACvD,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,MAAM,QAAQ,sBAAsB;AAC7C,SAASC,KAAK,EAAEC,cAAc,QAAQ,qBAAqB;AAC3D,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,MAAM,EAAEC,gBAAgB,EAAEC,gBAAgB,EAAEC,cAAc,EAAEC,MAAM,QAAQ,sBAAsB;AACzG,SAASC,OAAO,QAAQ,uBAAuB;AAC/C,SAASC,UAAU,EAAEC,mBAAmB,QAAQ,0BAA0B;AAE1E,SAASC,SAAS,EAAEC,kBAAkB,QAAQ,yBAAyB;AACvE,SAASC,UAAU,EAAEC,mBAAmB,EAAEC,mBAAmB,QAAQ,0BAA0B;AAC/F,SAASC,IAAI,EAAEC,aAAa,EAAEC,QAAQ,EAAEC,aAAa,QAAQ,oBAAoB;AACjF,SACEC,IAAI,EACJC,QAAQ,EACRC,cAAc,EACdC,kBAAkB,EAClBC,uBAAuB,EACvBC,mBAAmB,EACnBC,0BAA0B,EAC1BC,oBAAoB,EACpBC,gBAAgB,EAChBC,sBAAsB,EACtBC,gBAAgB,QACX,oBAAoB;AAE3B,SACEC,UAAU,EACVC,gBAAgB,EAChBC,cAAc,EACdC,qBAAqB,EACrBC,gBAAgB,EAChBC,cAAc,EACdC,mBAAmB,EACnBC,yBAAyB,EACzBC,uBAAuB,EACvBC,8BAA8B,EAC9BC,yBAAyB,EACzBC,uBAAuB,EACvBC,8BAA8B,EAC9BC,oCAAoC,QAC/B,0BAA0B"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
function _export(target, all) {
|
|
6
|
+
for(var name in all)Object.defineProperty(target, name, {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: all[name]
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
_export(exports, {
|
|
12
|
+
Video: function() {
|
|
13
|
+
return Video;
|
|
14
|
+
},
|
|
15
|
+
videoClassName: function() {
|
|
16
|
+
return videoClassName;
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
|
|
20
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
21
|
+
const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
|
|
22
|
+
const _Videostyles = require("./Video.styles");
|
|
23
|
+
const videoClassName = 'fui-Video';
|
|
24
|
+
const Video = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
|
|
25
|
+
'use no memo';
|
|
26
|
+
const { className, muted, ...rest } = props;
|
|
27
|
+
const videoRef = _react.useRef();
|
|
28
|
+
const classes = (0, _Videostyles.useVideoStyles)();
|
|
29
|
+
_react.useEffect(()=>{
|
|
30
|
+
// this is a workaround for a potential memory leak in Chromium which retains a Detached HTMLVideoElement when <video autoplay> is unmounted
|
|
31
|
+
// https://bugs.chromium.org/p/chromium/issues/detail?id=969049
|
|
32
|
+
return ()=>{
|
|
33
|
+
if (videoRef === null || videoRef === void 0 ? void 0 : videoRef.current) {
|
|
34
|
+
// we want to perform the cleanup on the latest element rendered
|
|
35
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
36
|
+
videoRef.current.src = '';
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}, [
|
|
40
|
+
videoRef
|
|
41
|
+
]);
|
|
42
|
+
_react.useEffect(()=>{
|
|
43
|
+
// React doesn't guarantee that props will be set:
|
|
44
|
+
// https://github.com/facebook/react/issues/10389
|
|
45
|
+
if (videoRef.current) {
|
|
46
|
+
videoRef.current.muted = !!muted;
|
|
47
|
+
}
|
|
48
|
+
}, [
|
|
49
|
+
muted
|
|
50
|
+
]);
|
|
51
|
+
return /*#__PURE__*/ _react.createElement("video", {
|
|
52
|
+
ref: (0, _reactcomponents.useMergedRefs)(ref, videoRef),
|
|
53
|
+
role: "application",
|
|
54
|
+
className: (0, _reactcomponents.mergeClasses)(videoClassName, classes.root, className),
|
|
55
|
+
controls: true,
|
|
56
|
+
autoPlay: false,
|
|
57
|
+
muted: muted,
|
|
58
|
+
...rest
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
Video.displayName = 'Video';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Video.tsx"],"sourcesContent":["import { mergeClasses, useMergedRefs } from '@fluentui/react-components';\nimport * as React from 'react';\nimport { useVideoStyles } from './Video.styles';\n\nexport const videoClassName = 'fui-Video';\n\n/**\n * Video component props\n */\nexport interface VideoProps extends React.VideoHTMLAttributes<HTMLVideoElement> {\n /**\n * The source URL of the video\n */\n src: string;\n\n /**\n * Whether the video should start playing automatically\n * @default false\n */\n autoPlay?: boolean;\n\n /**\n * Whether the video should display controls\n * @default true\n */\n controls?: boolean;\n\n /**\n * Whether the video should loop\n */\n loop?: boolean;\n\n /**\n * Whether the video should be muted\n */\n muted?: boolean;\n\n /**\n * The URL of an image to display while the video is loading\n */\n poster?: string;\n}\n\nexport const Video = React.forwardRef<HTMLVideoElement, VideoProps>((props, ref) => {\n 'use no memo';\n\n const { className, muted, ...rest } = props;\n\n const videoRef = React.useRef<HTMLVideoElement>();\n\n const classes = useVideoStyles();\n React.useEffect(() => {\n // this is a workaround for a potential memory leak in Chromium which retains a Detached HTMLVideoElement when <video autoplay> is unmounted\n // https://bugs.chromium.org/p/chromium/issues/detail?id=969049\n return () => {\n if (videoRef?.current) {\n // we want to perform the cleanup on the latest element rendered\n // eslint-disable-next-line react-hooks/exhaustive-deps\n videoRef.current.src = '';\n }\n };\n }, [videoRef]);\n\n React.useEffect(() => {\n // React doesn't guarantee that props will be set:\n // https://github.com/facebook/react/issues/10389\n if (videoRef.current) {\n videoRef.current.muted = !!muted;\n }\n }, [muted]);\n\n return (\n <video\n ref={useMergedRefs(ref, videoRef) as React.Ref<HTMLVideoElement>}\n role=\"application\"\n className={mergeClasses(videoClassName, classes.root, className)}\n controls={true}\n autoPlay={false}\n muted={muted}\n {...rest}\n />\n );\n});\n\nVideo.displayName = 'Video';\n"],"names":["Video","videoClassName","React","forwardRef","props","ref","className","muted","rest","videoRef","useRef","classes","useVideoStyles","useEffect","current","src","createElement","video","useMergedRefs","role","mergeClasses","root","controls","autoPlay","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA2CaA,KAAAA;eAAAA;;IAvCAC,cAAAA;eAAAA;;;;iCAJ+B;iEACrB;6BACQ;AAExB,MAAMA,iBAAiB;AAuCvB,MAAMD,QAAAA,WAAAA,GAAQE,OAAMC,UAAU,CAA+B,CAACC,OAAOC;IAC1E;IAEA,MAAM,EAAEC,SAAS,EAAEC,KAAK,EAAE,GAAGC,MAAM,GAAGJ;IAEtC,MAAMK,WAAWP,OAAMQ,MAAM;IAE7B,MAAMC,UAAUC,IAAAA,2BAAAA;IAChBV,OAAMW,SAAS,CAAC;QACd,4IAA4I;QAC5I,+DAA+D;QAC/D,OAAO;YACL,IAAIJ,aAAAA,QAAAA,aAAAA,KAAAA,IAAAA,KAAAA,IAAAA,SAAUK,OAAO,EAAE;gBACrB,gEAAgE;gBAChE,uDAAuD;gBACvDL,SAASK,OAAO,CAACC,GAAG,GAAG;YACzB;QACF;IACF,GAAG;QAACN;KAAS;IAEbP,OAAMW,SAAS,CAAC;QACd,kDAAkD;QAClD,iDAAiD;QACjD,IAAIJ,SAASK,OAAO,EAAE;YACpBL,SAASK,OAAO,CAACP,KAAK,GAAG,CAAC,CAACA;QAC7B;IACF,GAAG;QAACA;KAAM;IAEV,OAAA,WAAA,GACEL,OAAAc,aAAA,CAACC,SAAAA;QACCZ,KAAKa,IAAAA,8BAAAA,EAAcb,KAAKI;QACxBU,MAAK;QACLb,WAAWc,IAAAA,6BAAAA,EAAanB,gBAAgBU,QAAQU,IAAI,EAAEf;QACtDgB,UAAU;QACVC,UAAU;QACVhB,OAAOA;QACN,GAAGC,IAAI;;AAGd;AAEAR,MAAMwB,WAAW,GAAG"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
Object.defineProperty(exports, "useVideoStyles", {
|
|
6
|
+
enumerable: true,
|
|
7
|
+
get: function() {
|
|
8
|
+
return useVideoStyles;
|
|
9
|
+
}
|
|
10
|
+
});
|
|
11
|
+
const _reactcomponents = require("@fluentui/react-components");
|
|
12
|
+
const useVideoStyles = /*#__PURE__*/ (0, _reactcomponents.__styles)({
|
|
13
|
+
root: {
|
|
14
|
+
mc9l5x: "f14t3ns0",
|
|
15
|
+
ha4doy: "fmrv4ls",
|
|
16
|
+
a9b677: "fly5x3f",
|
|
17
|
+
Bqenvij: "f11ysow2"
|
|
18
|
+
}
|
|
19
|
+
}, {
|
|
20
|
+
d: [
|
|
21
|
+
".f14t3ns0{display:inline-block;}",
|
|
22
|
+
".fmrv4ls{vertical-align:middle;}",
|
|
23
|
+
".fly5x3f{width:100%;}",
|
|
24
|
+
".f11ysow2{height:auto;}"
|
|
25
|
+
]
|
|
26
|
+
}); //# sourceMappingURL=Video.styles.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["Video.styles.js"],"sourcesContent":["import { makeStyles } from '@fluentui/react-components';\nexport const useVideoStyles = makeStyles({\n root: {\n display: 'inline-block',\n verticalAlign: 'middle',\n width: '100%',\n height: 'auto'\n }\n});\n"],"names":["useVideoStyles","__styles","root","mc9l5x","ha4doy","a9b677","Bqenvij","d"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BACaA;;;eAAAA;;;iCADc;AACpB,MAAMA,iBAAc,WAAA,GAAGC,IAAAA,yBAAA,EAAA;IAAAC,MAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,QAAA;QAAAC,SAAA;IAAA;AAAA,GAAA;IAAAC,GAAA;QAAA;QAAA;QAAA;QAAA;KAAA;AAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export * from './Video';\n"],"names":[],"rangeMappings":";;;;;","mappings":";;;;;uBAAc"}
|
package/lib-commonjs/index.js
CHANGED
|
@@ -54,6 +54,9 @@ _export(exports, {
|
|
|
54
54
|
StyledText: function() {
|
|
55
55
|
return _StyledText.StyledText;
|
|
56
56
|
},
|
|
57
|
+
Video: function() {
|
|
58
|
+
return _Video.Video;
|
|
59
|
+
},
|
|
57
60
|
attachmentActionClassName: function() {
|
|
58
61
|
return _Attachment.attachmentActionClassName;
|
|
59
62
|
},
|
|
@@ -158,12 +161,16 @@ _export(exports, {
|
|
|
158
161
|
},
|
|
159
162
|
v9Icon: function() {
|
|
160
163
|
return _Button.v9Icon;
|
|
164
|
+
},
|
|
165
|
+
videoClassName: function() {
|
|
166
|
+
return _Video.videoClassName;
|
|
161
167
|
}
|
|
162
168
|
});
|
|
163
169
|
const _index = require("./components/Grid/index");
|
|
164
170
|
const _FormField = require("./components/FormField");
|
|
165
171
|
const _Segment = require("./components/Segment");
|
|
166
172
|
const _Slider = require("./components/Slider");
|
|
173
|
+
const _Video = require("./components/Video");
|
|
167
174
|
const _Input = require("./components/Input");
|
|
168
175
|
const _Button = require("./components/Button");
|
|
169
176
|
const _Spinner = require("./components/Spinner");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["index.ts"],"sourcesContent":["export { GridShim, grid, gridClassName, useGridStyles } from './components/Grid/index';\nexport type { GridShimProps } from './components/Grid/index';\nexport { FormFieldShim } from './components/FormField';\nexport { Segment } from './components/Segment';\nexport { slider } from './components/Slider';\nexport { input } from './components/Input';\nexport { v0Icon, v9CustomSizeIcon, v9DisabledCursor, v9HoverClasses, v9Icon } from './components/Button';\nexport { spinner } from './components/Spinner';\nexport { StyledText, styledTextClassName } from './components/StyledText';\nexport type { StyledTextProps, StyledTextSlots } from './components/StyledText';\nexport { Primitive, primitiveClassName } from './components/Primitive';\nexport { ItemLayout, itemLayoutClassName, useItemLayoutStyles } from './components/ItemLayout';\nexport { Flex, flexClassName, flexItem, useFlexStyles } from './components/Flex';\nexport {\n List,\n ListItem,\n listClassNames,\n listItemClassNames,\n renderListItem_unstable,\n renderList_unstable,\n useListItemStyles_unstable,\n useListItem_unstable,\n useListSelection,\n useListStyles_unstable,\n useList_unstable,\n} from './components/List';\nexport type { ListItemProps, ListItemSlots, ListItemState, ListProps, ListSlots, ListState } from './components/List';\nexport {\n Attachment,\n AttachmentAction,\n AttachmentBody,\n AttachmentDescription,\n AttachmentHeader,\n AttachmentIcon,\n attachmentClassName,\n attachmentActionClassName,\n attachmentBodyClassName,\n attachmentDescriptionClassName,\n attachmentHeaderClassName,\n attachmentIconClassName,\n attachmentProgressBarClassName,\n attachmentProgressContainerClassName,\n} from './components/Attachment';\n\nexport type {\n AttachmentProps,\n AttachmentActionProps,\n AttachmentBodyProps,\n AttachmentDescriptionProps,\n AttachmentHeaderProps,\n AttachmentIconProps,\n} from './components/Attachment';\n"],"names":["Attachment","AttachmentAction","AttachmentBody","AttachmentDescription","AttachmentHeader","AttachmentIcon","Flex","FormFieldShim","GridShim","ItemLayout","List","ListItem","Primitive","Segment","StyledText","attachmentActionClassName","attachmentBodyClassName","attachmentClassName","attachmentDescriptionClassName","attachmentHeaderClassName","attachmentIconClassName","attachmentProgressBarClassName","attachmentProgressContainerClassName","flexClassName","flexItem","grid","gridClassName","input","itemLayoutClassName","listClassNames","listItemClassNames","primitiveClassName","renderListItem_unstable","renderList_unstable","slider","spinner","styledTextClassName","useFlexStyles","useGridStyles","useItemLayoutStyles","useListItemStyles_unstable","useListItem_unstable","useListSelection","useListStyles_unstable","useList_unstable","v0Icon","v9CustomSizeIcon","v9DisabledCursor","v9HoverClasses","v9Icon"],"rangeMappings":"
|
|
1
|
+
{"version":3,"sources":["index.ts"],"sourcesContent":["export { GridShim, grid, gridClassName, useGridStyles } from './components/Grid/index';\nexport type { GridShimProps } from './components/Grid/index';\nexport { FormFieldShim } from './components/FormField';\nexport { Segment } from './components/Segment';\nexport { slider } from './components/Slider';\nexport { Video, videoClassName } from './components/Video';\nexport { input } from './components/Input';\nexport { v0Icon, v9CustomSizeIcon, v9DisabledCursor, v9HoverClasses, v9Icon } from './components/Button';\nexport { spinner } from './components/Spinner';\nexport { StyledText, styledTextClassName } from './components/StyledText';\nexport type { StyledTextProps, StyledTextSlots } from './components/StyledText';\nexport { Primitive, primitiveClassName } from './components/Primitive';\nexport { ItemLayout, itemLayoutClassName, useItemLayoutStyles } from './components/ItemLayout';\nexport { Flex, flexClassName, flexItem, useFlexStyles } from './components/Flex';\nexport {\n List,\n ListItem,\n listClassNames,\n listItemClassNames,\n renderListItem_unstable,\n renderList_unstable,\n useListItemStyles_unstable,\n useListItem_unstable,\n useListSelection,\n useListStyles_unstable,\n useList_unstable,\n} from './components/List';\nexport type { ListItemProps, ListItemSlots, ListItemState, ListProps, ListSlots, ListState } from './components/List';\nexport {\n Attachment,\n AttachmentAction,\n AttachmentBody,\n AttachmentDescription,\n AttachmentHeader,\n AttachmentIcon,\n attachmentClassName,\n attachmentActionClassName,\n attachmentBodyClassName,\n attachmentDescriptionClassName,\n attachmentHeaderClassName,\n attachmentIconClassName,\n attachmentProgressBarClassName,\n attachmentProgressContainerClassName,\n} from './components/Attachment';\n\nexport type {\n AttachmentProps,\n AttachmentActionProps,\n AttachmentBodyProps,\n AttachmentDescriptionProps,\n AttachmentHeaderProps,\n AttachmentIconProps,\n} from './components/Attachment';\n"],"names":["Attachment","AttachmentAction","AttachmentBody","AttachmentDescription","AttachmentHeader","AttachmentIcon","Flex","FormFieldShim","GridShim","ItemLayout","List","ListItem","Primitive","Segment","StyledText","Video","attachmentActionClassName","attachmentBodyClassName","attachmentClassName","attachmentDescriptionClassName","attachmentHeaderClassName","attachmentIconClassName","attachmentProgressBarClassName","attachmentProgressContainerClassName","flexClassName","flexItem","grid","gridClassName","input","itemLayoutClassName","listClassNames","listItemClassNames","primitiveClassName","renderListItem_unstable","renderList_unstable","slider","spinner","styledTextClassName","useFlexStyles","useGridStyles","useItemLayoutStyles","useListItemStyles_unstable","useListItem_unstable","useListSelection","useListStyles_unstable","useList_unstable","v0Icon","v9CustomSizeIcon","v9DisabledCursor","v9HoverClasses","v9Icon","videoClassName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IA6BEA,UAAU;eAAVA,sBAAU;;IACVC,gBAAgB;eAAhBA,4BAAgB;;IAChBC,cAAc;eAAdA,0BAAc;;IACdC,qBAAqB;eAArBA,iCAAqB;;IACrBC,gBAAgB;eAAhBA,4BAAgB;;IAChBC,cAAc;eAAdA,0BAAc;;IArBPC,IAAI;eAAJA,UAAI;;IAXJC,aAAa;eAAbA,wBAAa;;IAFbC,QAAQ;eAARA,eAAQ;;IAYRC,UAAU;eAAVA,sBAAU;;IAGjBC,IAAI;eAAJA,UAAI;;IACJC,QAAQ;eAARA,cAAQ;;IALDC,SAAS;eAATA,oBAAS;;IARTC,OAAO;eAAPA,gBAAO;;IAMPC,UAAU;eAAVA,sBAAU;;IAJVC,KAAK;eAALA,YAAK;;IA+BZC,yBAAyB;eAAzBA,qCAAyB;;IACzBC,uBAAuB;eAAvBA,mCAAuB;;IAFvBC,mBAAmB;eAAnBA,+BAAmB;;IAGnBC,8BAA8B;eAA9BA,0CAA8B;;IAC9BC,yBAAyB;eAAzBA,qCAAyB;;IACzBC,uBAAuB;eAAvBA,mCAAuB;;IACvBC,8BAA8B;eAA9BA,0CAA8B;;IAC9BC,oCAAoC;eAApCA,gDAAoC;;IA7BvBC,aAAa;eAAbA,mBAAa;;IAAEC,QAAQ;eAARA,cAAQ;;IAbnBC,IAAI;eAAJA,WAAI;;IAAEC,aAAa;eAAbA,oBAAa;;IAM7BC,KAAK;eAALA,YAAK;;IAMOC,mBAAmB;eAAnBA,+BAAmB;;IAKtCC,cAAc;eAAdA,oBAAc;;IACdC,kBAAkB;eAAlBA,wBAAkB;;IAPAC,kBAAkB;eAAlBA,6BAAkB;;IAQpCC,uBAAuB;eAAvBA,6BAAuB;;IACvBC,mBAAmB;eAAnBA,yBAAmB;;IAhBZC,MAAM;eAANA,cAAM;;IAINC,OAAO;eAAPA,gBAAO;;IACKC,mBAAmB;eAAnBA,+BAAmB;;IAIAC,aAAa;eAAbA,mBAAa;;IAbbC,aAAa;eAAbA,oBAAa;;IAYXC,mBAAmB;eAAnBA,+BAAmB;;IAS3DC,0BAA0B;eAA1BA,gCAA0B;;IAC1BC,oBAAoB;eAApBA,0BAAoB;;IACpBC,gBAAgB;eAAhBA,sBAAgB;;IAChBC,sBAAsB;eAAtBA,4BAAsB;;IACtBC,gBAAgB;eAAhBA,sBAAgB;;IAlBTC,MAAM;eAANA,cAAM;;IAAEC,gBAAgB;eAAhBA,wBAAgB;;IAAEC,gBAAgB;eAAhBA,wBAAgB;;IAAEC,cAAc;eAAdA,sBAAc;;IAAEC,MAAM;eAANA,cAAM;;IAF3DC,cAAc;eAAdA,qBAAc;;;uBAL+B;2BAE/B;yBACN;wBACD;uBACe;uBAChB;wBAC6D;yBAC3D;4BACwB;2BAEF;4BACuB;sBACR;sBAatD;4BAiBA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluentui/react-migration-v0-v9",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.9",
|
|
4
4
|
"description": "Migration shim components and methods for hybrid v0/v9 applications building on Fluent UI React.",
|
|
5
5
|
"main": "lib-commonjs/index.js",
|
|
6
6
|
"module": "lib/index.js",
|
|
@@ -33,13 +33,13 @@
|
|
|
33
33
|
"@fluentui/scripts-storybook": "*"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@fluentui/react-aria": "^9.13.
|
|
37
|
-
"@fluentui/react-components": "^9.54.
|
|
36
|
+
"@fluentui/react-aria": "^9.13.4",
|
|
37
|
+
"@fluentui/react-components": "^9.54.12",
|
|
38
38
|
"@fluentui/react-context-selector": "^9.1.65",
|
|
39
39
|
"@fluentui/react-icons": "^2.0.245",
|
|
40
40
|
"@fluentui/react-jsx-runtime": "^9.0.42",
|
|
41
41
|
"@fluentui/react-shared-contexts": "^9.20.0",
|
|
42
|
-
"@fluentui/react-tabster": "^9.22.
|
|
42
|
+
"@fluentui/react-tabster": "^9.22.5",
|
|
43
43
|
"@fluentui/react-theme": "^9.1.19",
|
|
44
44
|
"@fluentui/react-utilities": "^9.18.13",
|
|
45
45
|
"@griffel/react": "^1.5.22",
|