cos-design 3.7.1 → 3.7.2
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/CHANGELOG.md +12 -0
- package/README.md +18 -17
- package/dist/index.cjs +3 -3
- package/dist/index.css +1 -1
- package/dist/index.js +1429 -802
- package/dist/src/components/index.d.ts +2 -0
- package/dist/src/components/photoClothesline/index.d.ts +5 -0
- package/dist/src/components/photoClothesline/types.d.ts +67 -0
- package/package.json +1 -1
|
@@ -79,6 +79,8 @@ export type { OrbitalChartItem, OrbitalChartProps } from './orbitalChart';
|
|
|
79
79
|
export { default as ParticleNetwork } from './particleNetwork';
|
|
80
80
|
export { default as PhotoAlbum } from './photoAlbum';
|
|
81
81
|
export type { PhotoAlbumItem, PhotoAlbumLabels, PhotoAlbumProps } from './photoAlbum';
|
|
82
|
+
export { default as PhotoClothesline } from './photoClothesline';
|
|
83
|
+
export type { PhotoClotheslineItem, PhotoClotheslineProps } from './photoClothesline';
|
|
82
84
|
export { default as PlasmaBall } from './plasmaBall';
|
|
83
85
|
export type { PlasmaBallProps } from './plasmaBall';
|
|
84
86
|
export { default as SmokeFog } from './smokeFog';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { PhotoClotheslineProps } from './types';
|
|
3
|
+
declare const PhotoClothesline: React.FC<PhotoClotheslineProps>;
|
|
4
|
+
export type { PhotoClotheslineItem, PhotoClotheslineProps } from './types';
|
|
5
|
+
export default PhotoClothesline;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { CSSProperties } from 'react';
|
|
2
|
+
export interface PhotoClotheslineItem {
|
|
3
|
+
/** 图片地址 */
|
|
4
|
+
src: string;
|
|
5
|
+
/** 图片替代文本 */
|
|
6
|
+
alt?: string;
|
|
7
|
+
/** 照片标题 */
|
|
8
|
+
title?: string;
|
|
9
|
+
/** 照片说明 */
|
|
10
|
+
description?: string;
|
|
11
|
+
}
|
|
12
|
+
export interface PhotoClotheslineProps {
|
|
13
|
+
/** 晾绳上的照片列表 */
|
|
14
|
+
photos: PhotoClotheslineItem[];
|
|
15
|
+
/** 组件宽度 */
|
|
16
|
+
width?: number | string;
|
|
17
|
+
/** 组件高度 */
|
|
18
|
+
height?: number | string;
|
|
19
|
+
/** 单张照片宽度(px) */
|
|
20
|
+
photoWidth?: number;
|
|
21
|
+
/** 单张照片高度(px) */
|
|
22
|
+
photoHeight?: number;
|
|
23
|
+
/** 照片间距(px) */
|
|
24
|
+
photoGap?: number;
|
|
25
|
+
/** 绳索悬挂高度(px,距顶部) */
|
|
26
|
+
ropeTop?: number;
|
|
27
|
+
/** 绳索整体垂度(px) */
|
|
28
|
+
ropeSag?: number;
|
|
29
|
+
/** 照片吊带长度(px),越长摆动幅度越大、周期越慢 */
|
|
30
|
+
bandLength?: number;
|
|
31
|
+
/** 吊带宽度(px) */
|
|
32
|
+
bandWidth?: number;
|
|
33
|
+
/** 照片被拖离静止位的最大距离(px),越小吊带越快绷紧 */
|
|
34
|
+
maxPull?: number;
|
|
35
|
+
/** 主绳刚度 0.1~2,越大被拽下后弹回越快 */
|
|
36
|
+
stiffness?: number;
|
|
37
|
+
/** 阻尼比 0~1,越小摆动越久 */
|
|
38
|
+
damping?: number;
|
|
39
|
+
/** 相邻照片之间的绳索牵连强度 0~1 */
|
|
40
|
+
tension?: number;
|
|
41
|
+
/** 照片随机倾角幅度(度) */
|
|
42
|
+
tilt?: number;
|
|
43
|
+
/** 主绳颜色 */
|
|
44
|
+
ropeColor?: string;
|
|
45
|
+
/** 吊带颜色,默认跟随 ropeColor */
|
|
46
|
+
bandColor?: string;
|
|
47
|
+
/** 木夹子颜色 */
|
|
48
|
+
pinColor?: string;
|
|
49
|
+
/** 相纸边框颜色 */
|
|
50
|
+
frameColor?: string;
|
|
51
|
+
/** 背景(任意 CSS background 值) */
|
|
52
|
+
background?: string;
|
|
53
|
+
/** 照片填充方式 */
|
|
54
|
+
objectFit?: CSSProperties['objectFit'];
|
|
55
|
+
/** 是否显示照片标题与说明 */
|
|
56
|
+
showCaption?: boolean;
|
|
57
|
+
/** 初始居中显示的照片索引 */
|
|
58
|
+
initialIndex?: number;
|
|
59
|
+
/** 点击照片回调 */
|
|
60
|
+
onPhotoClick?: (index: number, photo: PhotoClotheslineItem) => void;
|
|
61
|
+
/** 无障碍名称 */
|
|
62
|
+
ariaLabel?: string;
|
|
63
|
+
/** 自定义类名 */
|
|
64
|
+
className?: string;
|
|
65
|
+
/** 自定义样式 */
|
|
66
|
+
style?: CSSProperties;
|
|
67
|
+
}
|