@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.
Files changed (105) hide show
  1. package/dist/index.amd.js.map +1 -1
  2. package/dist/index.cjs.js.map +1 -1
  3. package/dist/index.esm.js.map +1 -1
  4. package/dist/index.iife.js.map +1 -1
  5. package/dist/index.system.js.map +1 -1
  6. package/dist/index.umd.js.map +1 -1
  7. package/package.json +50 -48
  8. package/src/Config.ts +3 -0
  9. package/src/Core.ts +45 -0
  10. package/src/Pops.ts +340 -0
  11. package/src/components/alert/index.css +45 -0
  12. package/src/components/alert/index.ts +216 -0
  13. package/src/components/alert/indexType.ts +30 -0
  14. package/src/components/confirm/index.css +45 -0
  15. package/src/components/confirm/index.ts +264 -0
  16. package/src/components/confirm/indexType.ts +17 -0
  17. package/src/components/drawer/index.css +47 -0
  18. package/src/components/drawer/index.ts +338 -0
  19. package/src/components/drawer/indexType.ts +53 -0
  20. package/src/components/folder/folderIcon.ts +28 -0
  21. package/src/components/folder/index.css +291 -0
  22. package/src/components/folder/index.ts +1111 -0
  23. package/src/components/folder/indexType.ts +87 -0
  24. package/src/components/iframe/index.css +90 -0
  25. package/src/components/iframe/index.ts +415 -0
  26. package/src/components/iframe/indexType.ts +144 -0
  27. package/src/components/loading/index.css +60 -0
  28. package/src/components/loading/index.ts +123 -0
  29. package/src/components/loading/indexType.ts +31 -0
  30. package/src/components/panel/buttonType.ts +60 -0
  31. package/src/components/panel/commonType.ts +50 -0
  32. package/src/components/panel/deepMenuType.ts +59 -0
  33. package/src/components/panel/formsType.ts +32 -0
  34. package/src/components/panel/index.css +754 -0
  35. package/src/components/panel/index.ts +2435 -0
  36. package/src/components/panel/indexType.ts +107 -0
  37. package/src/components/panel/inputType.ts +65 -0
  38. package/src/components/panel/ownType.ts +28 -0
  39. package/src/components/panel/selectType.ts +80 -0
  40. package/src/components/panel/sliderType.ts +59 -0
  41. package/src/components/panel/switchType.ts +43 -0
  42. package/src/components/panel/textareaType.ts +54 -0
  43. package/src/components/prompt/index.css +60 -0
  44. package/src/components/prompt/index.ts +293 -0
  45. package/src/components/prompt/indexType.ts +47 -0
  46. package/src/components/rightClickMenu/index.ts +729 -0
  47. package/src/components/rightClickMenu/indexType.ts +89 -0
  48. package/src/components/searchSuggestion/index.css +0 -0
  49. package/src/components/searchSuggestion/index.ts +656 -0
  50. package/src/components/searchSuggestion/indexType.ts +238 -0
  51. package/src/components/tooltip/index.css +171 -0
  52. package/src/components/tooltip/index.ts +358 -0
  53. package/src/components/tooltip/indexType.ts +95 -0
  54. package/src/css/animation.css +2240 -0
  55. package/src/css/button.css +290 -0
  56. package/src/css/common.css +24 -0
  57. package/src/css/index.css +135 -0
  58. package/src/css/ninePalaceGridPosition.css +50 -0
  59. package/src/css/scrollbar.css +18 -0
  60. package/src/handler/PopsElementHandler.ts +353 -0
  61. package/src/handler/PopsHandler.ts +659 -0
  62. package/src/svg/arrowLeft.svg +4 -0
  63. package/src/svg/arrowRight.svg +4 -0
  64. package/src/svg/chromeFilled.svg +14 -0
  65. package/src/svg/circleClose.svg +8 -0
  66. package/src/svg/close.svg +5 -0
  67. package/src/svg/cpu.svg +8 -0
  68. package/src/svg/delete.svg +5 -0
  69. package/src/svg/documentCopy.svg +5 -0
  70. package/src/svg/edit.svg +8 -0
  71. package/src/svg/eleme.svg +5 -0
  72. package/src/svg/elemePlus.svg +5 -0
  73. package/src/svg/headset.svg +5 -0
  74. package/src/svg/hide.svg +8 -0
  75. package/src/svg/keyboard.svg +8 -0
  76. package/src/svg/loading.svg +5 -0
  77. package/src/svg/max.svg +5 -0
  78. package/src/svg/min.svg +5 -0
  79. package/src/svg/mise.svg +5 -0
  80. package/src/svg/monitor.svg +5 -0
  81. package/src/svg/next.svg +5 -0
  82. package/src/svg/picture.svg +8 -0
  83. package/src/svg/prev.svg +5 -0
  84. package/src/svg/search.svg +5 -0
  85. package/src/svg/share.svg +5 -0
  86. package/src/svg/upload.svg +5 -0
  87. package/src/svg/videoPause.svg +5 -0
  88. package/src/svg/videoPlay.svg +5 -0
  89. package/src/svg/view.svg +5 -0
  90. package/src/types/PopsDOMUtilsEventType.d.ts +246 -0
  91. package/src/types/animation.d.ts +19 -0
  92. package/src/types/button.d.ts +226 -0
  93. package/src/types/components.d.ts +197 -0
  94. package/src/types/event.d.ts +62 -0
  95. package/src/types/global.d.ts +11 -0
  96. package/src/types/icon.d.ts +32 -0
  97. package/src/types/layer.d.ts +20 -0
  98. package/src/types/main.d.ts +136 -0
  99. package/src/types/mask.d.ts +35 -0
  100. package/src/types/position.d.ts +60 -0
  101. package/src/utils/AnyTouch.js +1394 -0
  102. package/src/utils/PopsDOMUtils.ts +2013 -0
  103. package/src/utils/PopsInstanceUtils.ts +685 -0
  104. package/src/utils/PopsMathUtils.ts +77 -0
  105. 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