@whitesev/pops 2.1.4 → 2.1.6

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 (142) hide show
  1. package/dist/index.amd.js +172 -112
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +172 -112
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +172 -112
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +172 -112
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +172 -112
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +172 -112
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/GlobalConfig.d.ts +7 -2
  14. package/dist/types/src/Pops.d.ts +52 -34
  15. package/dist/types/src/{Core.d.ts → PopsCore.d.ts} +4 -3
  16. package/dist/types/src/PopsIcon.d.ts +30 -2
  17. package/dist/types/src/PopsLayer.d.ts +3 -1
  18. package/dist/types/src/components/alert/config.d.ts +1 -1
  19. package/dist/types/src/components/alert/index.d.ts +1 -1
  20. package/dist/types/src/components/alert/{indexType.d.ts → types/index.d.ts} +2 -2
  21. package/dist/types/src/components/confirm/config.d.ts +1 -1
  22. package/dist/types/src/components/confirm/index.d.ts +1 -1
  23. package/dist/types/src/components/confirm/{indexType.d.ts → types/index.d.ts} +1 -1
  24. package/dist/types/src/components/drawer/config.d.ts +1 -1
  25. package/dist/types/src/components/drawer/index.d.ts +1 -1
  26. package/dist/types/src/components/drawer/{indexType.d.ts → types/index.d.ts} +1 -1
  27. package/dist/types/src/components/folder/config.d.ts +1 -1
  28. package/dist/types/src/components/folder/index.d.ts +1 -1
  29. package/dist/types/src/components/folder/{indexType.d.ts → types/index.d.ts} +1 -1
  30. package/dist/types/src/components/iframe/config.d.ts +1 -1
  31. package/dist/types/src/components/iframe/index.d.ts +1 -1
  32. package/dist/types/src/components/iframe/{indexType.d.ts → types/index.d.ts} +2 -2
  33. package/dist/types/src/components/loading/config.d.ts +1 -1
  34. package/dist/types/src/components/loading/index.d.ts +1 -1
  35. package/dist/types/src/components/loading/{indexType.d.ts → types/index.d.ts} +1 -1
  36. package/dist/types/src/components/panel/config.d.ts +1 -1
  37. package/dist/types/src/components/panel/{PanelHandleContentDetails.d.ts → handlerComponents.d.ts} +16 -13
  38. package/dist/types/src/components/panel/index.d.ts +1 -1
  39. package/dist/types/src/components/panel/{buttonType.d.ts → types/components-button.d.ts} +3 -3
  40. package/dist/types/src/components/panel/{commonType.d.ts → types/components-common.d.ts} +2 -2
  41. package/dist/types/src/components/panel/{deepMenuType.d.ts → types/components-deepMenu.d.ts} +3 -3
  42. package/dist/types/src/components/panel/{formsType.d.ts → types/components-forms.d.ts} +2 -2
  43. package/dist/types/src/components/panel/{inputType.d.ts → types/components-input.d.ts} +1 -1
  44. package/dist/types/src/components/panel/{ownType.d.ts → types/components-own.d.ts} +1 -1
  45. package/dist/types/src/components/panel/{selectType.d.ts → types/components-select.d.ts} +3 -3
  46. package/dist/types/src/components/panel/{selectMultipleType.d.ts → types/components-selectMultiple.d.ts} +2 -2
  47. package/dist/types/src/components/panel/{sliderType.d.ts → types/components-slider.d.ts} +1 -1
  48. package/dist/types/src/components/panel/{switchType.d.ts → types/components-switch.d.ts} +1 -1
  49. package/dist/types/src/components/panel/{textareaType.d.ts → types/components-textarea.d.ts} +1 -1
  50. package/dist/types/src/components/panel/{indexType.d.ts → types/index.d.ts} +12 -12
  51. package/dist/types/src/components/prompt/config.d.ts +1 -1
  52. package/dist/types/src/components/prompt/index.d.ts +1 -1
  53. package/dist/types/src/components/prompt/{indexType.d.ts → types/index.d.ts} +1 -1
  54. package/dist/types/src/components/rightClickMenu/config.d.ts +1 -1
  55. package/dist/types/src/components/rightClickMenu/index.d.ts +2 -2
  56. package/dist/types/src/components/rightClickMenu/{indexType.d.ts → types/index.d.ts} +2 -2
  57. package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
  58. package/dist/types/src/components/searchSuggestion/index.d.ts +2 -2
  59. package/dist/types/src/components/searchSuggestion/{indexType.d.ts → types/index.d.ts} +1 -1
  60. package/dist/types/src/components/tooltip/config.d.ts +1 -1
  61. package/dist/types/src/components/tooltip/index.d.ts +2 -2
  62. package/dist/types/src/components/tooltip/{indexType.d.ts → types/index.d.ts} +1 -1
  63. package/dist/types/src/handler/PopsHandler.d.ts +8 -8
  64. package/dist/types/src/types/button.d.ts +5 -39
  65. package/dist/types/src/types/event.d.ts +1 -1
  66. package/dist/types/src/types/main.d.ts +18 -18
  67. package/dist/types/src/types/mask.d.ts +7 -7
  68. package/dist/types/src/{Config.d.ts → utils/PopsDOMUtilsEventsConfig.d.ts} +3 -0
  69. package/dist/types/src/utils/PopsInstanceUtils.d.ts +8 -8
  70. package/package.json +3 -2
  71. package/src/GlobalConfig.ts +6 -5
  72. package/src/Pops.ts +30 -17
  73. package/src/{Core.ts → PopsCore.ts} +13 -14
  74. package/src/PopsIcon.ts +34 -32
  75. package/src/PopsLayer.ts +8 -7
  76. package/src/components/alert/config.ts +1 -1
  77. package/src/components/alert/index.css +0 -47
  78. package/src/components/alert/index.ts +3 -3
  79. package/src/components/alert/{indexType.ts → types/index.ts} +2 -2
  80. package/src/components/confirm/config.ts +1 -1
  81. package/src/components/confirm/index.css +0 -47
  82. package/src/components/confirm/index.ts +5 -5
  83. package/src/components/confirm/{indexType.ts → types/index.ts} +1 -1
  84. package/src/components/drawer/config.ts +1 -1
  85. package/src/components/drawer/index.css +0 -17
  86. package/src/components/drawer/index.ts +3 -4
  87. package/src/components/drawer/{indexType.ts → types/index.ts} +1 -1
  88. package/src/components/folder/config.ts +24 -10
  89. package/src/components/folder/index.css +67 -62
  90. package/src/components/folder/index.ts +5 -5
  91. package/src/components/folder/{indexType.ts → types/index.ts} +1 -1
  92. package/src/components/iframe/config.ts +1 -1
  93. package/src/components/iframe/index.css +3 -33
  94. package/src/components/iframe/index.ts +9 -9
  95. package/src/components/iframe/{indexType.ts → types/index.ts} +2 -2
  96. package/src/components/loading/config.ts +1 -1
  97. package/src/components/loading/index.css +17 -12
  98. package/src/components/loading/index.ts +6 -6
  99. package/src/components/loading/{indexType.ts → types/index.ts} +1 -1
  100. package/src/components/panel/config.ts +1 -1
  101. package/src/components/panel/{PanelHandleContentDetails.ts → handlerComponents.ts} +29 -15
  102. package/src/components/panel/index.css +136 -63
  103. package/src/components/panel/index.ts +6 -6
  104. package/src/components/panel/{buttonType.ts → types/components-button.ts} +5 -4
  105. package/src/components/panel/{commonType.ts → types/components-common.ts} +2 -2
  106. package/src/components/panel/{deepMenuType.ts → types/components-deepMenu.ts} +3 -3
  107. package/src/components/panel/{formsType.ts → types/components-forms.ts} +2 -2
  108. package/src/components/panel/{inputType.ts → types/components-input.ts} +1 -1
  109. package/src/components/panel/{ownType.ts → types/components-own.ts} +1 -1
  110. package/src/components/panel/{selectType.ts → types/components-select.ts} +3 -3
  111. package/src/components/panel/{selectMultipleType.ts → types/components-selectMultiple.ts} +2 -2
  112. package/src/components/panel/{sliderType.ts → types/components-slider.ts} +1 -1
  113. package/src/components/panel/{switchType.ts → types/components-switch.ts} +1 -1
  114. package/src/components/panel/{textareaType.ts → types/components-textarea.ts} +1 -1
  115. package/src/components/panel/{indexType.ts → types/index.ts} +12 -12
  116. package/src/components/prompt/config.ts +1 -1
  117. package/src/components/prompt/index.css +23 -51
  118. package/src/components/prompt/index.ts +7 -7
  119. package/src/components/prompt/{indexType.ts → types/index.ts} +1 -1
  120. package/src/components/rightClickMenu/config.ts +1 -1
  121. package/src/components/rightClickMenu/index.css +14 -3
  122. package/src/components/rightClickMenu/index.ts +2 -2
  123. package/src/components/rightClickMenu/{indexType.ts → types/index.ts} +2 -2
  124. package/src/components/searchSuggestion/config.ts +1 -1
  125. package/src/components/searchSuggestion/index.ts +21 -6
  126. package/src/components/searchSuggestion/{indexType.ts → types/index.ts} +1 -1
  127. package/src/components/tooltip/config.ts +1 -1
  128. package/src/components/tooltip/index.css +39 -19
  129. package/src/components/tooltip/index.ts +1 -1
  130. package/src/components/tooltip/{indexType.ts → types/index.ts} +1 -1
  131. package/src/css/button.css +354 -98
  132. package/src/css/index.css +88 -16
  133. package/src/handler/PopsElementHandler.ts +5 -5
  134. package/src/handler/PopsHandler.ts +26 -26
  135. package/src/types/button.d.ts +5 -39
  136. package/src/types/event.d.ts +1 -1
  137. package/src/types/main.d.ts +18 -18
  138. package/src/types/mask.d.ts +7 -7
  139. package/src/utils/PopsDOMUtils.ts +2 -2
  140. package/src/{Config.ts → utils/PopsDOMUtilsEventsConfig.ts} +3 -0
  141. package/src/utils/PopsInstanceUtils.ts +12 -12
  142. package/src/utils/PopsUtils.ts +1 -1
