@akinon/ui-image 0.5.0 → 1.0.1
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/cjs/index.d.ts +7 -3
- package/dist/cjs/index.d.ts.map +1 -1
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/types.d.ts +49 -0
- package/dist/esm/index.d.ts +7 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/types.d.ts +49 -0
- package/package.json +4 -4
package/dist/cjs/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ImageProps as AntImageProps } from 'antd';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
|
|
2
|
+
import type { IImageProps } from './types';
|
|
3
|
+
export type * from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Image component for Akinon UI.
|
|
6
6
|
*
|
|
@@ -8,5 +8,9 @@ export type ImageProps = Omit<AntImageProps, 'wrapperClassName' | 'wrapperStyle'
|
|
|
8
8
|
* It supports previewing the image in a modal.
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
export declare const Image:
|
|
11
|
+
export declare const Image: {
|
|
12
|
+
({ ...restImageProps }: IImageProps): React.JSX.Element;
|
|
13
|
+
PreviewGroup: React.FC<import("rc-image/lib/PreviewGroup").GroupConsumerProps>;
|
|
14
|
+
};
|
|
15
|
+
export type * from './types';
|
|
12
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/cjs/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,mBAAmB,SAAS,CAAC;AAE7B;;;;;;GAMG;AAEH,eAAO,MAAM,KAAK;4BAA2B,WAAW;;CAEvD,CAAC;AAIF,mBAAmB,SAAS,CAAC"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface IImageProps {
|
|
2
|
+
/**
|
|
3
|
+
* The alt attribute of the image
|
|
4
|
+
*/
|
|
5
|
+
alt?: string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Load failure fault-tolerant src
|
|
9
|
+
*/
|
|
10
|
+
fallback?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The height of the image
|
|
14
|
+
*/
|
|
15
|
+
height?: string | number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Load placeholder, use default placeholder when set true
|
|
19
|
+
*/
|
|
20
|
+
placeholder?: React.ReactNode;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show the preview
|
|
24
|
+
* preview config, disabled when false
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
preview?: boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The src attribute of the image, Image path
|
|
31
|
+
*/
|
|
32
|
+
src: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The width of the image
|
|
36
|
+
*/
|
|
37
|
+
width?: string | number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Load failed callback
|
|
41
|
+
*/
|
|
42
|
+
onError?: (event: Event) => void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Never use this prop. Akinon design system does not allow custom styles.
|
|
46
|
+
* @ignore
|
|
47
|
+
*/
|
|
48
|
+
style?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
|
|
49
|
+
}
|
package/dist/esm/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ImageProps as AntImageProps } from 'antd';
|
|
2
1
|
import * as React from 'react';
|
|
3
|
-
|
|
2
|
+
import type { IImageProps } from './types';
|
|
3
|
+
export type * from './types';
|
|
4
4
|
/**
|
|
5
5
|
* Image component for Akinon UI.
|
|
6
6
|
*
|
|
@@ -8,5 +8,9 @@ export type ImageProps = Omit<AntImageProps, 'wrapperClassName' | 'wrapperStyle'
|
|
|
8
8
|
* It supports previewing the image in a modal.
|
|
9
9
|
*
|
|
10
10
|
*/
|
|
11
|
-
export declare const Image:
|
|
11
|
+
export declare const Image: {
|
|
12
|
+
({ ...restImageProps }: IImageProps): React.JSX.Element;
|
|
13
|
+
PreviewGroup: React.FC<import("rc-image/lib/PreviewGroup").GroupConsumerProps>;
|
|
14
|
+
};
|
|
15
|
+
export type * from './types';
|
|
12
16
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AAC3C,mBAAmB,SAAS,CAAC;AAE7B;;;;;;GAMG;AAEH,eAAO,MAAM,KAAK;4BAA2B,WAAW;;CAEvD,CAAC;AAIF,mBAAmB,SAAS,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
export interface IImageProps {
|
|
2
|
+
/**
|
|
3
|
+
* The alt attribute of the image
|
|
4
|
+
*/
|
|
5
|
+
alt?: string;
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Load failure fault-tolerant src
|
|
9
|
+
*/
|
|
10
|
+
fallback?: string;
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The height of the image
|
|
14
|
+
*/
|
|
15
|
+
height?: string | number;
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Load placeholder, use default placeholder when set true
|
|
19
|
+
*/
|
|
20
|
+
placeholder?: React.ReactNode;
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Whether to show the preview
|
|
24
|
+
* preview config, disabled when false
|
|
25
|
+
* @default true
|
|
26
|
+
*/
|
|
27
|
+
preview?: boolean;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The src attribute of the image, Image path
|
|
31
|
+
*/
|
|
32
|
+
src: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The width of the image
|
|
36
|
+
*/
|
|
37
|
+
width?: string | number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Load failed callback
|
|
41
|
+
*/
|
|
42
|
+
onError?: (event: Event) => void;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Never use this prop. Akinon design system does not allow custom styles.
|
|
46
|
+
* @ignore
|
|
47
|
+
*/
|
|
48
|
+
style?: DO_NOT_USE_OR_YOU_WILL_BE_FIRED_INTERNAL_STYLE;
|
|
49
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@akinon/ui-image",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"private": false,
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
@@ -9,14 +9,14 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"antd": "5.
|
|
12
|
+
"antd": "5.22.6"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
15
|
"clean-package": "2.2.0",
|
|
16
16
|
"copyfiles": "^2.4.1",
|
|
17
17
|
"rimraf": "^5.0.5",
|
|
18
|
-
"typescript": "
|
|
19
|
-
"@akinon/typescript-config": "0.
|
|
18
|
+
"typescript": "*",
|
|
19
|
+
"@akinon/typescript-config": "1.0.1"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"react": ">=18",
|