gantri-components 2.119.4 → 2.120.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.
@@ -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';
@@ -41,4 +41,5 @@ export * from './text-field';
41
41
  export * from './toggle';
42
42
  export * from './tooltip';
43
43
  export * from './typography';
44
+ export * from './video';
44
45
  export * from './components.types';
@@ -1,3 +1,2 @@
1
- import { Transformations, VideoProps } from './video.types';
1
+ import { VideoProps } from './video.types';
2
2
  export declare const VideoPresets: Partial<VideoProps>;
3
- export declare const TransformationPresets: Partial<Transformations>;
@@ -1,3 +1,18 @@
1
- import { StyledImageContainerProps } from './video.types';
2
- export declare const StyledImageContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledImageContainerProps, never>;
3
- export declare const StyledVideo: import("styled-components").StyledComponent<"video", import("styled-components").DefaultTheme, {}, never>;
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
- export interface VideoProps {
6
- aspectRatio?: Optional<ResolutionAwareProp<string>>;
7
- commonTransformations?: Optional<Transformations>;
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<string | number>>;
10
- immediateAvailable?: Optional<boolean>;
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
- mode?: Optional<ResolutionAwareProp<TransformationMode>>;
16
- name: ResolutionAwareProp<string>;
17
- quality?: Optional<TransformationQuality>;
18
- showLoadingIndicator?: Optional<boolean>;
19
- source?: Optional<ImageSource>;
20
- transformations?: Optional<ResolutionAwareProp<Transformations>>;
21
- width?: Optional<ResolutionAwareProp<string | number>>;
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 declare type ImageSource = 'static' | 'dynamic' | 'absolute';
30
- export declare type TransformationMode = 'scale' | 'limitFit' | 'limitFill' | 'limitPad' | 'fill' | 'fit' | 'crop' | 'pad' | 'imaggaCrop' | 'imaggaScale' | 'minimumFit' | 'minimumPad' | 'fillPad';
31
- export declare type TransformationQuality = 'auto' | 'autoBest' | 'autoEco' | 'autoGood' | 'autoLow' | 'jpegmini' | 'jpegminiBest' | 'jpegminiHigh' | 'jpegminiMedium';
32
- export interface StyledImageContainerProps extends Pick<VideoProps, 'aspectRatio' | 'width' | 'height' | 'fallbackColor' | 'maxWidth' | 'maxHeight' | 'minWidth' | 'minHeight'> {
30
+ export interface VideoTransformations {
31
+ aspectRatio?: Optional<ResolutionAwareProp<AspectRatio>>;
32
+ height?: Optional<ResolutionAwareProp<number>>;
33
+ width?: Optional<ResolutionAwareProp<number>>;
33
34
  }