@@ -1,47 +0,0 @@
1
- .pops[type-value] .pops-confirm-title {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- }
6
- .pops[type-value="confirm"] .pops-confirm-title {
7
- width: 100%;
8
- height: var(--container-title-height);
9
- border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
10
- }
11
- .pops[type-value="confirm"] .pops-confirm-title p[pops] {
12
- width: 100%;
13
- overflow: hidden;
14
- color: rgb(51, 51, 51);
15
- text-indent: 15px;
16
- text-overflow: ellipsis;
17
- white-space: nowrap;
18
- font-weight: 500;
19
- line-height: normal;
20
- }
21
- .pops[type-value="confirm"] .pops-confirm-content {
22
- width: 100%;
23
- /*height: calc(
24
- 100% - var(--container-title-height) - var(--container-bottom-btn-height)
25
- );*/
26
- flex: 1;
27
- overflow: auto;
28
- word-break: break-word;
29
- }
30
- .pops[type-value="confirm"] .pops-confirm-content p[pops] {
31
- padding: 5px 10px;
32
- color: rgb(51, 51, 51);
33
- text-indent: 15px;
34
- }
35
- .pops[type-value="confirm"] .pops-confirm-btn {
36
- /*position: absolute;
37
- bottom: 0;*/
38
- display: flex;
39
- padding: 10px 10px 10px 10px;
40
- width: 100%;
41
- height: var(--container-bottom-btn-height);
42
- max-height: var(--container-bottom-btn-height);
43
- line-height: normal;
44
- border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
45
- text-align: right;
46
- align-items: center;
47
- }
@@ -6,7 +6,7 @@ import { popsDOMUtils } from "../../utils/PopsDOMUtils";
6
6
  import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
