@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,5 +1,5 @@
1
1
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
2
- import type { PopsPanelDetails } from "./indexType";
2
+ import type { PopsPanelDetails } from "./types";
3
3
 
4
4
  export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
5
5
  return {
@@ -5,30 +5,33 @@ import { PopsMathFloatUtils } from "../../utils/PopsMathUtils";
5
5
  import { PopsSafeUtils } from "../../utils/PopsSafeUtils";
6
6
  import { popsUtils } from "../../utils/PopsUtils";
7
7
  import { PopsAlert } from "../alert";
8
- import type { PopsAlertDetails } from "../alert/indexType";
8
+ import type { PopsAlertDetails } from "../alert/types";
9
9
  import { PopsTooltip } from "../tooltip";
10
- import type { PopsPanelButtonDetails } from "./buttonType";
11
- import type { PopsPanelRightAsideContainerOptions } from "./commonType";
12
- import type { PopsPanelDeepMenuDetails } from "./deepMenuType";
13
- import type { PopsPanelFormsDetails } from "./formsType";
10
+ import type { PopsPanelButtonDetails } from "./types/components-button";
11
+ import type { PopsPanelRightAsideContainerOptions } from "./types/components-common";
12
+ import type { PopsPanelDeepMenuDetails } from "./types/components-deepMenu";
13
+ import type { PopsPanelFormsDetails } from "./types/components-forms";
14
14
  import type {
15
15
  PopsPanelContentConfig,
16
16
  PopsPanelDetails,
17
17
  PopsPanelEventType,
18
18
  PopsPanelFormsTotalDetails,
19
- } from "./indexType";
20
- import type { PopsPanelInputDetails } from "./inputType";
21
- import type { PopsPanelOwnDetails } from "./ownType";
19
+ } from "./types";
20
+ import type { PopsPanelInputDetails } from "./types/components-input";
21
+ import type { PopsPanelOwnDetails } from "./types/components-own";
22
22
  import type {
23
23
  PopsPanelSelectMultipleDataOption,
24
24
  PopsPanelSelectMultipleDetails,
25
- } from "./selectMultipleType";
26
- import type { PopsPanelSelectDetails } from "./selectType";
27
- import type { PopsPanelSliderDetails } from "./sliderType";
28
- import type { PopsPanelSwitchDetails } from "./switchType";
29
- import type { PopsPanelTextAreaDetails } from "./textareaType";
25
+ } from "./types/components-selectMultiple";
26
+ import type { PopsPanelSelectDetails } from "./types/components-select";
27
+ import type { PopsPanelSliderDetails } from "./types/components-slider";
28
+ import type { PopsPanelSwitchDetails } from "./types/components-switch";
29
+ import type { PopsPanelTextAreaDetails } from "./types/components-textarea";
30
30
 
