@whitesev/pops 2.4.6 → 2.4.7
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 +578 -571
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +578 -571
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +578 -571
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +578 -571
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +578 -571
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +578 -571
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +252 -252
- package/dist/types/src/types/animation.d.ts +19 -19
- package/dist/types/src/types/button.d.ts +187 -187
- package/dist/types/src/types/components.d.ts +210 -210
- package/dist/types/src/types/event.d.ts +63 -63
- package/dist/types/src/types/global.d.ts +25 -25
- package/dist/types/src/types/icon.d.ts +32 -32
- package/dist/types/src/types/inst.d.ts +24 -24
- package/dist/types/src/types/main.d.ts +111 -111
- package/dist/types/src/types/mask.d.ts +49 -49
- package/dist/types/src/types/position.d.ts +60 -60
- package/index.ts +3 -0
- package/package.json +4 -2
- package/src/Pops.ts +206 -0
- package/src/PopsAnimation.ts +32 -0
- package/src/PopsCSS.ts +51 -0
- package/src/PopsCore.ts +64 -0
- package/src/PopsIcon.ts +95 -0
- package/src/PopsInst.ts +21 -0
- package/src/components/alert/config.ts +62 -0
- package/src/components/alert/index.css +0 -0
- package/src/components/alert/index.ts +163 -0
- package/src/components/alert/types/index.ts +23 -0
- package/src/components/confirm/config.ts +90 -0
- package/src/components/confirm/index.css +0 -0
- package/src/components/confirm/index.ts +166 -0
- package/src/components/confirm/types/index.ts +17 -0
- package/src/components/drawer/config.ts +89 -0
- package/src/components/drawer/index.css +37 -0
- package/src/components/drawer/index.ts +237 -0
- package/src/components/drawer/types/index.ts +61 -0
- package/src/components/folder/config.ts +147 -0
- package/src/components/folder/folderIcon.ts +28 -0
- package/src/components/folder/index.css +303 -0
- package/src/components/folder/index.ts +929 -0
- package/src/components/folder/types/index.ts +97 -0
- package/src/components/iframe/config.ts +60 -0
- package/src/components/iframe/index.css +76 -0
- package/src/components/iframe/index.ts +334 -0
- package/src/components/iframe/types/index.ts +139 -0
- package/src/components/loading/config.ts +29 -0
- package/src/components/loading/index.css +66 -0
- package/src/components/loading/index.ts +99 -0
- package/src/components/loading/types/index.ts +34 -0
- package/src/components/panel/config.ts +519 -0
- package/src/components/panel/handlerComponents.ts +2900 -0
- package/src/components/panel/index.css +1222 -0
- package/src/components/panel/index.ts +207 -0
- package/src/components/panel/types/components-button.ts +68 -0
- package/src/components/panel/types/components-common.ts +50 -0
- package/src/components/panel/types/components-deepMenu.ts +84 -0
- package/src/components/panel/types/components-forms.ts +44 -0
- package/src/components/panel/types/components-input.ts +78 -0
- package/src/components/panel/types/components-own.ts +30 -0
- package/src/components/panel/types/components-select.ts +93 -0
- package/src/components/panel/types/components-selectMultiple.ts +130 -0
- package/src/components/panel/types/components-slider.ts +77 -0
- package/src/components/panel/types/components-switch.ts +56 -0
- package/src/components/panel/types/components-textarea.ts +68 -0
- package/src/components/panel/types/index.ts +177 -0
- package/src/components/prompt/config.ts +94 -0
- package/src/components/prompt/index.css +34 -0
- package/src/components/prompt/index.ts +216 -0
- package/src/components/prompt/types/index.ts +55 -0
- package/src/components/rightClickMenu/config.ts +98 -0
- package/src/components/rightClickMenu/index.css +112 -0
- package/src/components/rightClickMenu/index.ts +602 -0
- package/src/components/rightClickMenu/types/index.ts +97 -0
- package/src/components/searchSuggestion/config.ts +56 -0
- package/src/components/searchSuggestion/index.ts +856 -0
- package/src/components/searchSuggestion/types/index.ts +239 -0
- package/src/components/tooltip/config.ts +34 -0
- package/src/components/tooltip/index.css +199 -0
- package/src/components/tooltip/index.ts +604 -0
- package/src/components/tooltip/types/index.ts +117 -0
- package/src/config/CommonCSSClassName.ts +17 -0
- package/src/config/GlobalConfig.ts +63 -0
- package/src/css/animation.css +987 -0
- package/src/css/button.css +551 -0
- package/src/css/common.css +48 -0
- package/src/css/index.css +253 -0
- package/src/css/ninePalaceGridPosition.css +50 -0
- package/src/css/scrollbar.css +22 -0
- package/src/handler/PopsElementHandler.ts +304 -0
- package/src/handler/PopsHandler.ts +589 -0
- package/src/svg/arrowLeft.svg +4 -0
- package/src/svg/arrowRight.svg +4 -0
- package/src/svg/chromeFilled.svg +11 -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 +252 -0
- package/src/types/animation.d.ts +19 -0
- package/src/types/button.d.ts +187 -0
- package/src/types/components.d.ts +210 -0
- package/src/types/event.d.ts +63 -0
- package/src/types/global.d.ts +25 -0
- package/src/types/icon.d.ts +32 -0
- package/src/types/inst.d.ts +24 -0
- package/src/types/main.d.ts +111 -0
- package/src/types/mask.d.ts +49 -0
- package/src/types/position.d.ts +60 -0
- package/src/utils/PopsDOMUtils.ts +2408 -0
- package/src/utils/PopsDOMUtilsEventsConfig.ts +4 -0
- package/src/utils/PopsInstanceUtils.ts +688 -0
- package/src/utils/PopsMathUtils.ts +71 -0
- package/src/utils/PopsSafeUtils.ts +22 -0
- package/src/utils/PopsUtils.ts +406 -0
package/src/svg/hide.svg
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M876.8 156.8c0-9.6-3.2-16-9.6-22.4-6.4-6.4-12.8-9.6-22.4-9.6-9.6 0-16 3.2-22.4 9.6L736 220.8c-64-32-137.6-51.2-224-60.8-160 16-288 73.6-377.6 176C44.8 438.4 0 496 0 512s48 73.6 134.4 176c22.4 25.6 44.8 48 73.6 67.2l-86.4 89.6c-6.4 6.4-9.6 12.8-9.6 22.4 0 9.6 3.2 16 9.6 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16-3.2 22.4-9.6l704-710.4c3.2-6.4 6.4-12.8 6.4-22.4Zm-646.4 528c-76.8-70.4-128-128-153.6-172.8 28.8-48 80-105.6 153.6-172.8C304 272 400 230.4 512 224c64 3.2 124.8 19.2 176 44.8l-54.4 54.4C598.4 300.8 560 288 512 288c-64 0-115.2 22.4-160 64s-64 96-64 160c0 48 12.8 89.6 35.2 124.8L256 707.2c-9.6-6.4-19.2-16-25.6-22.4Zm140.8-96c-12.8-22.4-19.2-48-19.2-76.8 0-44.8 16-83.2 48-112 32-28.8 67.2-48 112-48 28.8 0 54.4 6.4 73.6 19.2zM889.599 336c-12.8-16-28.8-28.8-41.6-41.6l-48 48c73.6 67.2 124.8 124.8 150.4 169.6-28.8 48-80 105.6-153.6 172.8-73.6 67.2-172.8 108.8-284.8 115.2-51.2-3.2-99.2-12.8-140.8-28.8l-48 48c57.6 22.4 118.4 38.4 188.8 44.8 160-16 288-73.6 377.6-176C979.199 585.6 1024 528 1024 512s-48.001-73.6-134.401-176Z"></path>
|
|
5
|
+
<path
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
d="M511.998 672c-12.8 0-25.6-3.2-38.4-6.4l-51.2 51.2c28.8 12.8 57.6 19.2 89.6 19.2 64 0 115.2-22.4 160-64 41.6-41.6 64-96 64-160 0-32-6.4-64-19.2-89.6l-51.2 51.2c3.2 12.8 6.4 25.6 6.4 38.4 0 44.8-16 83.2-48 112-32 28.8-67.2 48-112 48Z"></path>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg viewBox="0 0 1123 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
d="M1014.122186 1024H109.753483A109.753483 109.753483 0 0 1 0 914.246517V392.917471a109.753483 109.753483 0 0 1 109.753483-109.753484h904.368703a109.753483 109.753483 0 0 1 109.753484 109.753484v521.329046a109.753483 109.753483 0 0 1-109.753484 109.753483zM109.753483 370.966774a21.950697 21.950697 0 0 0-21.950696 21.950697v521.329046a21.950697 21.950697 0 0 0 21.950696 21.950696h904.368703a21.950697 21.950697 0 0 0 21.950697-21.950696V392.917471a21.950697 21.950697 0 0 0-21.950697-21.950697z"></path>
|
|
4
|
+
<path
|
|
5
|
+
d="M687.056806 891.198285H307.309753a43.901393 43.901393 0 0 1 0-87.802787h379.747053a43.901393 43.901393 0 0 1 0 87.802787zM175.605573 803.395498a43.901393 43.901393 0 1 0 43.901394 43.901394 43.901393 43.901393 0 0 0-43.901394-43.901394zM432.428725 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM561.937835 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM690.349411 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM818.760986 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM947.172562 414.868167a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM175.605573 546.572347a43.901393 43.901393 0 1 0 43.901394 43.901394 43.901393 43.901393 0 0 0-43.901394-43.901394zM304.017149 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM432.428725 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM561.937835 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM690.349411 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM818.760986 546.572347a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM818.760986 803.395498a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM175.605573 678.276527a43.901393 43.901393 0 1 0 43.901394 43.901394 43.901393 43.901393 0 0 0-43.901394-43.901394zM304.017149 678.276527a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM432.428725 678.276527a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM561.937835 678.276527a43.901393 43.901393 0 1 0 43.901393 43.901394 43.901393 43.901393 0 0 0-43.901393-43.901394zM948.270096 803.395498a43.901393 43.901393 0 1 0 43.901394 43.901394 43.901393 43.901393 0 0 0-43.901394-43.901394z"></path>
|
|
6
|
+
<path
|
|
7
|
+
d="M881.320472 766.079314H689.251876a43.901393 43.901393 0 0 1 0-87.802787h192.068596a21.950697 21.950697 0 0 0 21.950696-21.950696v-65.85209a43.901393 43.901393 0 0 1 87.802787 0v65.85209a109.753483 109.753483 0 0 1-109.753483 109.753483zM305.114684 502.670954H175.605573a43.901393 43.901393 0 0 1 0-87.802787h129.509111a43.901393 43.901393 0 0 1 0 87.802787zM563.03537 365.4791a43.901393 43.901393 0 0 1-43.901394-43.901394v-105.363344A109.753483 109.753483 0 0 1 628.88746 106.460879h61.461951a21.950697 21.950697 0 0 0 21.950696-21.950697V43.901393a43.901393 43.901393 0 0 1 87.802787 0v40.608789a109.753483 109.753483 0 0 1-109.753483 109.753484h-61.461951a21.950697 21.950697 0 0 0-21.950697 21.950696v105.363344a43.901393 43.901393 0 0 1-43.901393 43.901394z"></path>
|
|
8
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32zm0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32zm448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32zm-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32zM195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248zm452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248zM828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0zm-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0z"></path>
|
|
5
|
+
</svg>
|
package/src/svg/max.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64v.064zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64l-192 .192zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64l192-.192zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64v-.064z"></path>
|
|
5
|
+
</svg>
|
package/src/svg/min.svg
ADDED
package/src/svg/mise.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M885.333333 85.333333H330.410667a53.333333 53.333333 0 0 0-53.333334 53.333334v106.666666H138.666667A53.333333 53.333333 0 0 0 85.333333 298.666667v586.666666a53.333333 53.333333 0 0 0 53.333334 53.333334H725.333333a53.333333 53.333333 0 0 0 53.333334-53.333334V746.154667h106.666666c29.44 0 53.333333-23.893333 53.333334-53.333334V138.666667A53.333333 53.333333 0 0 0 885.333333 85.333333zM725.333333 692.821333v192.512H138.666667V298.666667H725.333333v394.154666z m157.866667 0H778.666667V298.666667a53.333333 53.333333 0 0 0-53.333334-53.333334H330.410667v-106.666666h554.922666l-2.133333 554.154666z"></path>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M544 768v128h192a32 32 0 1 1 0 64H288a32 32 0 1 1 0-64h192V768H192A128 128 0 0 1 64 640V256a128 128 0 0 1 128-128h640a128 128 0 0 1 128 128v384a128 128 0 0 1-128 128H544zM192 192a64 64 0 0 0-64 64v384a64 64 0 0 0 64 64h640a64 64 0 0 0 64-64V256a64 64 0 0 0-64-64H192z"></path>
|
|
5
|
+
</svg>
|
package/src/svg/next.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"></path>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M160 160v704h704V160H160zm-32-64h768a32 32 0 0 1 32 32v768a32 32 0 0 1-32 32H128a32 32 0 0 1-32-32V128a32 32 0 0 1 32-32z"></path>
|
|
5
|
+
<path
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
d="M384 288q64 0 64 64t-64 64q-64 0-64-64t64-64zM185.408 876.992l-50.816-38.912L350.72 556.032a96 96 0 0 1 134.592-17.856l1.856 1.472 122.88 99.136a32 32 0 0 0 44.992-4.864l216-269.888 49.92 39.936-215.808 269.824-.256.32a96 96 0 0 1-135.04 14.464l-122.88-99.072-.64-.512a32 32 0 0 0-44.8 5.952L185.408 876.992z"></path>
|
|
8
|
+
</svg>
|
package/src/svg/prev.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"></path>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="m679.872 348.8-301.76 188.608a127.808 127.808 0 0 1 5.12 52.16l279.936 104.96a128 128 0 1 1-22.464 59.904l-279.872-104.96a128 128 0 1 1-16.64-166.272l301.696-188.608a128 128 0 1 1 33.92 54.272z"></path>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M160 832h704a32 32 0 1 1 0 64H160a32 32 0 1 1 0-64zm384-578.304V704h-64V247.296L237.248 490.048 192 444.8 508.8 128l316.8 316.8-45.312 45.248L544 253.696z"></path>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768zm-96-544q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32zm192 0q32 0 32 32v256q0 32-32 32t-32-32V384q0-32 32-32z"></path>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896zm0 832a384 384 0 0 0 0-768 384 384 0 0 0 0 768zm-48-247.616L668.608 512 464 375.616v272.768zm10.624-342.656 249.472 166.336a48 48 0 0 1 0 79.872L474.624 718.272A48 48 0 0 1 400 678.336V345.6a48 48 0 0 1 74.624-39.936z"></path>
|
|
5
|
+
</svg>
|
package/src/svg/view.svg
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
2
|
+
<path
|
|
3
|
+
fill="currentColor"
|
|
4
|
+
d="M512 160c320 0 512 352 512 352S832 864 512 864 0 512 0 512s192-352 512-352m0 64c-225.28 0-384.128 208.064-436.8 288 52.608 79.872 211.456 288 436.8 288 225.28 0 384.128-208.064 436.8-288-52.608-79.872-211.456-288-436.8-288zm0 64a224 224 0 1 1 0 448 224 224 0 0 1 0-448m0 64a160.192 160.192 0 0 0-160 160c0 88.192 71.744 160 160 160s160-71.808 160-160-71.744-160-160-160"></path>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
export type PopsDOMUtilsEventObject<T extends Node> = Event & {
|
|
2
|
+
target: T;
|
|
3
|
+
};
|
|
4
|
+
|
|
5
|
+
export type PopsDOMUtilsCreateElementAttributesMap = {
|
|
6
|
+
style?: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
class?: string;
|
|
9
|
+
"data-"?: string;
|
|
10
|
+
type?: string;
|
|
11
|
+
[key: string]: any;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* 鼠标事件
|
|
15
|
+
* + https://blog.csdn.net/weixin_68658847/article/details/126939879
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
export interface PopsDOMUtils_MouseEvent {
|
|
19
|
+
click: MouseEvent | PointerEvent;
|
|
20
|
+
contextmenu: MouseEvent | PointerEvent;
|
|
21
|
+
dblclick: MouseEvent | PointerEvent;
|
|
22
|
+
mousedown: MouseEvent | PointerEvent;
|
|
23
|
+
mouseenter: MouseEvent | PointerEvent;
|
|
24
|
+
mouseleave: MouseEvent | PointerEvent;
|
|
25
|
+
mousemove: MouseEvent | PointerEvent;
|
|
26
|
+
mouseover: MouseEvent | PointerEvent;
|
|
27
|
+
mouseout: MouseEvent | PointerEvent;
|
|
28
|
+
mouseup: MouseEvent | PointerEvent;
|
|
29
|
+
hover: MouseEvent;
|
|
30
|
+
}
|
|
31
|
+
export type PopsDOMUtils_MouseEventType = keyof PopsDOMUtils_MouseEvent;
|
|
32
|
+
/**
|
|
33
|
+
* 鼠标事件
|
|
34
|
+
*/
|
|
35
|
+
export interface PopsDOMUtils_KeyboardEvent {
|
|
36
|
+
keydown: KeyboardEvent;
|
|
37
|
+
keypress: KeyboardEvent;
|
|
38
|
+
keyup: KeyboardEvent;
|
|
39
|
+
}
|
|
40
|
+
export type PopsDOMUtils_KeyboardEventType = keyof PopsDOMUtils_KeyboardEvent;
|
|
41
|
+
/**
|
|
42
|
+
* 框架/对象事件
|
|
43
|
+
*/
|
|
44
|
+
export interface PopsDOMUtils_Frame_Object_Event {
|
|
45
|
+
abort: Event;
|
|
46
|
+
beforeunload: Event;
|
|
47
|
+
error: Event;
|
|
48
|
+
hashchange: Event;
|
|
49
|
+
load: Event;
|
|
50
|
+
pageshow: Event;
|
|
51
|
+
pagehide: Event;
|
|
52
|
+
resize: Event;
|
|
53
|
+
scroll: Event;
|
|
54
|
+
unload: Event;
|
|
55
|
+
}
|
|
56
|
+
export type PopsDOMUtils_Frame_Object_EventType = keyof PopsDOMUtils_Frame_Object_Event;
|
|
57
|
+
/**
|
|
58
|
+
* 表单事件
|
|
59
|
+
*/
|
|
60
|
+
export interface PopsDOMUtils_FormEvent {
|
|
61
|
+
blur: Event;
|
|
62
|
+
change: Event;
|
|
63
|
+
focus: Event;
|
|
64
|
+
focusin: Event;
|
|
65
|
+
focusout: Event;
|
|
66
|
+
input: Event;
|
|
67
|
+
reset: Event;
|
|
68
|
+
search: Event;
|
|
69
|
+
}
|
|
70
|
+
export type PopsDOMUtils_FormEventType = keyof PopsDOMUtils_FormEvent;
|
|
71
|
+
|
|
72
|
+
/**
|
|
73
|
+
* 剪贴板事件
|
|
74
|
+
*/
|
|
75
|
+
export interface PopsDOMUtils_ClipboardEvent {
|
|
76
|
+
copy: ClipboardEvent;
|
|
77
|
+
cut: ClipboardEvent;
|
|
78
|
+
paste: ClipboardEvent;
|
|
79
|
+
}
|
|
80
|
+
export type PopsDOMUtils_ClipboardEventType = keyof PopsDOMUtils_ClipboardEvent;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* 打印事件
|
|
84
|
+
*/
|
|
85
|
+
export interface PopsDOMUtils_PrintEvent {
|
|
86
|
+
afterprint: Event;
|
|
87
|
+
beforeprint: Event;
|
|
88
|
+
}
|
|
89
|
+
export type PopsDOMUtils_PrintEventType = keyof PopsDOMUtils_PrintEvent;
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 拖动事件
|
|
93
|
+
*/
|
|
94
|
+
export interface PopsDOMUtils_DragEvent {
|
|
95
|
+
drag: DragEvent;
|
|
96
|
+
dragend: DragEvent;
|
|
97
|
+
dragenter: DragEvent;
|
|
98
|
+
dragleave: DragEvent;
|
|
99
|
+
dragover: DragEvent;
|
|
100
|
+
dragstart: DragEvent;
|
|
101
|
+
drop: DragEvent;
|
|
102
|
+
}
|
|
103
|
+
export type PopsDOMUtils_DragEventType = keyof PopsDOMUtils_DragEvent;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* 多媒体(Media)事件
|
|
107
|
+
*/
|
|
108
|
+
export interface PopsDOMUtils_MediaEvent {
|
|
109
|
+
abort: Event;
|
|
110
|
+
canplay: Event;
|
|
111
|
+
canplaythrough: Event;
|
|
112
|
+
durationchange: Event;
|
|
113
|
+
emptied: Event;
|
|
114
|
+
ended: Event;
|
|
115
|
+
error: Event;
|
|
116
|
+
loadeddata: Event;
|
|
117
|
+
loadedmetadata: Event;
|
|
118
|
+
loadstart: Event;
|
|
119
|
+
pause: Event;
|
|
120
|
+
play: Event;
|
|
121
|
+
playing: Event;
|
|
122
|
+
progress: Event;
|
|
123
|
+
ratechange: Event;
|
|
124
|
+
seeked: Event;
|
|
125
|
+
seeking: Event;
|
|
126
|
+
stalled: Event;
|
|
127
|
+
suspend: Event;
|
|
128
|
+
timeupdate: Event;
|
|
129
|
+
volumechange: Event;
|
|
130
|
+
waiting: Event;
|
|
131
|
+
}
|
|
132
|
+
export type PopsDOMUtils_MediaEventType = keyof PopsDOMUtils_MediaEvent;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* 动画事件
|
|
136
|
+
*/
|
|
137
|
+
export interface PopsDOMUtils_AnimationEvent {
|
|
138
|
+
animationend: AnimationEvent;
|
|
139
|
+
animationiteration: AnimationEvent;
|
|
140
|
+
animationstart: AnimationEvent;
|
|
141
|
+
}
|
|
142
|
+
export type PopsDOMUtils_AnimationEventType = keyof PopsDOMUtils_AnimationEvent;
|
|
143
|
+
|
|
144
|
+
/**
|
|
145
|
+
* 过渡事件
|
|
146
|
+
*/
|
|
147
|
+
export interface PopsDOMUtils_TransitionEvent {
|
|
148
|
+
transitionend: TransitionEvent;
|
|
149
|
+
}
|
|
150
|
+
export type PopsDOMUtils_TransitionEventType = keyof PopsDOMUtils_TransitionEvent;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* 触摸事件
|
|
154
|
+
*/
|
|
155
|
+
export interface PopsDOMUtils_TouchEvent {
|
|
156
|
+
touchstart: TouchEvent;
|
|
157
|
+
touchmove: TouchEvent;
|
|
158
|
+
touchend: TouchEvent;
|
|
159
|
+
touchcancel: TouchEvent;
|
|
160
|
+
touchenter: TouchEvent;
|
|
161
|
+
touchleave: TouchEvent;
|
|
162
|
+
}
|
|
163
|
+
export type PopsDOMUtils_TouchEventType = keyof PopsDOMUtils_TouchEvent;
|
|
164
|
+
/**
|
|
165
|
+
* 其它事件
|
|
166
|
+
*/
|
|
167
|
+
export interface PopsDOMUtils_OtherEvent {
|
|
168
|
+
message: Event;
|
|
169
|
+
online: Event;
|
|
170
|
+
offline: Event;
|
|
171
|
+
popstate: Event;
|
|
172
|
+
show: Event;
|
|
173
|
+
storage: Event;
|
|
174
|
+
toggle: Event;
|
|
175
|
+
wheel: Event;
|
|
176
|
+
propertychange: Event;
|
|
177
|
+
fullscreenchange: Event;
|
|
178
|
+
DOMContentLoaded: Event;
|
|
179
|
+
}
|
|
180
|
+
export type PopsDOMUtils_OtherEventType = keyof PopsDOMUtils_OtherEvent;
|
|
181
|
+
|
|
182
|
+
/**
|
|
183
|
+
* 全部事件
|
|
184
|
+
*/
|
|
185
|
+
export type PopsDOMUtils_Event = PopsDOMUtils_MouseEvent &
|
|
186
|
+
PopsDOMUtils_KeyboardEvent &
|
|
187
|
+
PopsDOMUtils_Frame_Object_Event &
|
|
188
|
+
PopsDOMUtils_FormEvent &
|
|
189
|
+
PopsDOMUtils_ClipboardEvent &
|
|
190
|
+
PopsDOMUtils_PrintEvent &
|
|
191
|
+
PopsDOMUtils_DragEvent &
|
|
192
|
+
PopsDOMUtils_MediaEvent &
|
|
193
|
+
PopsDOMUtils_AnimationEvent &
|
|
194
|
+
PopsDOMUtils_TransitionEvent &
|
|
195
|
+
PopsDOMUtils_TouchEvent &
|
|
196
|
+
PopsDOMUtils_OtherEvent;
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* 事件类型
|
|
200
|
+
*/
|
|
201
|
+
export type PopsDOMUtils_EventType = keyof PopsDOMUtils_Event;
|
|
202
|
+
|
|
203
|
+
/**
|
|
204
|
+
* 元素上的events属性
|
|
205
|
+
*/
|
|
206
|
+
export declare interface PopsDOMUtilsEventListenerOptionsAttribute {
|
|
207
|
+
/**
|
|
208
|
+
* DOMUtils的ownCallBack,元素上的监听事件就是它,移除事件时也需要传入这个函数
|
|
209
|
+
*/
|
|
210
|
+
callback: (event: Event) => void;
|
|
211
|
+
/**
|
|
212
|
+
* 属性配置
|
|
213
|
+
*/
|
|
214
|
+
option: PopsDOMUtilsEventListenerOption;
|
|
215
|
+
/**
|
|
216
|
+
* 用户添加的事件
|
|
217
|
+
*/
|
|
218
|
+
originCallBack: (event: Event, selectorTarget?: HTMLElement) => void;
|
|
219
|
+
/**
|
|
220
|
+
* 子元素选择器
|
|
221
|
+
*/
|
|
222
|
+
selector?: string[];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
export type PopsDOMUtilsElementEventType =
|
|
226
|
+
| HTMLElement
|
|
227
|
+
| string
|
|
228
|
+
| NodeList
|
|
229
|
+
| (HTMLElement | Window | Document | Element | typeof globalThis)[]
|
|
230
|
+
| Window
|
|
231
|
+
| Document
|
|
232
|
+
| Element
|
|
233
|
+
| null
|
|
234
|
+
| typeof globalThis
|
|
235
|
+
| ShadowRoot
|
|
236
|
+
| EventTarget
|
|
237
|
+
| ChildNode
|
|
238
|
+
| Node;
|
|
239
|
+
|
|
240
|
+
export type ParseHTMLReturnType<T1, T2> = T1 extends true ? (T2 extends true ? Document : HTMLElement) : HTMLElement;
|
|
241
|
+
|
|
242
|
+
/**
|
|
243
|
+
* 事件的额外配置
|
|
244
|
+
*/
|
|
245
|
+
export declare type PopsDOMUtilsEventListenerOption = AddEventListenerOptions & {
|
|
246
|
+
/**
|
|
247
|
+
* 是否使用 event.composedPath() 来代替 event.target
|
|
248
|
+
*
|
|
249
|
+
* 一般用于设置了selector参数
|
|
250
|
+
*/
|
|
251
|
+
isComposedPath?: boolean;
|
|
252
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 动画
|
|
3
|
+
*/
|
|
4
|
+
export type PopsAnimation =
|
|
5
|
+
| "pops-anim-spread"
|
|
6
|
+
| "pops-anim-shake"
|
|
7
|
+
| "pops-anim-rolling-left"
|
|
8
|
+
| "pops-anim-rolling-right"
|
|
9
|
+
| "pops-anim-slide-top"
|
|
10
|
+
| "pops-anim-slide-bottom"
|
|
11
|
+
| "pops-anim-slide-left"
|
|
12
|
+
| "pops-anim-slide-right"
|
|
13
|
+
| "pops-anim-fadein"
|
|
14
|
+
| "pops-anim-fadein-zoom"
|
|
15
|
+
| "pops-anim-fadein-alert"
|
|
16
|
+
| "pops-anim-don"
|
|
17
|
+
| "pops-anim-roll"
|
|
18
|
+
| "pops-anim-sandra"
|
|
19
|
+
| "pops-anim-gather";
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
import type { PopsEventDetails, PopsHandlerEventDetails } from "./event";
|
|
2
|
+
import type { PopsIconType } from "./icon";
|
|
3
|
+
import type { PopsType } from "./main";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 按钮类型
|
|
7
|
+
*/
|
|
8
|
+
export type PopsButtonType = "close" | "ok" | "cancel" | "other";
|
|
9
|
+
/**
|
|
10
|
+
* 按钮样式类型
|
|
11
|
+
*/
|
|
12
|
+
export type PopsButtonStyleType =
|
|
13
|
+
| "default"
|
|
14
|
+
| "primary"
|
|
15
|
+
| "xiaomi-primary"
|
|
16
|
+
| "success"
|
|
17
|
+
| "info"
|
|
18
|
+
| "warning"
|
|
19
|
+
| "danger"
|
|
20
|
+
| "violet";
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 按钮大小
|
|
24
|
+
*/
|
|
25
|
+
export type PopsButtonSize = "large" | "small";
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 按钮的点击回调参数event
|
|
29
|
+
*/
|
|
30
|
+
export interface PopsBtnCallBackEvent {
|
|
31
|
+
/**
|
|
32
|
+
* 元素
|
|
33
|
+
*/
|
|
34
|
+
element: HTMLElement;
|
|
35
|
+
/**
|
|
36
|
+
* 动画元素(包裹着弹窗元素)
|
|
37
|
+
*/
|
|
38
|
+
animElement: HTMLElement;
|
|
39
|
+
/**
|
|
40
|
+
* 弹窗元素
|
|
41
|
+
*/
|
|
42
|
+
popsElement: HTMLElement;
|
|
43
|
+
/**
|
|
44
|
+
* 遮罩层元素
|
|
45
|
+
*/
|
|
46
|
+
maskElement: HTMLElement | undefined;
|
|
47
|
+
/**
|
|
48
|
+
* 按钮调用类型
|
|
49
|
+
*/
|
|
50
|
+
type: PopsButtonType;
|
|
51
|
+
/**
|
|
52
|
+
* 调用的方法
|
|
53
|
+
*/
|
|
54
|
+
mode: PopsType;
|
|
55
|
+
/**
|
|
56
|
+
* 唯一id
|
|
57
|
+
*/
|
|
58
|
+
guid: string;
|
|
59
|
+
/**
|
|
60
|
+
* 关闭弹窗
|
|
61
|
+
*/
|
|
62
|
+
close(): void;
|
|
63
|
+
/**
|
|
64
|
+
* 隐藏弹窗
|
|
65
|
+
*/
|
|
66
|
+
hide(): void;
|
|
67
|
+
/**
|
|
68
|
+
* 显示弹窗
|
|
69
|
+
*/
|
|
70
|
+
show(): void;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 按钮配置
|
|
75
|
+
*/
|
|
76
|
+
export interface PopsButtonDetails<T = object> {
|
|
77
|
+
/**
|
|
78
|
+
* 是否启用按钮
|
|
79
|
+
*/
|
|
80
|
+
enable: boolean;
|
|
81
|
+
/**
|
|
82
|
+
* 图标按钮,如果名字为内置的,则使用内置的,否则为自定义的svg
|
|
83
|
+
*/
|
|
84
|
+
icon: PopsIconType;
|
|
85
|
+
/**
|
|
86
|
+
* 图标按钮是否放在右边
|
|
87
|
+
*/
|
|
88
|
+
rightIcon: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* 图标按钮是否是旋转360°
|
|
91
|
+
* @default false
|
|
92
|
+
*/
|
|
93
|
+
iconIsLoading: boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 按钮尺寸大小
|
|
96
|
+
* @default ""
|
|
97
|
+
*/
|
|
98
|
+
size: PopsButtonSize | "";
|
|
99
|
+
/**
|
|
100
|
+
* 按钮样式类型
|
|
101
|
+
* @default "default"
|
|
102
|
+
*/
|
|
103
|
+
type: PopsButtonStyleType;
|
|
104
|
+
/**
|
|
105
|
+
* 按钮文字,默认为空
|
|
106
|
+
*/
|
|
107
|
+
text: string;
|
|
108
|
+
/**
|
|
109
|
+
* 按钮点击的回调
|
|
110
|
+
*
|
|
111
|
+
* 如果传入该值,那么将不会自动关闭弹窗
|
|
112
|
+
*/
|
|
113
|
+
callback(eventDetails: PopsHandlerEventDetails & T, event: PointerEvent | MouseEvent): void;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* 按钮配置(匹配任意类型)
|
|
118
|
+
*/
|
|
119
|
+
export type PopsButtonDetailsAnyType<T = object> = Omit<PopsButtonDetails<T>, "type"> & {
|
|
120
|
+
/**
|
|
121
|
+
* 按钮样式类型
|
|
122
|
+
* @default "default"
|
|
123
|
+
*/
|
|
124
|
+
type: string;
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
/** prompt的点击回调 */
|
|
128
|
+
export interface PopsPromptButtonDetails extends PopsButtonDetails {
|
|
129
|
+
callback(
|
|
130
|
+
eventDetails: PopsHandlerEventDetails & {
|
|
131
|
+
text: string;
|
|
132
|
+
},
|
|
133
|
+
event: PointerEvent | MouseEvent
|
|
134
|
+
): void;
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* 右上角关闭按钮点击回调的配置
|
|
138
|
+
*/
|
|
139
|
+
export interface PopsHeaderCloseButtonClickCallBackEvent {
|
|
140
|
+
/**
|
|
141
|
+
* 动画元素(包裹着弹窗元素)
|
|
142
|
+
*/
|
|
143
|
+
animElement: HTMLElement;
|
|
144
|
+
/**
|
|
145
|
+
* 遮罩层元素,如果未设置,那么不存在
|
|
146
|
+
*/
|
|
147
|
+
maskElement?: HTMLElement;
|
|
148
|
+
/**
|
|
149
|
+
* 按钮调用类型
|
|
150
|
+
*/
|
|
151
|
+
type: string;
|
|
152
|
+
/**
|
|
153
|
+
* 唯一id
|
|
154
|
+
*/
|
|
155
|
+
guid: string;
|
|
156
|
+
/**
|
|
157
|
+
* 关闭弹窗
|
|
158
|
+
*/
|
|
159
|
+
close(): void;
|
|
160
|
+
/**
|
|
161
|
+
* 隐藏弹窗
|
|
162
|
+
*/
|
|
163
|
+
hide(): void;
|
|
164
|
+
/**
|
|
165
|
+
* 显示弹窗
|
|
166
|
+
*/
|
|
167
|
+
show(): void;
|
|
168
|
+
/**
|
|
169
|
+
* 输入的内容
|
|
170
|
+
*/
|
|
171
|
+
text: string;
|
|
172
|
+
}
|
|
173
|
+
/**
|
|
174
|
+
* 顶部关闭按钮配置
|
|
175
|
+
*/
|
|
176
|
+
export interface PopsHeaderCloseButtonDetails {
|
|
177
|
+
/**
|
|
178
|
+
* 是否启用按钮
|
|
179
|
+
*/
|
|
180
|
+
enable?: boolean;
|
|
181
|
+
/**
|
|
182
|
+
* 按钮点击的回调
|
|
183
|
+
*
|
|
184
|
+
* 如果传入该值,那么将不会自动关闭弹窗
|
|
185
|
+
*/
|
|
186
|
+
callback?: (details: PopsEventDetails, event: PointerEvent | MouseEvent) => void;
|
|
187
|
+
}
|