7
7
  import { popsUtils } from "../../utils/PopsUtils";
8
8
  import { PopsConfirmConfig } from "./config";
9
- import type { PopsConfirmDetails } from "./indexType";
9
+ import type { PopsConfirmDetails } from "./types";
10
10
 
11
11
  export const PopsConfirm = {
12
12
  init(details: PopsConfirmDetails) {
@@ -48,14 +48,14 @@ export const PopsConfirm = {
48
48
  PopsType,
49
49
  config,
50
50
  /*html*/ `
51
- <div class="pops-confirm-title" style="text-align: ${
52
- config.title.position
53
- };${headerStyle}">${
51
+ <div class="pops-title pops-${PopsType}-title" style="text-align: ${
52
+ config.title.position
53
+ };${headerStyle}">${
54
54
  config.title.html
55
55
  ? config.title.text
56
56
  : `<p pops style="${headerPStyle}">${config.title.text}</p>`
57
57
  }${headerBtnHTML}</div>
58
- <div class="pops-confirm-content" style="${contentStyle}">${
58
+ <div class="pops-content pops-${PopsType}-content" style="${contentStyle}">${
59
59
  config.content.html
60
60
  ? config.content.text
61
61
  : `<p pops style="${contentPStyle}">${config.content.text}</p>`
@@ -4,7 +4,7 @@ import type {
4
4
  PopsDragConfig,
5
5
  PopsCommonConfig,
6
6
  PopsMoreButtonConfig,
7
- } from "../../types/components";
7
+ } from "../../../types/components";
8
8
 
9
9
  /**
10
10
  * pops.confirm
@@ -1,4 +1,4 @@
1
- import type { PopsDrawerDetails } from "./indexType";
1
+ import type { PopsDrawerDetails } from "./types";
2
2
 
3
3
  export const PopsDrawerConfig = (): DeepRequired<PopsDrawerDetails> => {
4
4
  return {
@@ -8,24 +8,7 @@
8
8
  overflow: hidden;
9
9
  transition: all 0.3s;
10
10
  }
11
- .pops[type-value] .pops-drawer-title {
12
- display: flex;
13
- align-items: center;
14
- justify-content: space-between;
15
- }
16
- .pops[type-value] .pops-drawer-title p[pops] {
17
- line-height: normal;
18
- align-content: center;
19
- }
20
11
 
21
- .pops-drawer-content {
22
- flex: 1;
23
- overflow: auto;
24
- }
25
- .pops[type-value="drawer"] .pops-drawer-btn {
26
- padding-top: 10px;
27
- padding-bottom: 10px;
28
- }
29
12
  .pops[type-value="drawer"][direction="top"] {
30
13
  width: 100%;
31
14
  left: 0;
@@ -5,7 +5,7 @@ import { PopsCSS } from "../../PopsCSS";
5
5
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
6
6
  import { popsUtils } from "../../utils/PopsUtils";
7
7
  import { PopsDrawerConfig } from "./config";
8
- import type { PopsDrawerDetails } from "./indexType";
8
+ import type { PopsDrawerDetails } from "./types";
9
9
 
10
10
  export const PopsDrawer = {
11
11
  init(details: PopsDrawerDetails) {
@@ -49,15 +49,14 @@ export const PopsDrawer = {
49
49
  /*html*/ `
50
50
  ${
51
51
  config.title.enable
52
- ? /*html*/ `
53
- <div class="pops-${PopsType}-title" style="${headerStyle}">${
52
+ ? /*html*/ `<div class="pops-title pops-${PopsType}-title" style="${headerStyle}">${
54
53
  config.title.html
55
54
  ? config.title.text
56
55
  : /*html*/ `<p pops style="width: 100%;text-align: ${config.title.position};${headerPStyle}">${config.title.text}</p>`
57
56
  }${headerBtnHTML}</div>`
58
57
  : ""
59
58
  }
60
- <div class="pops-${PopsType}-content" style="${contentStyle}">${
59
+ <div class="pops-content pops-${PopsType}-content" style="${contentStyle}">${
61
60
  config.content.html
62
61
  ? config.content.text
63
62
  : `<p pops style="${contentPStyle}">${config.content.text}</p>`
@@ -4,7 +4,7 @@ import type {
4
4
  // PopsDragConfig,
5
5
  PopsCommonConfig,
6
6
  PopsMoreButtonConfig,
7
- } from "../../types/components";
7
+ } from "../../../types/components";
8
8
 
9
9
  /**
10
10
  * pops.drawer
@@ -1,4 +1,4 @@
1
- import type { PopsFolderDetails } from "./indexType";
1
+ import type { PopsFolderDetails } from "./types";
2
2
 
3
3
  export const PopsFolderConfig = (): DeepRequired<PopsFolderDetails> => {
4
4
  return {
@@ -27,16 +27,30 @@ export const PopsFolderConfig = (): DeepRequired<PopsFolderDetails> => {
27
27
  clickEvent() {
28
28
  return [
29
29
  {
30
- fileName: "内部-测试文件.zip",
31
- fileSize: 1025000,
32
- fileType: "zip",
33
- createTime: 1702038410440,
34
- latestTime: 1702039602126,
35
- isFolder: false,
36
- index: 1,
30
+ fileName: "测试文件夹2222",
31
+ fileSize: 0,
32
+ fileType: "",
33
+ createTime: 0,
34
+ latestTime: 0,
35
+ isFolder: true,
36
+ index: 0,
37
+ // @ts-ignore
37
38
  clickEvent() {
38
- console.log("下载文件:", this.fileName);
39
- return "https://update.greasyfork.org/scripts/456485/pops.js";
39
+ return [
40
+ {
41
+ fileName: "内部-测试文件.zip",
42
+ fileSize: 1025000,
43
+ fileType: "zip",
44
+ createTime: 1702038410440,
45
+ latestTime: 1702039602126,
46
+ isFolder: false,
47
+ index: 1,
48
+ clickEvent() {
49
+ console.log("下载文件:", this.fileName);
50
+ return "https://update.greasyfork.org/scripts/456485/pops.js";
51
+ },
52
+ },
53
+ ];
40
54
  },
41
55
  },
42
56
  ];
@@ -1,49 +1,21 @@
1
- .pops[type-value] .pops-folder-title {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
5
- }
6
- .pops[type-value="folder"] .pops-folder-title {
7
- width: 100%;
8
- height: var(--container-title-height);
9
- border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
10
- }
11
- .pops[type-value="folder"] .pops-folder-title p[pops] {
12
- width: 100%;
13
- overflow: hidden;
14
- color: rgb(51, 51, 51);
15
- text-indent: 15px;
16
- text-overflow: ellipsis;
17
- white-space: nowrap;
18
- font-weight: 500;
19
- line-height: normal;
20
- }
21
- .pops[type-value="folder"] .pops-folder-content p[pops] {
22
- padding: 5px 10px;
23
- color: rgb(51, 51, 51);
24
- text-indent: 15px;
25
- }
26
- .pops[type-value="folder"] .pops-folder-content {
27
- width: 100%;
28
- /*height: calc(
29
- 100% - var(--container-title-height) - var(--container-bottom-btn-height)
30
- );*/
31
- flex: 1;
32
- overflow: auto;
33
- word-break: break-word;
34
- }
35
- .pops[type-value="folder"] .pops-folder-btn {
36
- /*position: absolute;
37
- bottom: 0;*/
38
- display: flex;
39
- padding: 10px 10px 10px 10px;
40
- width: 100%;
41
- height: var(--container-bottom-btn-height);
42
- max-height: var(--container-bottom-btn-height);
43
- line-height: normal;
44
- border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
45
- text-align: right;
46
- align-items: center;
1
+ .pops-folder-list {
2
+ --folder-arrow-fill-color: #d4d7de;
3
+ --folder-arrow-active-fill-color: #06a7ff;
4
+ --header-breadcrumb-text-color: #06a7ff;
5
+ --header-breadcrumb-all-files-text-color: var(--header-breadcrumb-text-color);
6
+ --header-breadcrumb-all-files-first-text-color: var(
7
+ --header-breadcrumb-text-color
8
+ );
9
+ --header-breadcrumb-all-files-last-text-color: #999999;
10
+ --table-header-row-text-color: #818999;
11
+ --table-body-td-text-color: rgb(247, 248, 250, var(--pops-bg-opacity));
12
+ --table-body-th-text-color: rgb(247, 248, 250, var(--pops-bg-opacity));
13
+ --table-body-row-text-color: #05082c;
14
+ --table-body-row-file-name-text-color: #05082c;
15
+ --table-body-row-hover-bd-color: rgb(245, 246, 247, var(--pops-bg-opacity));
16
+ --table-body-row-hover-bg-color: rgb(245, 246, 247, var(--pops-bg-opacity));
17
+ --table-body-row-file-name-hover-text-color: #06a7ff;
18
+ --table-body-row-content-text-color: #818999;
47
19
  }
48
20
  .pops-folder-list .cursor-p {
49
21
  cursor: pointer;
@@ -52,7 +24,7 @@
52
24
  background: 0 0;
53
25
  text-decoration: none;
54
26
  -webkit-tap-highlight-color: transparent;
55
- color: #05082c;
27
+ color: var(--header-breadcrumb-text-color);
56
28
  }
57
29
  table.pops-folder-list-table__body,
58
30
  table.pops-folder-list-table__header {
@@ -88,11 +60,9 @@ table.pops-folder-list-table__body {
88
60
  height: 50px;
89
61
  line-height: normal;
90
62
  align-content: center;
91
- color: rgb(129, 137, 153);
63
+ color: var(--table-header-row-text-color);
92
64
  text-align: left;
93
65
  font-size: 12px;
94
- }
95
- .pops-folder-list-table__header-row {
96
66
  -webkit-user-select: none;
97
67
  -moz-user-select: none;
98
68
  -ms-user-select: none;
@@ -102,19 +72,22 @@ table.pops-folder-list-table__body {
102
72
  height: 50px;
103
73
  line-height: normal;
104
74
  align-content: center;
105
- color: #03081a;
75
+ color: var(--table-body-row-text-color);
106
76
  font-size: 12px;
107
77
  }
108
78
  .pops-folder-list-table__body-row:hover {
109
- background: rgb(245, 246, 247, var(--pops-bg-opacity));
79
+ background-color: var(--table-body-row-hover-bg-color);
80
+ border-color: var(--table-body-row-hover-bd-color);
81
+ border: 0;
82
+ outline: none;
110
83
  }
111
84
  .pops-folder-list table th {
112
85
  border: 0;
113
- border-bottom: 1px solid rgb(247, 248, 250, var(--pops-bg-opacity));
86
+ border-bottom: 1px solid var(--table-body-th-text-color);
114
87
  }
115
88
  .pops-folder-list table td {
116
89
  border: 0;
117
- border-bottom: 1px solid rgb(247, 248, 250, var(--pops-bg-opacity));
90
+ border-bottom: 1px solid var(--table-body-td-text-color);
118
91
  position: relative;
119
92
  }
120
93
  .pops-folder-list .list-name-text {
@@ -187,9 +160,12 @@ table.pops-folder-list-table__body {
187
160
  display: none;
188
161
  }
189
162
 
190
- .pops-folder-list-file-name-title-text:hover {
163
+ .pops-folder-list .pops-folder-list-file-name-title-text {
164
+ color: var(--table-body-row-file-name-text-color);
165
+ }
166
+ .pops-folder-list .pops-folder-list-file-name-title-text:hover {
191
167
  text-decoration: none;
192
- color: rgb(6, 167, 255);
168
+ color: var(--table-body-row-file-name-hover-text-color);
193
169
  }
194
170
  .pops-folder-list .text-ellip {
195
171
  overflow: hidden;
@@ -197,7 +173,7 @@ table.pops-folder-list-table__body {
197
173
  text-overflow: ellipsis;
198
174
  }
199
175
  .pops-folder-list .content {
200
- color: rgb(129, 137, 153);
176
+ color: var(--table-body-row-content-text-color);
201
177
  position: relative;
202
178
  width: 100%;
203
179
  text-align: left;
@@ -251,10 +227,10 @@ table.pops-folder-list-table__body {
251
227
  .pops-folder-list .pops-folder-icon-arrow {
252
228
  width: 10px;
253
229
  height: 10px;
254
- fill: rgb(212, 215, 222);
230
+ fill: var(--folder-arrow-fill-color);
255
231
  }
256
232
  .pops-folder-list .pops-folder-icon-active {
257
- fill: rgb(6, 167, 255);
233
+ fill: var(--folder-arrow-active-fill-color);
258
234
  }
259
235
  .pops-folder-list .pops-folder-file-list-breadcrumb {
260
236
  padding: 4px 20px;
@@ -281,7 +257,7 @@ table.pops-folder-list-table__body {
281
257
  }
282
258
  .pops-folder-list .pops-folder-file-list-breadcrumb-allFiles {
283
259
  font-size: 12px;
284
- color: #333;
260
+ color: var(--header-breadcrumb-all-files-text-color);
285
261
  line-height: normal;
286
262
  align-content: center;
287
263
  font-weight: 700;
@@ -293,11 +269,11 @@ table.pops-folder-list-table__body {
293
269
  word-wrap: normal;
294
270
  }
295
271
  .pops-folder-list .pops-folder-file-list-breadcrumb-allFiles:last-child a {
296
- color: rgb(153, 153, 153);
272
+ color: var(--header-breadcrumb-all-files-last-text-color);
297
273
  }
298
274
  .pops-folder-list .pops-folder-file-list-breadcrumb-allFiles:first-child a {
299
275
  font-size: 14px;
300
- color: rgb(18, 22, 26);
276
+ color: var(--header-breadcrumb-all-files-first-text-color);
301
277
  }
302
278
  .pops-folder-list .pops-folder-file-list-breadcrumb .iconArrow {
303
279
  width: 16px;
@@ -307,3 +283,32 @@ table.pops-folder-list-table__body {
307
283
  background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAASCAMAAABYd88+AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABFUExURUdwTOLi4uLi4t7e3uPj49/f397e3t3d3f///97e3vDw8N3d3d7e3t3d3d3d3ejo6N/f397e3t7e3t3d3d/f393d3d3d3RK+NoEAAAAWdFJOUwAnM4YPU/iQA+UIeMDaHhY41i7zX7UebpjFAAAAUElEQVQI15XOORaAIAwE0LATXHCd+x9VfCiksXCq+UUWou8oZ1vXHrt7YVBiYkW4gdMKYFIC4CSATWCNHWPuM6HuHkr1x3N0ZrBu/9gl0b9c3+kF7C7hS1YAAAAASUVORK5CYII=)
308
284
  55% 50%/6px 9px no-repeat;
309
285
  }
286
+
287
+ @media (prefers-color-scheme: dark) {
288
+ .pops[type-value="folder"] {
289
+ --pops-title-border-color: rgb(73, 83, 102, var(--pops-bg-opacity));
290
+ --pops-bottom-btn-controls-border-color: rgb(
291
+ 73,
292
+ 83,
293
+ 102,
294
+ var(--pops-bg-opacity)
295
+ );
296
+ }
297
+ .pops-folder-list {
298
+ --header-breadcrumb-text-color: #06a7ff;
299
+ --header-breadcrumb-all-files-text-color: var(
300
+ --header-breadcrumb-text-color
301
+ );
302
+ --header-breadcrumb-all-files-first-text-color: var(
303
+ --header-breadcrumb-text-color
304
+ );
305
+ --header-breadcrumb-all-files-last-text-color: #818999;
306
+ --table-body-row-text-color: #f7f8fa;
307
+ --table-body-td-text-color: rgb(73, 83, 102, var(--pops-bg-opacity));
308
+ --table-body-th-text-color: rgb(73, 83, 102, var(--pops-bg-opacity));
309
+ --table-body-td-text-color: #495366;
310
+ --table-body-row-hover-bd-color: #1f2022;
311
+ --table-body-row-hover-bg-color: #1f2022;
312
+ --table-body-row-file-name-text-color: #f7f8fa;
313
+ }
314
+ }
@@ -9,7 +9,7 @@ import { popsUtils } from "../../utils/PopsUtils";
9
9
  import { PopsLoading } from "../loading";
10
10
  import { PopsFolderConfig } from "./config";
11
11
  import { Folder_ICON } from "./folderIcon";
12
- import type { PopsFolderDataConfig, PopsFolderDetails } from "./indexType";
12
+ import type { PopsFolderDataConfig, PopsFolderDetails } from "./types";
13
13
 
14
14
  export const PopsFolder = {
15
15
  init(details: PopsFolderDetails) {
@@ -122,14 +122,14 @@ export const PopsFolder = {
122
122
  PopsType,
123
123
  config,
124
124
  /*html*/ `
125
- <div class="pops-folder-title" style="text-align: ${
126
- config.title.position
127
- };${headerStyle}">${
125
+ <div class="pops-title pops-${PopsType}-title" style="text-align: ${
126
+ config.title.position
127
+ };${headerStyle}">${
128
128
  config.title.html
129
129
  ? config.title.text
130
130
  : `<p pops style="${headerPStyle}">${config.title.text}</p>`
131
131
  }${headerBtnHTML}</div>
132
- <div class="pops-folder-content ${
132
+ <div class="pops-content pops-${PopsType}-content ${
133
133
  popsUtils.isPhone() ? "pops-mobile-folder-content" : ""
134
134
  }">