31
- export const PanelHandleContentDetails = () => {
31
+ /**
32
+ * 处理组件(把组件配置转为组件元素)
33
+ */
34
+ export const PanelHandlerComponents = () => {
32
35
  return {
33
36
  /**
34
37
  * 左侧的ul容器
@@ -2156,6 +2159,7 @@ export const PanelHandleContentDetails = () => {
2156
2159
  --el-text-color-regular: #606266;
2157
2160
  --el-color-primary: #409eff;
2158
2161
  --el-fill-color-light: #f5f7fa;
2162
+ --el-disable-color: #a8abb2;
2159
2163
  }
2160
2164
  .select-item{
2161
2165
  cursor: pointer;
@@ -2173,7 +2177,7 @@ export const PanelHandleContentDetails = () => {
2173
2177
  .select-item[aria-disabled],
2174
2178
  .select-item[disabled]{
2175
2179
  cursor: not-allowed;
2176
- color: #a8abb2;
2180
+ color: var(--el-disable-color);
2177
2181
  background: unset;
2178
2182
  }
2179
2183
  .select-item:hover{
@@ -2201,6 +2205,16 @@ export const PanelHandleContentDetails = () => {
2201
2205
  width: 12px;
2202
2206
  height: 12px;
2203
2207
  }
2208
+
2209
+
2210
+ @media (prefers-color-scheme: dark) {
2211
+ .select-container{
2212
+ --el-text-color-regular: #f2f2f2;
2213
+ --el-disable-color: #8D9095;
2214
+ --el-fill-color-light: #262727;
2215
+ }
2216
+ }
2217
+
2204
2218
  ${style || ""}
2205
2219
  `,
2206
2220
  } as PopsAlertDetails,
@@ -3,7 +3,7 @@
3
3
  --el-disabled-bg-color: #f5f7fa;
4
4
  --el-disabled-border-color: #e4e7ed;
5
5
  --pops-bg-color: #f2f2f2;
6
- --pops-color: #333;
6
+ --pops-color: #333333;
7
7
  --title-bg-color: #ffffff;
8
8
  --aside-bg-color: #ffffff;
9
9
  --aside-hover-color: rgb(64, 158, 255);
@@ -24,57 +24,52 @@
24
24
  --pops-panel-forms-container-item-margin-left-right: var(
25
25
  --pops-panel-forms-margin-left-right
26
26
  );
27
+ --pops-panel-forms-container-li-border-color: rgb(
28
+ 229,
29
+ 229,
30
+ 229,
31
+ var(--pops-bd-opacity)
32
+ );
27
33
  --pops-panel-forms-container-li-padding-top-bottom: 12px;
28
34
  --pops-panel-forms-container-li-padding-left-right: 16px;
35
+
36
+ --pops-panel-components-input-text-color: #000000;
37
+ --pops-panel-components-input-text-bg-color: transparent;
38
+ --pops-panel-components-input-bd-color: #dcdfe6;
39
+ --pops-panel-components-input-bg-color: #ffffff;
40
+ --pops-panel-components-input-hover-bd-color: #c0c4cc;
41
+ --pops-panel-components-input-focus-bd-color: #409eff;
42
+ --pops-panel-components-input-suffix-color: #a8abb2;
43
+
44
+ --pops-panel-components-textarea-text-color: #000000;
45
+ --pops-panel-components-textarea-text-bg-color: #ffffff;
46
+ --pops-panel-components-textarea-bd-color: #dcdfe6;
47
+ --pops-panel-components-textarea-hover-bd-color: #c0c4cc;
48
+ --pops-panel-components-textarea-focus-bd-color: #409eff;
49
+
50
+ --pops-panel-components-select-text-color: #000000;
51
+ --pops-panel-components-select-bd-color: rgb(
52
+ 184,
53
+ 184,
54
+ 184,
55
+ var(--pops-bd-opacity)
56
+ );
57
+ --pops-panel-components-select-bg-color: rgb(
58
+ 255,
59
+ 255,
60
+ 255,
61
+ var(--pops-bg-opacity)
62
+ );
63
+ --pops-panel-components-select-hover-bd-color: #c0c4cc;
29
64
  }
30
65
  .pops[type-value="panel"] {
31
66
  color: var(--pops-color);
32
67
  background: var(--pops-bg-color);
33
68
  }
34
69
  .pops[type-value] .pops-panel-title {
35
- display: flex;
36
- align-items: center;
37
- justify-content: space-between;
38
70
  background: var(--title-bg-color);
39
71
  }
40
72
 
41
- .pops[type-value="panel"] .pops-panel-title {
42
- width: 100%;
43
- height: var(--container-title-height);
44
- border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
45
- }
46
- .pops[type-value="panel"] .pops-panel-title p[pops] {
47
- width: 100%;
48
- overflow: hidden;
49
- text-indent: 15px;
50
- text-overflow: ellipsis;
51
- white-space: nowrap;
52
- font-weight: 500;
53
- line-height: normal;
54
- align-content: center;
55
- }
56
- .pops[type-value="panel"] .pops-panel-content {
57
- width: 100%;
58
- /*height: calc(
59
- 100% - var(--container-title-height) - var(--container-bottom-btn-height)
60
- );*/
61
- flex: 1;
62
- overflow: auto;
63
- word-break: break-word;
64
- }
65
- .pops[type-value="panel"] .pops-panel-btn {
66
- display: flex;
67
- padding: 10px 10px 10px 10px;
68
- width: 100%;
69
- height: var(--container-bottom-btn-height);
70
- max-height: var(--container-bottom-btn-height);
71
- line-height: normal;
72
- border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
73
- text-align: right;
74
- align-content: center;
75
- align-items: center;
76
- }
77
-
78
73
  /* ↓panel的CSS↓ */
79
74
  aside.pops-panel-aside {
80
75
  overflow: auto;
@@ -179,7 +174,7 @@ section.pops-panel-container .pops-panel-forms-container-item ul li {
179
174
  align-items: center;
180
175
  padding: var(--pops-panel-forms-container-li-padding-top-bottom) 0px;
181
176
  margin: 0px var(--pops-panel-forms-container-li-padding-left-right);
182
- border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
177
+ border-bottom: 1px solid var(--pops-panel-forms-container-li-border-color);
183
178
  text-align: left;
184
179
  }
185
180
  section.pops-panel-container
@@ -669,17 +664,23 @@ section.pops-panel-container
669
664
  .pops-panel-input {
670
665
  display: flex;
671
666
  align-items: center;
672
- border: 1px solid #dcdfe6;
667
+ border: 1px solid var(--pops-panel-components-input-bd-color);
673
668
  border-radius: 4px;
674
- background-color: #ffffff;
669
+ background-color: var(--pops-panel-components-input-bg-color);
675
670
  position: relative;
671
+ box-shadow: none;
676
672
  }
677
673
  .pops-panel-input:hover {
678
- box-shadow: 0 0 0 1px #c0c4cc inset;
674
+ border: 1px solid var(--pops-panel-components-input-hover-bd-color);
675
+ }
676
+ .pops-panel-input:has(input:disabled):hover {
677
+ --pops-panel-components-input-hover-bd-color: var(
678
+ --pops-panel-components-input-bd-color
679
+ );
679
680
  }
680
681
  .pops-panel-input:has(input:focus) {
681
682
  outline: 0;
682
- border: 1px solid #409eff;
683
+ border: 1px solid var(--pops-panel-components-input-focus-bd-color);
683
684
  border-radius: 4px;
684
685
  box-shadow: none;
685
686
  }
@@ -699,7 +700,8 @@ section.pops-panel-container
699
700
  vertical-align: middle;
700
701
  -webkit-appearance: none;
701
702
  appearance: none;
702
- background-color: transparent;
703
+ color: var(--pops-panel-components-input-text-color);
704
+ background-color: var(--pops-panel-components-input-text-bg-color);
703
705
  outline: 0;
704
706
  transition: 0.1s;
705
707
  border: 0;
@@ -719,7 +721,7 @@ section.pops-panel-container
719
721
  flex-wrap: nowrap;
720
722
  height: 100%;
721
723
  text-align: center;
722
- color: #a8abb2;
724
+ color: var(--pops-panel-components-input-suffix-color);
723
725
  transition: all 0.3s;
724
726
  pointer-events: none;
725
727
  margin: 0 8px;
@@ -751,13 +753,14 @@ section.pops-panel-container
751
753
 
752
754
  .pops-input-disabled {
753
755
  background-color: var(--el-disabled-bg-color);
754
- box-shadow: 0 0 0 1px var(--el-disabled-border-color) inset;
755
756
  }
756
757
  .pops-panel-input.pops-input-disabled {
757
758
  border: none;
758
759
  }
759
760
  .pops-panel-input.pops-input-disabled:hover {
760
- box-shadow: 0 0 0 1px var(--el-disabled-border-color) inset;
761
+ --pops-panel-components-input-hover-bd-color: var(
762
+ --pops-panel-components-input-bd-color
763
+ );
761
764
  }
762
765
  .pops-panel-input input:disabled,
763
766
  .pops-panel-input input:disabled + .pops-panel-input__suffix {
@@ -786,42 +789,54 @@ section.pops-panel-container
786
789
  box-sizing: border-box;
787
790
  font-size: inherit;
788
791
  font-family: inherit;
789
- background-color: rgb(255, 255, 255, var(--pops-bg-opacity));
792
+ color: var(--pops-panel-components-textarea-text-color);
793
+ background-color: var(--pops-panel-components-textarea-text-bg-color);
790
794
  background-image: none;
791
795
  -webkit-appearance: none;
792
796
  appearance: none;
793
- box-shadow: 0 0 0 1px #dcdfe6 inset;
797
+ box-shadow: none;
794
798
  border-radius: 0;
795
799
  transition: box-shadow 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
796
- border: none;
800
+ border: 1px solid var(--pops-panel-components-textarea-bd-color);
797
801
  }
798
802
  .pops-panel-textarea textarea:hover {
799
- box-shadow: 0 0 0 1px #c0c4cc inset;
803
+ border-color: var(--pops-panel-components-textarea-hover-bd-color);
804
+ }
805
+ .pops-panel-textarea:has(textarea:disabled):hover {
806
+ --pops-panel-components-textarea-hover-bd-color: var(
807
+ --pops-panel-components-textarea-bd-color
808
+ );
800
809
  }
801
810
  .pops-panel-textarea-disable .pops-panel-textarea textarea:hover {
802
811
  box-shadow: none;
803
812
  }
804
813
  .pops-panel-textarea textarea:focus {
805
814
  outline: 0;
806
- box-shadow: 0 0 0 1px #409eff inset;
815
+ border-color: var(--pops-panel-components-textarea-focus-bd-color);
807
816
  }
808
817
  /* textarea的CSS */
809
818
 
810
819
  /* select的CSS */
820
+ .pops-panel-select {
821
+ border: 0;
822
+ }
811
823
  .pops-panel-select select {
812
824
  height: 32px;
813
825
  line-height: normal;
814
826
  align-content: center;
815
827
  min-width: 200px;
816
- border: 1px solid rgb(184, 184, 184, var(--pops-bd-opacity));
828
+ border: 1px solid var(--pops-panel-components-select-bd-color);
817
829
  border-radius: 5px;
818
830
  text-align: center;
819
831
  outline: 0;
820
- background: rgb(255, 255, 255, var(--pops-bg-opacity));
832
+ color: var(--pops-panel-components-select-text-color);
833
+ background-color: var(--pops-panel-components-select-bg-color);
821
834
  box-shadow: none;
822
835
  }
823
836
  .pops-panel-select select:hover {
824
- box-shadow: 0 0 0 1px #c0c4cc inset;
837
+ --pops-panel-components-select-bd-color: var(
838
+ --pops-panel-components-select-hover-bd-color
839
+ );
825
840
  }
826
841
  .pops-panel-select-disable .pops-panel-select select:hover {
827
842
  box-shadow: none;
@@ -851,11 +866,6 @@ section.pops-panel-container
851
866
  --el-color-primary: #409eff;
852
867
  --el-color-white: #ffffff;
853
868
  width: 200px;
854
- /* 左侧内容*/
855
- /* 左侧内容*/
856
- /* 右侧箭头图标*/
857
- /* 右侧箭头图标*/
858
- /* tag*/
859
869
  }
860
870
  .pops-panel-select-multiple .el-select__wrapper {
861
871
  display: flex;
@@ -1084,3 +1094,66 @@ section.pops-panel-container
1084
1094
  display: flex;
1085
1095
  align-items: baseline;
1086
1096
  }
1097
+
1098
+ @media (prefers-color-scheme: dark) {
1099
+ .pops[type-value="panel"] {
1100
+ --pops-bg-color: #000000;
1101
+ --pops-color: #f2f2f2;
1102
+ --title-bg-color: #000000;
1103
+ --aside-bg-color: #262626;
1104
+ --pops-panel-forms-container-item-left-desc-text-color: #6c6c6c;
1105
+ --pops-panel-forms-container-item-bg-color: #262626;
1106
+ --pops-panel-forms-container-item-title-color: #c1c1c1;
1107
+
1108
+ --pops-panel-forms-container-li-border-color: rgb(
1109
+ 51,
1110
+ 51,
1111
+ 51,
1112
+ var(--pops-bd-opacity)
1113
+ );
1114
+
1115
+ --pops-panel-components-input-text-color: #f2f2f2;
1116
+ --pops-panel-components-input-bd-color: #4f5052;
1117
+ --pops-panel-components-input-bg-color: #141414;
1118
+ --pops-panel-components-input-hover-bd-color: #6f7175;
1119
+ --pops-panel-components-input-focus-bd-color: #409eff;
1120
+ --pops-panel-components-input-suffix-color: #a8abb2;
1121
+
1122
+ --pops-panel-components-textarea-text-color: #f2f2f2;
1123
+ --pops-panel-components-textarea-text-bg-color: #141414;
1124
+ --pops-panel-components-textarea-bd-color: #4f5052;
1125
+ --pops-panel-components-textarea-hover-bd-color: #6f7175;
1126
+ --pops-panel-components-textarea-focus-bd-color: #409eff;
1127
+
1128
+ --pops-panel-components-select-text-color: #f2f2f2;
1129
+ --pops-panel-components-select-bd-color: rgb(
1130
+ 51,
1131
+ 51,
1132
+ 51,
1133
+ var(--pops-bd-opacity)
1134
+ );
1135
+ --pops-panel-components-select-bg-color: #141414;
1136
+ }
1137
+ .pops[type-value="panel"]
1138
+ .pops-panel-deepMenu-container
1139
+ .pops-panel-deepMenu-container-left-arrow-icon {
1140
+ fill: #f2f2f2;
1141
+ }
1142
+
1143
+ .pops-panel-select-multiple {
1144
+ --el-fill-color-blank: #141414;
1145
+ --el-border-color: #4c4d4f;
1146
+ --el-text-color-placeholder: #a8abb2;
1147
+ --el-select-input-color: #a8abb2;
1148
+ --el-text-color-regular: #606266;
1149
+ --el-color-info: #909399;
1150
+ --el-color-info-light-8: #e9e9eb;
1151
+ --el-color-primary-light-9: #ecf5ff;
1152
+ --el-color-primary-light-8: #d9ecff;
1153
+ --el-color-primary: #409eff;
1154
+ --el-color-white: #ffffff;
1155
+ }
1156
+ .pops-panel-select-multiple .el-tag {
1157
+ --el-color-info-light-9: #202121;
1158
+ }
1159
+ }
@@ -3,9 +3,9 @@ import { PopsHandler } from "../../handler/PopsHandler";
3
3
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
4
4
  import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
5
5
  import { popsUtils } from "../../utils/PopsUtils";
6
- import type { PopsPanelDetails, PopsPanelEventType } from "./indexType";
6
+ import type { PopsPanelDetails, PopsPanelEventType } from "./types";
7
7
  import { PopsPanelConfig } from "./config";
8
- import { PanelHandleContentDetails } from "./PanelHandleContentDetails";
8
+ import { PanelHandlerComponents } from "./handlerComponents";
9
9
  import { GlobalConfig } from "../../GlobalConfig";
10
10
  import { PopsCSS } from "../../PopsCSS";
11
11
 
@@ -49,14 +49,14 @@ export const PopsPanel = {
49
49
  PopsType,
50
50
  config,
51
51
  /*html*/ `
52
- <div class="pops-${PopsType}-title" style="text-align: ${
52
+ <div class="pops-title pops-${PopsType}-title" style="text-align: ${
53
53
  config.title.position
54
54
  };${headerStyle}">${
55
55
  config.title.html
56
56
  ? config.title.text
57
57
  : `<p pops style="${headerPStyle}">${config.title.text}</p>`
58
58
  }${headerBtnHTML}</div>
59
- <div class="pops-${PopsType}-content">
59
+ <div class="pops-content pops-${PopsType}-content">
60
60
  <aside class="pops-${PopsType}-aside">
61
61
  <ul></ul>
62
62
  </aside>
@@ -135,11 +135,11 @@ export const PopsPanel = {
135
135
  if ($mask != null) {
136
136
  $anim.after($mask);
137
137
  }
138
- let panelHandleContentDetails = PanelHandleContentDetails();
138
+ let panelHandlerComponents = PanelHandlerComponents();
139
139
  /**
140
140
  * 处理内部配置
141
141
  */
142
- panelHandleContentDetails.init({
142
+ panelHandlerComponents.init({
143
143
  config: config,
144
144
  $el: {
145
145
  $pops: $pops,
@@ -1,10 +1,11 @@
1
- import type { PopsPanelCommonDetails } from "./commonType";
2
- import type { PopsButtonStyleType } from "../../types/button";
3
- import type { PopsIconType } from "../../types/icon";
1
+ import type { PopsPanelCommonDetails } from "./components-common";
2
+ import type { PopsButtonStyleType } from "../../../types/button";
3
+ import type { PopsIconType } from "../../../types/icon";
4
4
  /**
5
5
  * pops.panel的 button
6
6
  */
7
- export interface PopsPanelButtonDetails extends PopsPanelCommonDetails<PopsPanelButtonDetails> {
7
+ export interface PopsPanelButtonDetails
8
+ extends PopsPanelCommonDetails<PopsPanelButtonDetails> {
8
9
  /**
9
10
  * (可选)className属性
10
11
  */
@@ -1,5 +1,5 @@
1
- import type { PopsPanelFormsDetails } from "./formsType";
2
- import { PopsPanelFormsTotalDetails } from "./indexType";
1
+ import type { PopsPanelFormsDetails } from "./components-forms";
2
+ import { PopsPanelFormsTotalDetails } from ".";
3
3
 
4
4
  /**
5
5
  * 右侧容器的配置
@@ -1,6 +1,6 @@
1
- import type { PopsPanelFormsTotalDetails } from "./indexType";
2
- import type { PopsPanelFormsDetails } from "./formsType";
3
- import type { PopsPanelCommonDetails } from "./commonType";
1
+ import type { PopsPanelFormsTotalDetails } from ".";
2
+ import type { PopsPanelFormsDetails } from "./components-forms";
3
+ import type { PopsPanelCommonDetails } from "./components-common";
4
4
  /**
5
5
  * pops.panel的 深层菜单
6
6
  */
@@ -1,5 +1,5 @@
1
- import type { PopsPanelCommonDetails } from "./commonType";
2
- import type { PopsPanelFormsTotalDetails } from "./indexType";
1
+ import type { PopsPanelCommonDetails } from "./components-common";
2
+ import type { PopsPanelFormsTotalDetails } from ".";
3
3
 
4
4
  /**
5
5
  * pops.panel的 forms
@@ -1,4 +1,4 @@
1
- import type { PopsPanelCommonDetails } from "./commonType";
1
+ import type { PopsPanelCommonDetails } from "./components-common";
2
2
 
3
3
  /**
4
4
  * pops.panel的 input
@@ -1,4 +1,4 @@
1
- import type { PopsPanelCommonDetails } from "./commonType";
1
+ import type { PopsPanelCommonDetails } from "./components-common";
2
2
 
3
3
  /**
4
4
  * pops.panel的 own
@@ -1,6 +1,6 @@
1
- import type { PopsPanelCommonDetails } from "./commonType";
2
- import type { PopsPanelFormsDetails } from "./formsType";
3
- import type { PopsPanelFormsTotalDetails } from "./indexType";
1
+ import type { PopsPanelCommonDetails } from "./components-common";
2
+ import type { PopsPanelFormsDetails } from "./components-forms";
3
+ import type { PopsPanelFormsTotalDetails } from ".";
4
4
 
5
5
  /**
6
6
  * pops.panel的 select
@@ -1,5 +1,5 @@
1
- import type { PopsAlertDetails } from "../alert/indexType";
2
- import type { PopsPanelCommonDetails } from "./commonType";
1
+ import type { PopsAlertDetails } from "../../alert/types";
2
+ import type { PopsPanelCommonDetails } from "./components-common";
3
3
 
4
4
  export interface PopsPanelSelectMultipleDataOption<T> {
5
5
  /**
@@ -1,4 +1,4 @@
1
- import type { PopsPanelCommonDetails } from "./commonType";
1
+ import type { PopsPanelCommonDetails } from "./components-common";
2
2
 
3
3
  /**
4
4
  * pops.panel的 slider
@@ -1,4 +1,4 @@
1
- import type { PopsPanelCommonDetails } from "./commonType";
1
+ import type { PopsPanelCommonDetails } from "./components-common";
2
2
 
3
3
  /**
4
4
  * pops.panel的 switch
@@ -1,4 +1,4 @@
1
- import type { PopsPanelCommonDetails } from "./commonType";
1
+ import type { PopsPanelCommonDetails } from "./components-common";
2
2
 
3
3
  /**
4
4
  * pops.panel的 textarea
@@ -2,18 +2,18 @@ import type {
2
2
  PopsTitleConfig,
3
3
  PopsDragConfig,
4
4
  PopsCommonConfig,
5
- } from "../../types/components";
6
- import type { PopsPanelFormsDetails } from "./formsType";
7
- import type { PopsPanelSwitchDetails } from "./switchType";
8
- import type { PopsPanelSliderDetails } from "./sliderType";
9
- import type { PopsPanelInputDetails } from "./inputType";
10
- import type { PopsPanelTextAreaDetails } from "./textareaType";
11
- import type { PopsPanelSelectDetails } from "./selectType";
12
- import type { PopsPanelButtonDetails } from "./buttonType";
13
- import type { PopsPanelDeepMenuDetails } from "./deepMenuType";
14
- import type { PopsPanelOwnDetails } from "./ownType";
15
- import type { PopsHeaderCloseButtonDetails } from "../../types/button";
16
- import { PopsPanelSelectMultipleDetails } from "./selectMultipleType";
5
+ } from "../../../types/components";
6
+ import type { PopsPanelFormsDetails } from "./components-forms";
7
+ import type { PopsPanelSwitchDetails } from "./components-switch";
8
+ import type { PopsPanelSliderDetails } from "./components-slider";
9
+ import type { PopsPanelInputDetails } from "./components-input";
10
+ import type { PopsPanelTextAreaDetails } from "./components-textarea";
11
+ import type { PopsPanelSelectDetails } from "./components-select";
12
+ import type { PopsPanelButtonDetails } from "./components-button";
13
+ import type { PopsPanelDeepMenuDetails } from "./components-deepMenu";
14
+ import type { PopsPanelOwnDetails } from "./components-own";
15
+ import type { PopsHeaderCloseButtonDetails } from "../../../types/button";
16
+ import { PopsPanelSelectMultipleDetails } from "./components-selectMultiple";
17
17
 
18
18
  /** panel的各种类型的配置项 */
19
19
  export type PopsPanelFormsTotalDetails =
@@ -1,4 +1,4 @@
1
- import type { PopsPromptDetails } from "./indexType";
1
+ import type { PopsPromptDetails } from "./types/index";
2
2
 
3
3
  export const PopsPromptConfig = (): DeepRequired<PopsPromptDetails> => {
4
4
  return {
@@ -1,50 +1,18 @@
1
- .pops[type-value] .pops-prompt-title {
2
- display: flex;
3
- align-items: center;
4
- justify-content: space-between;
1
+ .pops[type-value="prompt"] {
2
+ --input-color: #000000;
3
+ --input-bg-color: none;
4
+ --input-placeholder-color: #a1a4ac;
5
5
  }
6
- .pops[type-value="prompt"] .pops-prompt-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="prompt"] .pops-prompt-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
- align-content: center;
21
- }
22
- .pops[type-value="prompt"] .pops-prompt-content {
23
- width: 100%;
24
- /*height: calc(
25
- 100% - var(--container-title-height) - var(--container-bottom-btn-height)
26
- );*/
27
- flex: 1;
28
- overflow: auto;
29
- word-break: break-word;
30
- }
31
- .pops[type-value="prompt"] .pops-prompt-content p[pops] {
32
- padding: 5px 10px;
33
- color: rgb(51, 51, 51);
34
- text-indent: 15px;
35
- }
36
- .pops[type-value="prompt"] .pops-prompt-btn {
37
- display: flex;
38
- padding: 10px 10px 10px 10px;
6
+ .pops[type-value="prompt"] input[pops],
7
+ .pops[type-value="prompt"] textarea[pops] {
39
8
  width: 100%;
40
- height: var(--container-bottom-btn-height);
41
- max-height: var(--container-bottom-btn-height);
42
- line-height: normal;
43
- align-content: center;
44
- border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
45
- text-align: right;
46
- align-items: center;
9
+ height: 100%;
10
+ outline: 0;
11
+ border: 0;
12
+ color: var(--input-color);
13
+ background-color: var(--input-bg-color);
47
14
  }
15
+
48
16
  .pops[type-value="prompt"] input[pops] {
49
17
  padding: 5px 10px;
50
18
  }
@@ -52,11 +20,15 @@
52
20
  padding: 5px 10px;
53
21
  resize: none;
54
22
  }
55
- .pops[type-value="prompt"] input[pops],
56
- .pops[type-value="prompt"] textarea[pops] {
57
- width: 100%;
58
- height: 100%;
59
- outline: 0;
60
- border: 0;
61
- color: rgb(51, 51, 51);
23
+
24
+ .pops[type-value="prompt"] input[pops]::placeholder,
25
+ .pops[type-value="prompt"] textarea[pops]::placeholder {
26
+ color: var(--input-placeholder-color);
27
+ }
28
+ @media (prefers-color-scheme: dark) {
29
+ .pops[type-value="prompt"] {
30
+ --input-color: #ffffff;
31
+ --input-bg-color: #333333;
32
+ --input-placeholder-color: #8d9095;
33
+ }
62
34
  }