gantri-components 2.119.4 → 2.121.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/image/image.types.d.ts +1 -1
- package/dist/components/index.d.ts +1 -0
- package/dist/components/video/video.presets.d.ts +1 -2
- package/dist/components/video/video.styles.d.ts +18 -3
- package/dist/components/video/video.types.d.ts +24 -23
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
|
@@ -83,4 +83,4 @@ export interface StyledImageContainerProps extends Pick<ImageProps, 'containerAs
|
|
|
83
83
|
}
|
|
84
84
|
export interface StyledImageProps extends Pick<ImageProps, 'objectFit' | 'objectPosition'> {
|
|
85
85
|
}
|
|
86
|
-
export type TransformationType = 'image' | 'video';
|
|
86
|
+
export type TransformationType = 'image' | 'video' | 'video-poster';
|
|
@@ -1,3 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Property } from 'csstype';
|
|
3
|
+
import { Color } from '../../styles';
|
|
4
|
+
import { Optional } from '../../types/common';
|
|
5
|
+
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
6
|
+
import { AspectRatio, ImageDimension } from '../image/image.types';
|
|
7
|
+
export interface StyledVideoContainerProps {
|
|
8
|
+
$containerAspectRatio?: ResolutionAwareProp<AspectRatio>;
|
|
9
|
+
$fallbackColor?: Optional<Color>;
|
|
10
|
+
$height?: Optional<ResolutionAwareProp<ImageDimension>>;
|
|
11
|
+
$maxHeight?: Optional<ResolutionAwareProp<Property.MaxHeight>>;
|
|
12
|
+
$maxWidth?: Optional<ResolutionAwareProp<Property.MinWidth>>;
|
|
13
|
+
$minHeight?: Optional<ResolutionAwareProp<Property.MinHeight>>;
|
|
14
|
+
$minWidth?: Optional<ResolutionAwareProp<Property.MinWidth>>;
|
|
15
|
+
$width?: Optional<ResolutionAwareProp<ImageDimension>>;
|
|
16
|
+
}
|
|
17
|
+
export declare const StyledVideoContainer: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components/dist/types").Substitute<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, StyledVideoContainerProps>> & string;
|
|
18
|
+
export declare const StyledPoster: import("styled-components/dist/types").IStyledComponentBase<"web", import("styled-components").FastOmit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, never>> & string;
|
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
|
+
import { CSSProperties, ReactEventHandler, VideoHTMLAttributes } from 'react';
|
|
2
3
|
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
3
|
-
import { Color } from '../../styles';
|
|
4
4
|
import { Optional } from '../../types/common';
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
import { Color } from '../../styles';
|
|
6
|
+
import { AspectRatio, ImageDimension } from '../image/image.types';
|
|
7
|
+
export interface VideoDefaultProps extends Pick<VideoHTMLAttributes<HTMLVideoElement>, 'autoPlay' | 'loop' | 'playsInline'> {
|
|
8
|
+
muted: boolean;
|
|
9
|
+
}
|
|
10
|
+
export interface VideoProps extends Partial<VideoDefaultProps>, Omit<VideoHTMLAttributes<HTMLVideoElement>, 'height' | 'width' | 'src'> {
|
|
11
|
+
className?: string;
|
|
12
|
+
containerAspectRatio?: ResolutionAwareProp<AspectRatio>;
|
|
13
|
+
containerClassName?: string;
|
|
8
14
|
fallbackColor?: Optional<Color>;
|
|
9
|
-
height?: Optional<ResolutionAwareProp<
|
|
10
|
-
immediateAvailable?:
|
|
15
|
+
height?: Optional<ResolutionAwareProp<ImageDimension>>;
|
|
16
|
+
immediateAvailable?: boolean;
|
|
11
17
|
maxHeight?: Optional<ResolutionAwareProp<Property.MaxHeight>>;
|
|
12
18
|
maxWidth?: Optional<ResolutionAwareProp<Property.MinWidth>>;
|
|
13
19
|
minHeight?: Optional<ResolutionAwareProp<Property.MinHeight>>;
|
|
14
20
|
minWidth?: Optional<ResolutionAwareProp<Property.MinWidth>>;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
export interface Transformations {
|
|
24
|
-
aspectRatio?: Optional<string>;
|
|
25
|
-
height?: Optional<number>;
|
|
26
|
-
mode?: Optional<TransformationMode>;
|
|
27
|
-
width?: Optional<number>;
|
|
21
|
+
objectFit?: Optional<ResolutionAwareProp<Property.ObjectFit>>;
|
|
22
|
+
objectPosition?: Optional<ResolutionAwareProp<Property.ObjectPosition>>;
|
|
23
|
+
observerMargin?: string;
|
|
24
|
+
onLoad?: ReactEventHandler<HTMLVideoElement>;
|
|
25
|
+
src: ResolutionAwareProp<string>;
|
|
26
|
+
style?: CSSProperties;
|
|
27
|
+
transformations?: VideoTransformations;
|
|
28
|
+
width?: Optional<ResolutionAwareProp<ImageDimension>>;
|
|
28
29
|
}
|
|
29
|
-
export
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
export interface VideoTransformations {
|
|
31
|
+
aspectRatio?: Optional<ResolutionAwareProp<AspectRatio>>;
|
|
32
|
+
height?: Optional<ResolutionAwareProp<number>>;
|
|
33
|
+
width?: Optional<ResolutionAwareProp<number>>;
|
|
33
34
|
}
|