@whitesev/pops 1.4.0 → 1.5.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/index.amd.js.map +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js.map +1 -1
- package/package.json +50 -48
- package/src/Config.ts +3 -0
- package/src/Core.ts +45 -0
- package/src/Pops.ts +340 -0
- package/src/components/alert/index.css +45 -0
- package/src/components/alert/index.ts +216 -0
- package/src/components/alert/indexType.ts +30 -0
- package/src/components/confirm/index.css +45 -0
- package/src/components/confirm/index.ts +264 -0
- package/src/components/confirm/indexType.ts +17 -0
- package/src/components/drawer/index.css +47 -0
- package/src/components/drawer/index.ts +338 -0
- package/src/components/drawer/indexType.ts +53 -0
- package/src/components/folder/folderIcon.ts +28 -0
- package/src/components/folder/index.css +291 -0
- package/src/components/folder/index.ts +1111 -0
- package/src/components/folder/indexType.ts +87 -0
- package/src/components/iframe/index.css +90 -0
- package/src/components/iframe/index.ts +415 -0
- package/src/components/iframe/indexType.ts +144 -0
- package/src/components/loading/index.css +60 -0
- package/src/components/loading/index.ts +123 -0
- package/src/components/loading/indexType.ts +31 -0
- package/src/components/panel/buttonType.ts +60 -0
- package/src/components/panel/commonType.ts +50 -0
- package/src/components/panel/deepMenuType.ts +59 -0
- package/src/components/panel/formsType.ts +32 -0
- package/src/components/panel/index.css +754 -0
- package/src/components/panel/index.ts +2435 -0
- package/src/components/panel/indexType.ts +107 -0
- package/src/components/panel/inputType.ts +65 -0
- package/src/components/panel/ownType.ts +28 -0
- package/src/components/panel/selectType.ts +80 -0
- package/src/components/panel/sliderType.ts +59 -0
- package/src/components/panel/switchType.ts +43 -0
- package/src/components/panel/textareaType.ts +54 -0
- package/src/components/prompt/index.css +60 -0
- package/src/components/prompt/index.ts +293 -0
- package/src/components/prompt/indexType.ts +47 -0
- package/src/components/rightClickMenu/index.ts +729 -0
- package/src/components/rightClickMenu/indexType.ts +89 -0
- package/src/components/searchSuggestion/index.css +0 -0
- package/src/components/searchSuggestion/index.ts +656 -0
- package/src/components/searchSuggestion/indexType.ts +238 -0
- package/src/components/tooltip/index.css +171 -0
- package/src/components/tooltip/index.ts +358 -0
- package/src/components/tooltip/indexType.ts +95 -0
- package/src/css/animation.css +2240 -0
- package/src/css/button.css +290 -0
- package/src/css/common.css +24 -0
- package/src/css/index.css +135 -0
- package/src/css/ninePalaceGridPosition.css +50 -0
- package/src/css/scrollbar.css +18 -0
- package/src/handler/PopsElementHandler.ts +353 -0
- package/src/handler/PopsHandler.ts +659 -0
- package/src/svg/arrowLeft.svg +4 -0
- package/src/svg/arrowRight.svg +4 -0
- package/src/svg/chromeFilled.svg +14 -0
- package/src/svg/circleClose.svg +8 -0
- package/src/svg/close.svg +5 -0
- package/src/svg/cpu.svg +8 -0
- package/src/svg/delete.svg +5 -0
- package/src/svg/documentCopy.svg +5 -0
- package/src/svg/edit.svg +8 -0
- package/src/svg/eleme.svg +5 -0
- package/src/svg/elemePlus.svg +5 -0
- package/src/svg/headset.svg +5 -0
- package/src/svg/hide.svg +8 -0
- package/src/svg/keyboard.svg +8 -0
- package/src/svg/loading.svg +5 -0
- package/src/svg/max.svg +5 -0
- package/src/svg/min.svg +5 -0
- package/src/svg/mise.svg +5 -0
- package/src/svg/monitor.svg +5 -0
- package/src/svg/next.svg +5 -0
- package/src/svg/picture.svg +8 -0
- package/src/svg/prev.svg +5 -0
- package/src/svg/search.svg +5 -0
- package/src/svg/share.svg +5 -0
- package/src/svg/upload.svg +5 -0
- package/src/svg/videoPause.svg +5 -0
- package/src/svg/videoPlay.svg +5 -0
- package/src/svg/view.svg +5 -0
- package/src/types/PopsDOMUtilsEventType.d.ts +246 -0
- package/src/types/animation.d.ts +19 -0
- package/src/types/button.d.ts +226 -0
- package/src/types/components.d.ts +197 -0
- package/src/types/event.d.ts +62 -0
- package/src/types/global.d.ts +11 -0
- package/src/types/icon.d.ts +32 -0
- package/src/types/layer.d.ts +20 -0
- package/src/types/main.d.ts +136 -0
- package/src/types/mask.d.ts +35 -0
- package/src/types/position.d.ts +60 -0
- package/src/utils/AnyTouch.js +1394 -0
- package/src/utils/PopsDOMUtils.ts +2013 -0
- package/src/utils/PopsInstanceUtils.ts +685 -0
- package/src/utils/PopsMathUtils.ts +77 -0
- package/src/utils/PopsUtils.ts +380 -0
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import type { PopsIcon } from "../../types/icon";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* pops.rightClickMenu的右键菜单配置
|
|
5
|
+
*/
|
|
6
|
+
export interface PopsRightClickMenuDataDetails {
|
|
7
|
+
/**
|
|
8
|
+
* svg图标
|
|
9
|
+
*/
|
|
10
|
+
icon: PopsIcon | string;
|
|
11
|
+
/**
|
|
12
|
+
* 图标是否旋转
|
|
13
|
+
*/
|
|
14
|
+
iconIsLoading: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* 文字
|
|
17
|
+
*/
|
|
18
|
+
text: string | (() => string);
|
|
19
|
+
/**
|
|
20
|
+
* 点击的回调函数
|
|
21
|
+
* @param clickEvent 点击菜单的click事件
|
|
22
|
+
* @param contextMenuEvent 触发的contextmenu事件
|
|
23
|
+
* @param liElement <li>元素
|
|
24
|
+
* @returns
|
|
25
|
+
* + true(默认) 关闭菜单
|
|
26
|
+
* + false 不关闭菜单
|
|
27
|
+
*
|
|
28
|
+
*/
|
|
29
|
+
callback?: (
|
|
30
|
+
clickEvent: PointerEvent,
|
|
31
|
+
contextMenuEvent: PointerEvent,
|
|
32
|
+
liElement: HTMLLIElement
|
|
33
|
+
) => boolean | void | Promise<boolean | void>;
|
|
34
|
+
/**
|
|
35
|
+
* 子项配置
|
|
36
|
+
*/
|
|
37
|
+
item?: PopsRightClickMenuDataDetails[] | null;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* pops.rightClickMenu
|
|
42
|
+
*/
|
|
43
|
+
export interface PopsRightClickMenuDetails {
|
|
44
|
+
/**
|
|
45
|
+
* 目标,默认为document.documentElement
|
|
46
|
+
*/
|
|
47
|
+
target?: HTMLElement | typeof globalThis | Window | EventTarget | Node;
|
|
48
|
+
/**
|
|
49
|
+
* 目标的子元素选择器,默认为空
|
|
50
|
+
*/
|
|
51
|
+
targetSelector?: string | null;
|
|
52
|
+
/**
|
|
53
|
+
* 右键菜单数据
|
|
54
|
+
*/
|
|
55
|
+
data: PopsRightClickMenuDataDetails[];
|
|
56
|
+
/**
|
|
57
|
+
* 自定义className,默认为空
|
|
58
|
+
*/
|
|
59
|
+
className?: string;
|
|
60
|
+
/**
|
|
61
|
+
* 是否是唯一的弹窗,默认false
|
|
62
|
+
*/
|
|
63
|
+
only?: boolean;
|
|
64
|
+
/**
|
|
65
|
+
* 是否启用动画,默认true
|
|
66
|
+
*/
|
|
67
|
+
isAnimation?: boolean;
|
|
68
|
+
/**
|
|
69
|
+
* 弹窗的显示层级,默认10000
|
|
70
|
+
*/
|
|
71
|
+
zIndex?: number;
|
|
72
|
+
/**
|
|
73
|
+
* 是否阻止默认contextmenu事件
|
|
74
|
+
*/
|
|
75
|
+
preventDefault?: boolean;
|
|
76
|
+
/**
|
|
77
|
+
* (可选)自定义style
|
|
78
|
+
*/
|
|
79
|
+
style?: string | null;
|
|
80
|
+
/**
|
|
81
|
+
* 在元素添加到页面前的事件
|
|
82
|
+
* @param $shadowRoot 根元素
|
|
83
|
+
* @param $shadowContainer 容器
|
|
84
|
+
*/
|
|
85
|
+
beforeAppendToPageCallBack?: (
|
|
86
|
+
$shadowRoot: ShadowRoot,
|
|
87
|
+
$shadowContainer: HTMLDivElement
|
|
88
|
+
) => void;
|
|
89
|
+
}
|
|
File without changes
|