135
135
  <div class="pops-folder-list">
@@ -3,7 +3,7 @@ import type {
3
3
  PopsDragConfig,
4
4
  PopsCommonConfig,
5
5
  PopsMoreButtonConfig,
6
- } from "../../types/components";
6
+ } from "../../../types/components";
7
7
 
8
8
  /**
9
9
  * pops.folder的folder配置信息
@@ -1,4 +1,4 @@
1
- import type { PopsIframeDetails } from "./indexType";
1
+ import type { PopsIframeDetails } from "./types";
2
2
 
3
3
  export const PopsIframeConfig = (): DeepRequired<PopsIframeDetails> => {
4
4
  return {
@@ -2,38 +2,8 @@
2
2
  --container-title-height: 55px;
3
3
  transition: width 0.35s ease, height 0.35s ease;
4
4
  }
5
- .pops[type-value] .pops-iframe-title {
6
- display: flex;
7
- align-items: center;
8
- justify-content: space-between;
9
- }
10
- .pops[type-value="iframe"] .pops-iframe-title {
11
- width: calc(100% - 0px);
12
- height: var(--container-title-height);
13
- border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
14
- }
15
- .pops[type-value="iframe"] .pops-iframe-title p[pops] {
16
- width: 100%;
17
- overflow: hidden;
18
- color: rgb(51, 51, 51);
19
- text-indent: 15px;
20
- text-overflow: ellipsis;
21
- white-space: nowrap;
22
- font-weight: 500;
23
- line-height: normal;
24
- align-content: center;
25
- }
26
- .pops[type-value="iframe"] .pops-iframe-content {
27
- width: 100%;
28
- /*height: calc(100% - var(--container-title-height));*/
29
- flex: 1;
5
+ .pops[type-value="iframe"] .pops-content {
30
6
  overflow: hidden;
31
- word-break: break-word;
32
- }
33
- .pops[type-value="iframe"] .pops-iframe-content p[pops] {
34
- padding: 5px 10px;
35
- color: #333;
36
- text-indent: 15px;
37
7
  }
