@tenerife.music/ui 0.0.6 → 0.0.7
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.d.ts +49 -0
- package/dist/components/image/Image.d.ts.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +1082 -945
- package/package.json +1 -1
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type ImageRadius = 'none' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | 'full';
|
|
3
|
+
export type ImageShadow = 'none' | 'sm' | 'base' | 'md' | 'lg' | 'xl' | '2xl' | 'inner';
|
|
4
|
+
export type ImageAspectRatio = 'square' | 'video' | 'photo' | 'wide' | string;
|
|
5
|
+
type ImgProps = React.ImgHTMLAttributes<HTMLImageElement>;
|
|
6
|
+
export interface ImageProps extends Omit<ImgProps, 'className'> {
|
|
7
|
+
/**
|
|
8
|
+
* Custom className for the image element itself
|
|
9
|
+
*/
|
|
10
|
+
className?: string;
|
|
11
|
+
/**
|
|
12
|
+
* Custom className for the wrapper div container
|
|
13
|
+
*/
|
|
14
|
+
wrapperClassName?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Border radius for the image container
|
|
17
|
+
*/
|
|
18
|
+
radius?: ImageRadius;
|
|
19
|
+
/**
|
|
20
|
+
* Shadow for the image container
|
|
21
|
+
*/
|
|
22
|
+
shadow?: ImageShadow;
|
|
23
|
+
/**
|
|
24
|
+
* Aspect ratio for the image container (e.g., 'square', 'video', 'photo', 'wide', or custom like '16/9', '4/3')
|
|
25
|
+
*/
|
|
26
|
+
aspectRatio?: ImageAspectRatio;
|
|
27
|
+
/**
|
|
28
|
+
* Fallback image source if the main image fails to load
|
|
29
|
+
*/
|
|
30
|
+
fallbackSrc?: string;
|
|
31
|
+
/**
|
|
32
|
+
* Whether to show a skeleton loader while the image is loading
|
|
33
|
+
*/
|
|
34
|
+
showSkeleton?: boolean;
|
|
35
|
+
/**
|
|
36
|
+
* Whether the image should fill its container (uses absolute positioning)
|
|
37
|
+
*/
|
|
38
|
+
fill?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* Callback fired when the image has finished loading
|
|
41
|
+
*/
|
|
42
|
+
onLoadingComplete?: (result: {
|
|
43
|
+
naturalWidth: number;
|
|
44
|
+
naturalHeight: number;
|
|
45
|
+
}) => void;
|
|
46
|
+
}
|
|
47
|
+
declare const ImageComponent: React.ForwardRefExoticComponent<ImageProps & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
export { ImageComponent as Image };
|
|
49
|
+
//# sourceMappingURL=Image.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,MAAM,CAAC;AACtF,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,OAAO,CAAC;AACxF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,CAAC;AAmC9E,KAAK,QAAQ,GAAG,KAAK,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;AAE1D,MAAM,WAAW,UAAW,SAAQ,IAAI,CAAC,QAAQ,EAAE,WAAW,CAAC;IAC7D;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;OAEG;IACH,MAAM,CAAC,EAAE,WAAW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