gantri-components 1.56.0 → 1.59.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.
@@ -0,0 +1,4 @@
1
+ import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
2
+ import { ImageTransformationsVariant, Transformations } from './image.types';
3
+ import { Optional } from '../../types/common';
4
+ export declare const TRANSFORMATION_VARIANTS_MAP: Record<ImageTransformationsVariant, Optional<ResolutionAwareProp<Transformations>>>;
@@ -1,3 +1,4 @@
1
1
  import { StyledImageContainerProps, StyledImageProps } from './image.types';
2
2
  export declare const StyledImageContainer: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, StyledImageContainerProps, never>;
3
3
  export declare const StyledImage: import("styled-components").StyledComponent<"img", import("styled-components").DefaultTheme, StyledImageProps, never>;
4
+ export declare const StyledContent: import("styled-components").StyledComponent<"div", import("styled-components").DefaultTheme, {}, never>;
@@ -2,6 +2,7 @@ import { Property } from 'csstype';
2
2
  import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
3
3
  import { Color } from '../../styles';
4
4
  import { Optional } from '../../types/common';
5
+ export declare type ImageTransformationsVariant = 'f' | 'h' | 'q' | 'ffh' | 'hff' | 'hhf';
5
6
  export interface ImageProps {
6
7
  alt: string;
7
8
  aspectRatio?: Optional<ResolutionAwareProp<string>>;
@@ -22,6 +23,16 @@ export interface ImageProps {
22
23
  source?: Optional<ImageSource>;
23
24
  src: ResolutionAwareProp<string>;
24
25
  transformations?: Optional<ResolutionAwareProp<Transformations>>;
26
+ /**
27
+ * Used to define common transformation for images.
28
+ * f => full width
29
+ * h => half width
30
+ * q => quarter width
31
+ * ffh => desktop full width, tablet full width, mobile half width
32
+ * hff => desktop half width, tablet full width, mobile full width
33
+ * hhf => desktop half width, tablet half width, mobile full width
34
+ */
35
+ transformationsVariant?: Optional<ImageTransformationsVariant>;
25
36
  width?: Optional<ResolutionAwareProp<string | number>>;
26
37
  }
27
38
  export interface Transformations {