@luoluoyu/fluentui-plus 2.6.0 → 2.6.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/dist/components/Image/Counter.d.ts +10 -0
- package/dist/components/Image/Counter.d.ts.map +1 -0
- package/dist/components/Image/Fallback.d.ts +8 -0
- package/dist/components/Image/Fallback.d.ts.map +1 -0
- package/dist/components/Image/Image.d.ts +5 -0
- package/dist/components/Image/Image.d.ts.map +1 -0
- package/dist/components/Image/ImageGroup.d.ts +5 -0
- package/dist/components/Image/ImageGroup.d.ts.map +1 -0
- package/dist/components/Image/ImagePreview.d.ts +5 -0
- package/dist/components/Image/ImagePreview.d.ts.map +1 -0
- package/dist/components/Image/Navigation.d.ts +14 -0
- package/dist/components/Image/Navigation.d.ts.map +1 -0
- package/dist/components/Image/Placeholder.d.ts +8 -0
- package/dist/components/Image/Placeholder.d.ts.map +1 -0
- package/dist/components/Image/PreviewContent.d.ts +9 -0
- package/dist/components/Image/PreviewContent.d.ts.map +1 -0
- package/dist/components/Image/Toolbar.d.ts +16 -0
- package/dist/components/Image/Toolbar.d.ts.map +1 -0
- package/dist/components/Image/constants.d.ts +8 -0
- package/dist/components/Image/constants.d.ts.map +1 -0
- package/dist/components/Image/context/ImageContext.d.ts +13 -0
- package/dist/components/Image/context/ImageContext.d.ts.map +1 -0
- package/dist/components/Image/context/index.d.ts +3 -0
- package/dist/components/Image/context/index.d.ts.map +1 -0
- package/dist/components/Image/hooks/index.d.ts +6 -0
- package/dist/components/Image/hooks/index.d.ts.map +1 -0
- package/dist/components/Image/hooks/useBodyScrollLock.d.ts +6 -0
- package/dist/components/Image/hooks/useBodyScrollLock.d.ts.map +1 -0
- package/dist/components/Image/hooks/useKeyboardShortcuts.d.ts +24 -0
- package/dist/components/Image/hooks/useKeyboardShortcuts.d.ts.map +1 -0
- package/dist/components/Image/hooks/useNavigation.d.ts +14 -0
- package/dist/components/Image/hooks/useNavigation.d.ts.map +1 -0
- package/dist/components/Image/hooks/useTransform.d.ts +15 -0
- package/dist/components/Image/hooks/useTransform.d.ts.map +1 -0
- package/dist/components/Image/hooks/useWheelZoom.d.ts +10 -0
- package/dist/components/Image/hooks/useWheelZoom.d.ts.map +1 -0
- package/dist/components/Image/index.d.ts +12 -0
- package/dist/components/Image/index.d.ts.map +1 -0
- package/dist/components/Image/types.d.ts +150 -0
- package/dist/components/Image/types.d.ts.map +1 -0
- package/dist/components/Select/Listbox.d.ts.map +1 -1
- package/dist/components/Select/hooks/index.d.ts +1 -2
- package/dist/components/Select/hooks/index.d.ts.map +1 -1
- package/dist/components/Tabs/Tabs.d.ts.map +1 -1
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/useFloatingPosition.d.ts +20 -0
- package/dist/hooks/useFloatingPosition.d.ts.map +1 -0
- package/dist/index.esm.js +6058 -5714
- package/dist/index.esm.js.map +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface CounterProps {
|
|
3
|
+
/** 当前图片索引(从 0 开始) */
|
|
4
|
+
currentIndex: number;
|
|
5
|
+
/** 图片总数 */
|
|
6
|
+
total: number;
|
|
7
|
+
}
|
|
8
|
+
declare const Counter: React.FC<CounterProps>;
|
|
9
|
+
export default Counter;
|
|
10
|
+
//# sourceMappingURL=Counter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Counter.d.ts","sourceRoot":"","sources":["../../../src/components/Image/Counter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,WAAW,YAAY;IAC3B,qBAAqB;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAInC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Fallback.d.ts","sourceRoot":"","sources":["../../../src/components/Image/Fallback.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,aAAa;IAC5B,0BAA0B;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,aAAa,CAcrC,CAAC;AAEF,eAAe,QAAQ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../../../src/components/Image/Image.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA0D,MAAM,OAAO,CAAC;AAM/E,OAAO,KAAK,EAAE,UAAU,EAAiC,MAAM,SAAS,CAAC;AACzE,OAAO,cAAc,CAAC;AAItB,QAAA,MAAM,KAAK,EAAE,KAAK,CAAC,EAAE,CAAC,UAAU,CAuK/B,CAAC;AAEF,eAAe,KAAK,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageGroup.d.ts","sourceRoot":"","sources":["../../../src/components/Image/ImageGroup.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAC;AAI7D,OAAO,KAAK,EAAE,eAAe,EAAuC,MAAM,SAAS,CAAC;AACpF,OAAO,cAAc,CAAC;AAItB,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAyFzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImagePreview.d.ts","sourceRoot":"","sources":["../../../src/components/Image/ImagePreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAGjD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAGjD,OAAO,cAAc,CAAC;AAEtB,QAAA,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAgF7C,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface NavigationProps {
|
|
3
|
+
/** 当前图片索引 */
|
|
4
|
+
currentIndex: number;
|
|
5
|
+
/** 图片总数 */
|
|
6
|
+
total: number;
|
|
7
|
+
/** 上一张回调 */
|
|
8
|
+
onPrev: () => void;
|
|
9
|
+
/** 下一张回调 */
|
|
10
|
+
onNext: () => void;
|
|
11
|
+
}
|
|
12
|
+
declare const Navigation: React.FC<NavigationProps>;
|
|
13
|
+
export default Navigation;
|
|
14
|
+
//# sourceMappingURL=Navigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Navigation.d.ts","sourceRoot":"","sources":["../../../src/components/Image/Navigation.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,eAAe;IAC9B,aAAa;IACb,YAAY,EAAE,MAAM,CAAC;IACrB,WAAW;IACX,KAAK,EAAE,MAAM,CAAC;IACd,YAAY;IACZ,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,YAAY;IACZ,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAED,QAAA,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CASzC,CAAC;AAEF,eAAe,UAAU,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface PlaceholderProps {
|
|
3
|
+
/** 自定义占位内容,不传则显示默认图片图标 */
|
|
4
|
+
content?: React.ReactNode;
|
|
5
|
+
}
|
|
6
|
+
declare const Placeholder: React.FC<PlaceholderProps>;
|
|
7
|
+
export default Placeholder;
|
|
8
|
+
//# sourceMappingURL=Placeholder.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Placeholder.d.ts","sourceRoot":"","sources":["../../../src/components/Image/Placeholder.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,MAAM,WAAW,gBAAgB;IAC/B,0BAA0B;IAC1B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED,QAAA,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAa3C,CAAC;AAEF,eAAe,WAAW,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ImagePreviewProps } from './types';
|
|
3
|
+
export interface PreviewContentProps extends ImagePreviewProps {
|
|
4
|
+
/** 销毁回调,用于清理 Portal DOM */
|
|
5
|
+
onDestroy: () => void;
|
|
6
|
+
}
|
|
7
|
+
declare const PreviewContent: React.FC<PreviewContentProps>;
|
|
8
|
+
export default PreviewContent;
|
|
9
|
+
//# sourceMappingURL=PreviewContent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PreviewContent.d.ts","sourceRoot":"","sources":["../../../src/components/Image/PreviewContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAyC,MAAM,OAAO,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAOjD,MAAM,WAAW,mBAAoB,SAAQ,iBAAiB;IAC5D,2BAA2B;IAC3B,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB;AAED,QAAA,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA0FjD,CAAC;AAEF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export interface ToolbarProps {
|
|
3
|
+
/** 放大回调 */
|
|
4
|
+
onZoomIn: () => void;
|
|
5
|
+
/** 缩小回调 */
|
|
6
|
+
onZoomOut: () => void;
|
|
7
|
+
/** 逆时针旋转回调 */
|
|
8
|
+
onRotateLeft: () => void;
|
|
9
|
+
/** 顺时针旋转回调 */
|
|
10
|
+
onRotateRight: () => void;
|
|
11
|
+
/** 关闭回调 */
|
|
12
|
+
onClose: () => void;
|
|
13
|
+
}
|
|
14
|
+
declare const Toolbar: React.FC<ToolbarProps>;
|
|
15
|
+
export default Toolbar;
|
|
16
|
+
//# sourceMappingURL=Toolbar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Toolbar.d.ts","sourceRoot":"","sources":["../../../src/components/Image/Toolbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,MAAM,WAAW,YAAY;IAC3B,WAAW;IACX,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW;IACX,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc;IACd,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,cAAc;IACd,aAAa,EAAE,MAAM,IAAI,CAAC;IAC1B,WAAW;IACX,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAkBnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export declare const prefixCls = "fluentui-plus-image-preview-modal";
|
|
2
|
+
/** 最小缩放比例 */
|
|
3
|
+
export declare const MIN_SCALE = 0.1;
|
|
4
|
+
/** 最大缩放比例 */
|
|
5
|
+
export declare const MAX_SCALE = 10;
|
|
6
|
+
/** 缩放步进值 */
|
|
7
|
+
export declare const SCALE_STEP = 0.25;
|
|
8
|
+
//# sourceMappingURL=constants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/components/Image/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS,sCAAsC,CAAC;AAE7D,aAAa;AACb,eAAO,MAAM,SAAS,MAAM,CAAC;AAC7B,aAAa;AACb,eAAO,MAAM,SAAS,KAAK,CAAC;AAC5B,YAAY;AACZ,eAAO,MAAM,UAAU,OAAO,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { ImageContextValue } from '../types';
|
|
3
|
+
declare const ImageContext: React.Context<ImageContextValue | undefined>;
|
|
4
|
+
export interface ImageProviderProps {
|
|
5
|
+
/** 子元素 */
|
|
6
|
+
children: React.ReactNode;
|
|
7
|
+
/** 上下文值 */
|
|
8
|
+
value: ImageContextValue;
|
|
9
|
+
}
|
|
10
|
+
export declare const ImageProvider: React.FC<ImageProviderProps>;
|
|
11
|
+
export declare const useImageContext: () => ImageContextValue | undefined;
|
|
12
|
+
export default ImageContext;
|
|
13
|
+
//# sourceMappingURL=ImageContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImageContext.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/context/ImageContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA6C,MAAM,OAAO,CAAC;AAClE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,QAAA,MAAM,YAAY,8CAA0D,CAAC;AAC7E,MAAM,WAAW,kBAAkB;IACjC,UAAU;IACV,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,WAAW;IACX,KAAK,EAAE,iBAAiB,CAAC;CAC1B;AAED,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAGtD,CAAC;AAEF,eAAO,MAAM,eAAe,QAAO,iBAAiB,GAAG,SAEtD,CAAC;AAEF,eAAe,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/context/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAChE,YAAY,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export { useTransform } from './useTransform';
|
|
2
|
+
export { useNavigation } from './useNavigation';
|
|
3
|
+
export { useKeyboardShortcuts } from './useKeyboardShortcuts';
|
|
4
|
+
export { useWheelZoom } from './useWheelZoom';
|
|
5
|
+
export { useBodyScrollLock } from './useBodyScrollLock';
|
|
6
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useBodyScrollLock.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/hooks/useBodyScrollLock.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,eAAO,MAAM,iBAAiB,YAW7B,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 键盘快捷键配置选项
|
|
3
|
+
*/
|
|
4
|
+
interface KeyboardShortcutsOptions {
|
|
5
|
+
/** 关闭预览回调 */
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** 上一张图片回调 */
|
|
8
|
+
onPrev: () => void;
|
|
9
|
+
/** 下一张图片回调 */
|
|
10
|
+
onNext: () => void;
|
|
11
|
+
/** 放大回调 */
|
|
12
|
+
onZoomIn: () => void;
|
|
13
|
+
/** 缩小回调 */
|
|
14
|
+
onZoomOut: () => void;
|
|
15
|
+
/** 是否显示导航(决定左右键是否生效) */
|
|
16
|
+
showNavigation: boolean;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* useKeyboardShortcuts - 键盘快捷键 Hook
|
|
20
|
+
* @description 为图片预览添加键盘快捷键支持
|
|
21
|
+
*/
|
|
22
|
+
export declare const useKeyboardShortcuts: ({ onClose, onPrev, onNext, onZoomIn, onZoomOut, showNavigation, }: KeyboardShortcutsOptions) => void;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=useKeyboardShortcuts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useKeyboardShortcuts.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/hooks/useKeyboardShortcuts.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,UAAU,wBAAwB;IAChC,aAAa;IACb,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,cAAc;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,cAAc;IACd,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,WAAW;IACX,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW;IACX,SAAS,EAAE,MAAM,IAAI,CAAC;IACtB,wBAAwB;IACxB,cAAc,EAAE,OAAO,CAAC;CACzB;AAED;;;GAGG;AACH,eAAO,MAAM,oBAAoB,GAAI,mEAOlC,wBAAwB,SA8B1B,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useNavigation - 图片导航 Hook
|
|
3
|
+
* @description 管理图片索引状态,提供上一张/下一张切换功能
|
|
4
|
+
* @param currentIndex - 当前图片索引
|
|
5
|
+
* @param total - 图片总数
|
|
6
|
+
* @param onIndexChange - 索引变化回调
|
|
7
|
+
* @returns 包含内部索引及导航方法的对象
|
|
8
|
+
*/
|
|
9
|
+
export declare const useNavigation: (currentIndex: number, total: number, onIndexChange?: (index: number) => void) => {
|
|
10
|
+
internalIndex: number;
|
|
11
|
+
handlePrev: () => void;
|
|
12
|
+
handleNext: () => void;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=useNavigation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useNavigation.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/hooks/useNavigation.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,GAAI,cAAc,MAAM,EAAE,OAAO,MAAM,EAAE,gBAAgB,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI;;;;CAgCzG,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* useTransform - 图片变换 Hook
|
|
3
|
+
* @description 提供图片的缩放和旋转功能
|
|
4
|
+
* @returns 包含缩放比例、旋转角度及操作方法的对象
|
|
5
|
+
*/
|
|
6
|
+
export declare const useTransform: () => {
|
|
7
|
+
scale: number;
|
|
8
|
+
rotate: number;
|
|
9
|
+
resetTransform: () => void;
|
|
10
|
+
handleZoomIn: () => void;
|
|
11
|
+
handleZoomOut: () => void;
|
|
12
|
+
handleRotateLeft: () => void;
|
|
13
|
+
handleRotateRight: () => void;
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=useTransform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useTransform.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/hooks/useTransform.ts"],"names":[],"mappings":"AAGA;;;;GAIG;AACH,eAAO,MAAM,YAAY;;;;;;;;CAyCxB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { RefObject } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* useWheelZoom - 滚轮缩放 Hook
|
|
4
|
+
* @description 监听容器内的鼠标滚轮事件,向上滚动放大,向下滚动缩小
|
|
5
|
+
* @param containerRef - 容器 DOM 引用
|
|
6
|
+
* @param onZoomIn - 放大回调
|
|
7
|
+
* @param onZoomOut - 缩小回调
|
|
8
|
+
*/
|
|
9
|
+
export declare const useWheelZoom: (containerRef: RefObject<HTMLDivElement>, onZoomIn: () => void, onZoomOut: () => void) => void;
|
|
10
|
+
//# sourceMappingURL=useWheelZoom.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useWheelZoom.d.ts","sourceRoot":"","sources":["../../../../src/components/Image/hooks/useWheelZoom.ts"],"names":[],"mappings":"AAAA,OAAO,EAAa,SAAS,EAAE,MAAM,OAAO,CAAC;AAE7C;;;;;;GAMG;AACH,eAAO,MAAM,YAAY,GAAI,cAAc,SAAS,CAAC,cAAc,CAAC,EAAE,UAAU,MAAM,IAAI,EAAE,WAAW,MAAM,IAAI,SAuBhH,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as Image } from './Image';
|
|
2
|
+
import { default as ImageGroup } from './ImageGroup';
|
|
3
|
+
import { default as ImagePreview } from './ImagePreview';
|
|
4
|
+
import { ImageProps, ImageGroupProps, ImagePreviewProps, PreviewImageInfo } from './types';
|
|
5
|
+
type ImageComponent = typeof Image & {
|
|
6
|
+
PreviewGroup: typeof ImageGroup;
|
|
7
|
+
};
|
|
8
|
+
declare const ImageWithGroup: ImageComponent;
|
|
9
|
+
export { ImageGroup, ImagePreview };
|
|
10
|
+
export type { ImageProps, ImageGroupProps, ImagePreviewProps, PreviewImageInfo };
|
|
11
|
+
export default ImageWithGroup;
|
|
12
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Image/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,SAAS,CAAC;AAC5B,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,YAAY,MAAM,gBAAgB,CAAC;AAC1C,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhG,KAAK,cAAc,GAAG,OAAO,KAAK,GAAG;IACnC,YAAY,EAAE,OAAO,UAAU,CAAC;CACjC,CAAC;AAGF,QAAA,MAAM,cAAc,EAAY,cAAc,CAAC;AAG/C,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,CAAC;AACpC,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,CAAC;AACjF,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* 图片加载状态
|
|
4
|
+
*/
|
|
5
|
+
export type ImageStatus = 'loading' | 'loaded' | 'error';
|
|
6
|
+
/**
|
|
7
|
+
* Image 组件属性
|
|
8
|
+
*/
|
|
9
|
+
export interface ImageProps extends Omit<React.ImgHTMLAttributes<HTMLImageElement>, 'placeholder'> {
|
|
10
|
+
/**
|
|
11
|
+
* 图片地址
|
|
12
|
+
*/
|
|
13
|
+
src?: string;
|
|
14
|
+
/**
|
|
15
|
+
* 图片描述
|
|
16
|
+
*/
|
|
17
|
+
alt?: string;
|
|
18
|
+
/**
|
|
19
|
+
* 图片宽度
|
|
20
|
+
*/
|
|
21
|
+
width?: number | string;
|
|
22
|
+
/**
|
|
23
|
+
* 图片高度
|
|
24
|
+
*/
|
|
25
|
+
height?: number | string;
|
|
26
|
+
/**
|
|
27
|
+
* 自定义类名
|
|
28
|
+
*/
|
|
29
|
+
className?: string;
|
|
30
|
+
/**
|
|
31
|
+
* 自定义样式
|
|
32
|
+
*/
|
|
33
|
+
style?: React.CSSProperties;
|
|
34
|
+
/**
|
|
35
|
+
* 是否启用懒加载
|
|
36
|
+
* @default false
|
|
37
|
+
*/
|
|
38
|
+
lazy?: boolean;
|
|
39
|
+
/**
|
|
40
|
+
* 加载占位内容
|
|
41
|
+
*/
|
|
42
|
+
placeholder?: React.ReactNode;
|
|
43
|
+
/**
|
|
44
|
+
* 加载失败时的容错内容
|
|
45
|
+
*/
|
|
46
|
+
fallback?: React.ReactNode;
|
|
47
|
+
/**
|
|
48
|
+
* 是否开启预览
|
|
49
|
+
* @default true
|
|
50
|
+
*/
|
|
51
|
+
preview?: boolean;
|
|
52
|
+
/**
|
|
53
|
+
* 自定义预览图地址(默认使用 src)
|
|
54
|
+
*/
|
|
55
|
+
previewSrc?: string;
|
|
56
|
+
/**
|
|
57
|
+
* 图片加载完成回调
|
|
58
|
+
*/
|
|
59
|
+
onLoad?: (e: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
60
|
+
/**
|
|
61
|
+
* 图片加载失败回调
|
|
62
|
+
*/
|
|
63
|
+
onError?: (e: React.SyntheticEvent<HTMLImageElement>) => void;
|
|
64
|
+
}
|
|
65
|
+
/**
|
|
66
|
+
* 预览图片信息
|
|
67
|
+
*/
|
|
68
|
+
export interface PreviewImageInfo {
|
|
69
|
+
/**
|
|
70
|
+
* 图片唯一标识
|
|
71
|
+
*/
|
|
72
|
+
id: string;
|
|
73
|
+
/**
|
|
74
|
+
* 预览图地址
|
|
75
|
+
*/
|
|
76
|
+
src: string;
|
|
77
|
+
/**
|
|
78
|
+
* 图片描述
|
|
79
|
+
*/
|
|
80
|
+
alt?: string;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* ImagePreview 组件属性
|
|
84
|
+
*/
|
|
85
|
+
export interface ImagePreviewProps {
|
|
86
|
+
/**
|
|
87
|
+
* 是否显示预览
|
|
88
|
+
*/
|
|
89
|
+
visible: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* 预览图片列表
|
|
92
|
+
*/
|
|
93
|
+
images: PreviewImageInfo[];
|
|
94
|
+
/**
|
|
95
|
+
* 当前预览图片索引
|
|
96
|
+
*/
|
|
97
|
+
currentIndex: number;
|
|
98
|
+
/**
|
|
99
|
+
* 关闭预览回调
|
|
100
|
+
*/
|
|
101
|
+
onClose: () => void;
|
|
102
|
+
/**
|
|
103
|
+
* 切换图片回调
|
|
104
|
+
*/
|
|
105
|
+
onIndexChange?: (index: number) => void;
|
|
106
|
+
}
|
|
107
|
+
/**
|
|
108
|
+
* ImageGroup 组件属性
|
|
109
|
+
*/
|
|
110
|
+
export interface ImageGroupProps {
|
|
111
|
+
/**
|
|
112
|
+
* 子元素
|
|
113
|
+
*/
|
|
114
|
+
children?: React.ReactNode;
|
|
115
|
+
/**
|
|
116
|
+
* 自定义类名
|
|
117
|
+
*/
|
|
118
|
+
className?: string;
|
|
119
|
+
/**
|
|
120
|
+
* 自定义样式
|
|
121
|
+
*/
|
|
122
|
+
style?: React.CSSProperties;
|
|
123
|
+
/**
|
|
124
|
+
* 预览图片数组(优先级高于子组件收集的图片)
|
|
125
|
+
* 设置后点击任意子 Image 都会预览这个数组
|
|
126
|
+
*/
|
|
127
|
+
images?: (string | PreviewImageInfo)[];
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* ImageContext 上下文值
|
|
131
|
+
*/
|
|
132
|
+
export interface ImageContextValue {
|
|
133
|
+
/**
|
|
134
|
+
* 是否在 ImageGroup 内
|
|
135
|
+
*/
|
|
136
|
+
isGroup: boolean;
|
|
137
|
+
/**
|
|
138
|
+
* 注册图片到相册
|
|
139
|
+
*/
|
|
140
|
+
registerImage: (info: PreviewImageInfo) => void;
|
|
141
|
+
/**
|
|
142
|
+
* 取消注册图片
|
|
143
|
+
*/
|
|
144
|
+
unregisterImage: (id: string) => void;
|
|
145
|
+
/**
|
|
146
|
+
* 打开预览
|
|
147
|
+
*/
|
|
148
|
+
openPreview: (id: string) => void;
|
|
149
|
+
}
|
|
150
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
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AAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,MAAM,EAAE,gBAAgB,EAAE,CAAC;IAC3B;;OAEG;IACH,YAAY,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CACzC;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B;;;OAGG;IACH,MAAM,CAAC,EAAE,CAAC,MAAM,GAAG,gBAAgB,CAAC,EAAE,CAAC;CACxC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;IACjB;;OAEG;IACH,aAAa,EAAE,CAAC,IAAI,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAChD;;OAEG;IACH,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC;;OAEG;IACH,WAAW,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;CACnC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listbox.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Listbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"Listbox.d.ts","sourceRoot":"","sources":["../../../src/components/Select/Listbox.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAQ5C,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAqEnC,CAAC;AAEF,eAAe,OAAO,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { useSelectState } from './useSelectState';
|
|
2
2
|
import { useOptionSelection } from './useOptionSelection';
|
|
3
3
|
import { useSelectSearch } from './useSelectSearch';
|
|
4
|
-
import { useFloatingPosition } from './useFloatingPosition';
|
|
5
4
|
import { useSelect } from './useSelect';
|
|
6
|
-
export { useSelectState, useOptionSelection, useSelectSearch,
|
|
5
|
+
export { useSelectState, useOptionSelection, useSelectSearch, useSelect, };
|
|
7
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/Select/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAExC,OAAO,EAEL,cAAc,EACd,kBAAkB,EAClB,eAAe,EAGf,SAAS,GACV,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../../src/components/Tabs/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAGzC,QAAA,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC,SAAS,CA0C7B,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -26,4 +26,6 @@ export { default as Upload } from './Upload';
|
|
|
26
26
|
export type { UploadProps, UploadDraggerProps } from './Upload';
|
|
27
27
|
export { default as Tabs } from './Tabs';
|
|
28
28
|
export type { TabsProps } from './Tabs';
|
|
29
|
+
export { default as Image, ImageGroup, ImagePreview } from './Image';
|
|
30
|
+
export type { ImageProps, ImageGroupProps, ImagePreviewProps, PreviewImageInfo } from './Image';
|
|
29
31
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAGzD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,YAAY,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAGhD,OAAO,EAAE,GAAG,EAAE,MAAM,OAAO,CAAC;AAC5B,YAAY,EAAE,QAAQ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U,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGpE,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC9B,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGxC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,YAAY,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAGpD,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGhG,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,UAAU,CAAC;AAC7C,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAGhE,OAAO,EAAE,OAAO,IAAI,IAAI,EAAE,MAAM,QAAQ,CAAC;AACzC,YAAY,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAGxC,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AACrE,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC"}
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { useTagManager } from './useTagManager';
|
|
2
2
|
import { useInputValue } from './useInputValue';
|
|
3
|
-
|
|
3
|
+
import { useFloatingPosition } from './useFloatingPosition';
|
|
4
|
+
export { useTagManager, useInputValue, useFloatingPosition, };
|
|
4
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/hooks/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,OAAO,EAEL,aAAa,EAGb,aAAa,EAGb,mBAAmB,GACpB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface UseFloatingPositionProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
triggerRef?: React.RefObject<HTMLElement>;
|
|
5
|
+
onClickOutside?: () => void;
|
|
6
|
+
placement?: 'bottom-start' | 'bottom-end' | 'top-start' | 'top-end';
|
|
7
|
+
offsetDistance?: number;
|
|
8
|
+
shiftPadding?: number;
|
|
9
|
+
matchTriggerWidth?: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare const useFloatingPosition: ({ isOpen, triggerRef, onClickOutside, placement, offsetDistance, shiftPadding, matchTriggerWidth, }: UseFloatingPositionProps) => {
|
|
12
|
+
triggerRef: ((node: import('@floating-ui/react-dom').ReferenceType | null) => void) & ((node: import('@floating-ui/react').ReferenceType | null) => void);
|
|
13
|
+
floatingRef: ((node: HTMLElement | null) => void) & ((node: HTMLElement | null) => void);
|
|
14
|
+
floatingStyles: React.CSSProperties;
|
|
15
|
+
updatePosition: () => void;
|
|
16
|
+
getReferenceProps: (userProps?: React.HTMLProps<Element>) => Record<string, unknown>;
|
|
17
|
+
getFloatingProps: (userProps?: React.HTMLProps<HTMLElement>) => Record<string, unknown>;
|
|
18
|
+
};
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=useFloatingPosition.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useFloatingPosition.d.ts","sourceRoot":"","sources":["../../src/hooks/useFloatingPosition.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,wBAAwB;IAChC,MAAM,EAAE,OAAO,CAAC;IAChB,UAAU,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B,SAAS,CAAC,EAAE,cAAc,GAAG,YAAY,GAAG,WAAW,GAAG,SAAS,CAAC;IACpE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,OAAO,CAAC;CAC7B;AAED,eAAO,MAAM,mBAAmB,GAAI,qGAQjC,wBAAwB;;;;;;;CA+D1B,CAAC"}
|