@npm_leadtech/legal-lib-components 5.68.0 → 5.69.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/src/components/atoms/Video/Video.d.ts +1 -1
- package/dist/src/components/atoms/Video/Video.js +2 -2
- package/dist/src/components/atoms/Video/Video.tsx +13 -2
- package/dist/src/components/atoms/Video/VideoProps.types.d.ts +2 -0
- package/dist/src/components/atoms/Video/VideoProps.types.ts +2 -0
- package/dist/src/components/sections/StepsRatafiaSection/StepsRatafiaSection.js +2 -2
- package/dist/src/components/sections/StepsRatafiaSection/StepsRatafiaSection.tsx +9 -2
- package/dist/src/components/sections/StepsRatafiaSection/StepsRatafiaSectionProps.types.d.ts +1 -0
- package/dist/src/components/sections/StepsRatafiaSection/StepsRatafiaSectionProps.types.ts +1 -0
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { type VideoProps } from './VideoProps.types';
|
|
3
|
-
declare const Video: ({ videoSrcURL, videoMimeType, title, controls, autoPlay, loop, muted, track }: VideoProps) => React.JSX.Element | null;
|
|
3
|
+
declare const Video: ({ videoSrcURL, videoMimeType, title, controls, autoPlay, loop, muted, track, preload, poster }: VideoProps) => React.JSX.Element | null;
|
|
4
4
|
export default Video;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
const Video = ({ videoSrcURL, videoMimeType = 'video/webm', title = '', controls = true, autoPlay = false, loop = false, muted = false, track }) => {
|
|
2
|
+
const Video = ({ videoSrcURL, videoMimeType = 'video/webm', title = '', controls = true, autoPlay = false, loop = false, muted = false, track, preload = 'auto', poster = '' }) => {
|
|
3
3
|
if (!videoSrcURL)
|
|
4
4
|
return null;
|
|
5
5
|
return (
|
|
6
6
|
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
7
|
-
_jsxs("video", { "data-testid": 'video', title: title, controls: controls, autoPlay: autoPlay, loop: loop, muted: muted, children: [_jsx("source", { src: videoSrcURL, type: videoMimeType }), track && _jsx("track", { src: track.src, kind: track.kind, srcLang: track.srclang, label: track.label }), "Your browser does not support the video tag."] }));
|
|
7
|
+
_jsxs("video", { "data-testid": 'video', title: title, controls: controls, autoPlay: autoPlay, loop: loop, muted: muted, preload: preload, poster: poster, children: [_jsx("source", { src: videoSrcURL, type: videoMimeType }), track && _jsx("track", { src: track.src, kind: track.kind, srcLang: track.srclang, label: track.label }), "Your browser does not support the video tag."] }));
|
|
8
8
|
};
|
|
9
9
|
export default Video;
|
|
@@ -10,12 +10,23 @@ const Video = ({
|
|
|
10
10
|
autoPlay = false,
|
|
11
11
|
loop = false,
|
|
12
12
|
muted = false,
|
|
13
|
-
track
|
|
13
|
+
track,
|
|
14
|
+
preload = 'auto',
|
|
15
|
+
poster = ''
|
|
14
16
|
}: VideoProps): React.JSX.Element | null => {
|
|
15
17
|
if (!videoSrcURL) return null
|
|
16
18
|
return (
|
|
17
19
|
// eslint-disable-next-line jsx-a11y/media-has-caption
|
|
18
|
-
<video
|
|
20
|
+
<video
|
|
21
|
+
data-testid='video'
|
|
22
|
+
title={title}
|
|
23
|
+
controls={controls}
|
|
24
|
+
autoPlay={autoPlay}
|
|
25
|
+
loop={loop}
|
|
26
|
+
muted={muted}
|
|
27
|
+
preload={preload}
|
|
28
|
+
poster={poster}
|
|
29
|
+
>
|
|
19
30
|
<source src={videoSrcURL} type={videoMimeType} />
|
|
20
31
|
{track && <track src={track.src} kind={track.kind} srcLang={track.srclang} label={track.label} />}
|
|
21
32
|
Your browser does not support the video tag.
|
|
@@ -3,11 +3,11 @@ import { StepsRatafiaContent } from '../../organisms';
|
|
|
3
3
|
import { StepsRatafiaSectionStyled } from './StepsRatafiaSection.styled';
|
|
4
4
|
import { Video } from '../../atoms';
|
|
5
5
|
import classNames from 'classnames';
|
|
6
|
-
const StepsRatafiaSection = ({ title, steps, videoUrl, mainImage, description }) => {
|
|
6
|
+
const StepsRatafiaSection = ({ title, steps, videoUrl, mainImage, description, videoPosterUrl }) => {
|
|
7
7
|
const isEsignatureLanding = !videoUrl;
|
|
8
8
|
const classnames = classNames({
|
|
9
9
|
'--is-esignature': isEsignatureLanding
|
|
10
10
|
});
|
|
11
|
-
return (_jsx(StepsRatafiaSectionStyled, { className: 'steps-ratafia-section', children: _jsxs("div", { className: `steps-ratafia-section__wrapper ${classnames}`, children: [!isEsignatureLanding ? (_jsx("div", { className: 'steps-ratafia-section__wrapper__video', children: _jsx(Video, { videoSrcURL: videoUrl,
|
|
11
|
+
return (_jsx(StepsRatafiaSectionStyled, { className: 'steps-ratafia-section', children: _jsxs("div", { className: `steps-ratafia-section__wrapper ${classnames}`, children: [!isEsignatureLanding ? (_jsx("div", { className: 'steps-ratafia-section__wrapper__video', children: _jsx(Video, { videoSrcURL: videoUrl, preload: 'none', poster: videoPosterUrl }) })) : (_jsx("div", { className: 'steps-ratafia-section__wrapper__image', children: mainImage })), _jsx("div", { className: 'steps-ratafia-section__wrapper__content', children: _jsx(StepsRatafiaContent, { title: title, steps: steps, description: description }) })] }) }));
|
|
12
12
|
};
|
|
13
13
|
export default StepsRatafiaSection;
|
|
@@ -6,7 +6,14 @@ import { StepsRatafiaSectionStyled } from './StepsRatafiaSection.styled'
|
|
|
6
6
|
import { Video } from '../../atoms'
|
|
7
7
|
import classNames from 'classnames'
|
|
8
8
|
|
|
9
|
-
const StepsRatafiaSection: FC<StepsRatafiaSectionProps> = ({
|
|
9
|
+
const StepsRatafiaSection: FC<StepsRatafiaSectionProps> = ({
|
|
10
|
+
title,
|
|
11
|
+
steps,
|
|
12
|
+
videoUrl,
|
|
13
|
+
mainImage,
|
|
14
|
+
description,
|
|
15
|
+
videoPosterUrl
|
|
16
|
+
}) => {
|
|
10
17
|
const isEsignatureLanding = !videoUrl
|
|
11
18
|
const classnames = classNames({
|
|
12
19
|
'--is-esignature': isEsignatureLanding
|
|
@@ -17,7 +24,7 @@ const StepsRatafiaSection: FC<StepsRatafiaSectionProps> = ({ title, steps, video
|
|
|
17
24
|
<div className={`steps-ratafia-section__wrapper ${classnames}`}>
|
|
18
25
|
{!isEsignatureLanding ? (
|
|
19
26
|
<div className='steps-ratafia-section__wrapper__video'>
|
|
20
|
-
<Video videoSrcURL={videoUrl}
|
|
27
|
+
<Video videoSrcURL={videoUrl} preload='none' poster={videoPosterUrl} />
|
|
21
28
|
</div>
|
|
22
29
|
) : (
|
|
23
30
|
<div className='steps-ratafia-section__wrapper__image'>{mainImage}</div>
|