gantri-components 1.131.0 → 1.133.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 +4 -0
- package/dist/components/in-view/in-view.d.ts +3 -0
- package/dist/components/in-view/in-view.presets.d.ts +2 -0
- package/dist/components/in-view/in-view.types.d.ts +12 -0
- package/dist/components/in-view/index.d.ts +1 -0
- package/dist/components/index.d.ts +1 -0
- package/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Property } from 'csstype';
|
|
2
|
+
import { CSSProperties } from 'react';
|
|
2
3
|
import { ResolutionAwareProp } from '../../types/resolution-aware-prop.type';
|
|
3
4
|
import { Color } from '../../styles';
|
|
4
5
|
import { Optional } from '../../types/common';
|
|
@@ -6,6 +7,7 @@ export declare type ImageTransformationsVariant = 'f' | 'h' | 'q' | 'ffh' | 'hff
|
|
|
6
7
|
export interface ImageProps {
|
|
7
8
|
alt: string;
|
|
8
9
|
aspectRatio?: Optional<ResolutionAwareProp<string>>;
|
|
10
|
+
className?: string;
|
|
9
11
|
commonTransformations?: Optional<Transformations>;
|
|
10
12
|
dpr?: Optional<number>;
|
|
11
13
|
fallbackColor?: Optional<Color>;
|
|
@@ -19,10 +21,12 @@ export interface ImageProps {
|
|
|
19
21
|
objectFit?: Optional<ResolutionAwareProp<Property.ObjectFit>>;
|
|
20
22
|
objectPosition?: Optional<ResolutionAwareProp<Property.ObjectPosition>>;
|
|
21
23
|
observerMargin?: string;
|
|
24
|
+
onClick?: () => void;
|
|
22
25
|
quality?: Optional<TransformationQuality>;
|
|
23
26
|
showLoadingIndicator?: Optional<boolean>;
|
|
24
27
|
source?: Optional<ImageSource>;
|
|
25
28
|
src: ResolutionAwareProp<string>;
|
|
29
|
+
style?: CSSProperties;
|
|
26
30
|
transformations?: Optional<ResolutionAwareProp<Transformations>>;
|
|
27
31
|
/**
|
|
28
32
|
* Used to define common transformation for images.
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* rootMargin, threshold should be specified according to the specifications of IntersectionObserver api
|
|
3
|
+
* https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
|
|
4
|
+
* */
|
|
5
|
+
export interface InViewProps {
|
|
6
|
+
rootMargin?: string;
|
|
7
|
+
threshold?: number;
|
|
8
|
+
/**
|
|
9
|
+
* If true, the observer will stop executing after it actives once
|
|
10
|
+
* */
|
|
11
|
+
triggerOnce?: boolean;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './in-view';
|