38
8
  .pops-loading {
39
9
  position: absolute;
@@ -85,8 +55,8 @@
85
55
  height: 100% !important;
86
56
  }
87
57
  .pops[type-value="iframe"] iframe[pops] {
88
- width: calc(100% - 4px);
89
- height: calc(100% - 4px);
58
+ width: 100%;
59
+ height: 100%;
90
60
  border: 0;
91
61
  }
92
62
  .pops-iframe-content-global-loading {
@@ -1,15 +1,15 @@
1
- import { PopsCore } from "../../Core";
1
+ import { PopsCore } from "../../PopsCore";
2
2
  import { GlobalConfig } from "../../GlobalConfig";
3
3
  import { PopsElementHandler } from "../../handler/PopsElementHandler";
4
4
  import { PopsHandler } from "../../handler/PopsHandler";
5
5
  import { PopsCSS } from "../../PopsCSS";
6
- import { PopsLayer } from "../../PopsLayer";
6
+ import { PopsLayerData } from "../../PopsLayer";
7
7
  import type { PopsEventDetails } from "../../types/event";
8
8
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
9
9
  import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
10
10
  import { popsUtils } from "../../utils/PopsUtils";
11
11
  import { PopsIframeConfig } from "./config";
12
- import type { PopsIframeDetails } from "./indexType";
12
+ import type { PopsIframeDetails } from "./types";
13
13
 
14
14
  export const PopsIframe = {
15
15
  init(details: PopsIframeDetails) {
@@ -58,15 +58,15 @@ export const PopsIframe = {
58
58
  PopsType,
59
59
  config,
60
60
  /*html*/ `
61
- <div class="pops-iframe-title" style="text-align: ${
62
- config.title.position
63
- };${headerStyle}">${
61
+ <div class="pops-title pops-${PopsType}-title" style="text-align: ${
62
+ config.title.position
63
+ };${headerStyle}">${
64
64
  config.title.html
65
65
  ? titleText
66
66
  : `<p pops style="${headerPStyle}">${titleText}</p>`
67
67
  }${headerBtnHTML}</div>
68
- <div class="pops-iframe-content">
69
- <div class="pops-iframe-content-global-loading"></div>
68
+ <div class="pops-content pops-${PopsType}-content">
69
+ <div class="pops-${PopsType}-content-global-loading"></div>
70
70
  <iframe src="${config.url}" pops ${
71
71
  config.sandbox
72
72
  ? "sandbox='allow-forms allow-same-origin allow-scripts'"
@@ -305,7 +305,7 @@ export const PopsIframe = {
305
305
  (event) => {
306
306
  event.preventDefault();
307
307
  event.stopPropagation();
308
- PopsInstanceUtils.removeInstance([PopsLayer.iframe], guid, false);
308
+ PopsInstanceUtils.removeInstance([PopsLayerData.iframe], guid, false);
309
309
  if (typeof config?.btn?.close?.callback === "function") {
310
310
  config.btn.close.callback(eventDetails, event);
311
311
  }
@@ -2,9 +2,9 @@ import type {
2
2
  PopsTitleConfig,
3
3
  PopsDragConfig,
4
4
  PopsCommonConfig,
5
- } from "../../types/components";
5
+ } from "../../../types/components";
6
6
 
7
- import type { PopsEventDetails } from "../../types/event";
7
+ import type { PopsEventDetails } from "../../../types/event";
8
8
 
9
9
  /**
10
10
  * pops.iframe的按钮的点击回调参数event
@@ -1,4 +1,4 @@
1
- import type { PopsLoadingDetails } from "./indexType";
1
+ import type { PopsLoadingDetails } from "./types";
2
2
 
3
3
  export const PopsLoadingConfig = (): DeepRequired<PopsLoadingDetails> => {
4
4
  return {
@@ -1,3 +1,10 @@
1
+ .pops[type-value="loading"] {
2
+ --loading-bd-color: rgba(0, 0, 0, 0.2);
3
+ --loading-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));
4
+ --loading-box-shadow-color: rgb(0 0 0 / 50%);
5
+ --loading-icon-color: rgba(100, 149, 237, 0.1);
6
+ --loading-icon-bd-top-color: rgb(100, 149, 237, var(--pops-bd-opacity));
7
+ }
1
8
  .pops[type-value="loading"] {
2
9
  position: absolute;
3
10
  top: 272.5px;
@@ -11,10 +18,10 @@
11
18
  max-height: 100%;
12
19
  min-width: 0;
13
20
  min-height: 0;
14
- border: 1px solid rgba(0, 0, 0, 0.2);
21
+ border: 1px solid var(--loading-bd-color);
15
22
  border-radius: 5px;
16
- background-color: rgb(255, 255, 255, var(--pops-bg-opacity));
17
- box-shadow: 0 0 5px rgb(0 0 0 / 50%);
23
+ background-color: var(--loading-bg-color);
24
+ box-shadow: 0 0 5px var(--loading-box-shadow-color);
18
25
  vertical-align: middle;
19
26
  transition: all 0.35s;
20
27
  transform: translate(-50%, -50%);
@@ -32,8 +39,8 @@
32
39
  display: inline-block;
33
40
  width: 2em;
34
41
  height: 2em;
35
- border: 0.3em solid rgba(100, 149, 237, 0.1);
36
- border-top: 0.3em solid rgb(100, 149, 237, var(--pops-bd-opacity));
42
+ border: 0.3em solid var(--loading-icon-color);
43
+ border-top: 0.3em solid var(--loading-icon-bd-top-color);
37
44
  border-radius: 50%;
38
45
  content: " ";
39
46
  vertical-align: middle;
@@ -51,11 +58,9 @@
51
58
  line-height: normal;
52
59
  align-content: center;
53
60
  }
54
- .pops[type-value="loading"] .pops-loading-content p[pops] {
55
- display: inline-block;
56
- padding: 5px 0px;
57
- color: rgb(51, 51, 51);
58
- text-indent: 15px;
59
- font-size: inherit;
60
- text-align: center;
61
+
62
+ @media (prefers-color-scheme: dark) {
63
+ .pops[type-value="loading"] {
64
+ --loading-bg-color: #222222;
65
+ }
61
66
  }
@@ -5,7 +5,7 @@ import { PopsCSS } from "../../PopsCSS";
5
5
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
6
6
  import { popsUtils } from "../../utils/PopsUtils";
7
7
  import { PopsLoadingConfig } from "./config";
8
- import type { PopsLoadingDetails } from "./indexType";
8
+ import type { PopsLoadingDetails } from "./types";
9
9
 
10
10
  export const PopsLoading = {
11
11
  init(details: PopsLoadingDetails) {
@@ -30,15 +30,15 @@ export const PopsLoading = {
30
30
  PopsType,
31
31
  config,
32
32
  /*html*/ `
33
- <div class="pops-loading-content">${
34
- config.addIndexCSS
35
- ? /*html*/ `
33
+ <div class="pops-content pops-${PopsType}-content">${
34
+ config.addIndexCSS
35
+ ? /*html*/ `
36
36
  <style data-model-name="index">${PopsCSS.index}</style>
37
37
  <style data-model-name="anim">${PopsCSS.anim}</style>
38
38
  <style data-model-name="common">${PopsCSS.common}</style>
39
39
  `
40
- : ""
41
- }
40
+ : ""
41
+ }
42
42
  <style data-model-name="loadingCSS">
43
43
  ${PopsCSS.loadingCSS}
44
44
  </style>
@@ -1,7 +1,7 @@
1
1
  import type {
2
2
  PopsCommonConfig,
3
3
  PopsContentConfig,
4
- } from "../../types/components";
4
+ } from "../../../types/components";
5
5
 
6
6
  /**
7
7
  * pops.loading