@whitesev/pops 2.1.5 → 2.1.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.
Files changed (41) hide show
  1. package/dist/index.amd.js +101 -49
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +101 -49
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +101 -49
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +101 -49
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +101 -49
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +101 -49
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/Pops.d.ts +13 -0
  14. package/dist/types/src/types/button.d.ts +8 -39
  15. package/package.json +3 -2
  16. package/src/Pops.ts +14 -1
  17. package/src/components/alert/index.css +0 -47
  18. package/src/components/alert/index.ts +2 -2
  19. package/src/components/confirm/index.css +0 -47
  20. package/src/components/confirm/index.ts +4 -4
  21. package/src/components/drawer/index.css +0 -17
  22. package/src/components/drawer/index.ts +2 -3
  23. package/src/components/folder/config.ts +23 -9
  24. package/src/components/folder/index.css +67 -62
  25. package/src/components/folder/index.ts +4 -4
  26. package/src/components/iframe/index.css +3 -33
  27. package/src/components/iframe/index.ts +5 -5
  28. package/src/components/loading/index.css +17 -12
  29. package/src/components/loading/index.ts +5 -5
  30. package/src/components/panel/handlerComponents.ts +12 -1
  31. package/src/components/panel/index.css +136 -63
  32. package/src/components/panel/index.ts +2 -2
  33. package/src/components/prompt/index.css +23 -51
  34. package/src/components/prompt/index.ts +6 -6
  35. package/src/components/rightClickMenu/index.css +14 -3
  36. package/src/components/searchSuggestion/index.ts +20 -5
  37. package/src/components/tooltip/index.css +39 -19
  38. package/src/css/button.css +354 -98
  39. package/src/css/index.css +88 -16
  40. package/src/handler/PopsElementHandler.ts +2 -2
  41. package/src/types/button.d.ts +8 -39
@@ -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
  }
@@ -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>
@@ -2159,6 +2159,7 @@ export const PanelHandlerComponents = () => {
2159
2159
  --el-text-color-regular: #606266;
2160
2160
  --el-color-primary: #409eff;
2161
2161
  --el-fill-color-light: #f5f7fa;
2162
+ --el-disable-color: #a8abb2;
2162
2163
  }
2163
2164
  .select-item{
2164
2165
  cursor: pointer;
@@ -2176,7 +2177,7 @@ export const PanelHandlerComponents = () => {
2176
2177
  .select-item[aria-disabled],
2177
2178
  .select-item[disabled]{
2178
2179
  cursor: not-allowed;
2179
- color: #a8abb2;
2180
+ color: var(--el-disable-color);
2180
2181
  background: unset;
2181
2182
  }
2182
2183
  .select-item:hover{
@@ -2204,6 +2205,16 @@ export const PanelHandlerComponents = () => {
2204
2205
  width: 12px;
2205
2206
  height: 12px;
2206
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
+
2207
2218
  ${style || ""}
2208
2219
  `,
2209
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
+ }
@@ -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>
@@ -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
  }
@@ -49,19 +49,19 @@ export const PopsPrompt = {
49
49
  PopsType,
50
50
  config,
51
51
  /*html*/ `
52
- <div class="pops-prompt-title" style="text-align: ${
53
- config.title.position
54
- };${headerStyle}">${
52
+ <div class="pops-title pops-${PopsType}-title" style="text-align: ${
53
+ config.title.position
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-prompt-content" style="${contentPStyle}">${
59
+ <div class="pops-content pops-${PopsType}-content" style="${contentPStyle}">${
60
60
  config.content.row
61
- ? '<textarea pops="" placeholder="' +
61
+ ? '<textarea name="pops-input-text" pops="" placeholder="' +
62
62
  config.content.placeholder +
63
63
  '"></textarea>'
64
- : '<input pops="" placeholder="' +
64
+ : '<input name="pops-input-text" pops="" placeholder="' +
65
65
  config.content.placeholder +
66
66
  '" type="' +
67
67
  (config.content.password ? "password" : "text") +
@@ -1,3 +1,8 @@
1
+ .pops-rightClickMenu {
2
+ --right-context-menu-shadow-color: #cacaca;
3
+ --right-context-menu-row-visited-color: #dfdfdf;
4
+ --right-context-menu-row-hover-color: #dfdfdf;
5
+ }
1
6
  .pops-rightClickMenu * {
2
7
  -webkit-box-sizing: border-box;
3
8
  box-sizing: border-box;
@@ -14,7 +19,7 @@
14
19
  font-size: 16px;
15
20
  font-weight: 500;
16
21
  background: #fff;
17
- box-shadow: 0px 1px 6px 1px #cacaca;
22
+ box-shadow: 0px 1px 6px 1px var(--right-context-menu-shadow-color);
18
23
  }
19
24
  .pops-rightClickMenu-anim-grid {
20
25
  display: grid;
@@ -25,7 +30,7 @@
25
30
  grid-template-rows: 1fr;
26
31
  }
27
32
  .pops-rightClickMenu-is-visited {
28
- background: #dfdfdf;
33
+ background: var(--right-context-menu-row-visited-color);
29
34
  }
30
35
  i.pops-rightClickMenu-icon {
31
36
  height: 1em;
@@ -45,7 +50,7 @@ i.pops-rightClickMenu-icon[is-loading="true"] {
45
50
  animation: rotating 2s linear infinite;
46
51
  }
47
52
  .pops-rightClickMenu li:hover {
48
- background: #dfdfdf;
53
+ background: var(--right-context-menu-row-hover-color);
49
54
  cursor: pointer;
50
55
  }
51
56
  .pops-rightClickMenu ul {
@@ -71,3 +76,9 @@ i.pops-rightClickMenu-icon[is-loading="true"] {
71
76
  -ms-user-select: none;
72
77
  align-items: center;
73
78
  }
79
+
80
+ @media (prefers-color-scheme: dark) {
81
+ .pops-rightClickMenu {
82
+ --right-context-menu-shadow-color: #3c3c3c;
83
+ }
84
+ }
@@ -129,6 +129,13 @@ export const PopsSearchSuggestion = {
129
129
  -o-animation: searchSelectFalIn 0.5s 1 linear;
130
130
  -ms-animation: searchSelectFalIn 0.5s 1 linear;
131
131
  }
132
+ .pops-${PopsType}-search-suggestion{
133
+ --search-suggestion-bg-color: #ffffff;
134
+ --search-suggestion-box-shadow-color: rgb(0 0 0 / 20%);
135
+ --search-suggestion-item-color: #515a6e;
136
+ --search-suggestion-item-none-color: #8e8e8e;
137
+ --search-suggestion-item-hover-bg-color: rgba(0, 0, 0, .1);
138
+ }
132
139
  .pops-${PopsType}-search-suggestion{
133
140
  border: initial;
134
141
  overflow: initial;
@@ -142,10 +149,10 @@ export const PopsSearchSuggestion = {
142
149
  overflow-x: hidden;
143
150
  overflow-y: auto;
144
151
  padding: 5px 0;
145
- background-color: #fff;
152
+ background-color: var(--search-suggestion-bg-color);
146
153
  box-sizing: border-box;
147
154
  border-radius: 4px;
148
- box-shadow: 0 1px 6px rgb(0 0 0 / 20%);
155
+ box-shadow: 0 1px 6px var(--search-suggestion-box-shadow-color);
149
156
  }
150
157
  /* 建议框在上面时 */
151
158
  ul.pops-${PopsType}-search-suggestion-hint[data-top-reverse]{
@@ -159,7 +166,7 @@ export const PopsSearchSuggestion = {
159
166
  padding: 7px;
160
167
  margin: 0;
161
168
  clear: both;
162
- color: #515a6e;
169
+ color: var(--search-suggestion-item-color);
163
170
  font-size: 14px;
164
171
  list-style: none;
165
172
  cursor: pointer;
@@ -171,10 +178,18 @@ export const PopsSearchSuggestion = {
171
178
  ul.pops-${PopsType}-search-suggestion-hint li[data-none]{
172
179
  text-align: center;
173
180
  font-size: 12px;
174
- color: #8e8e8e;
181
+ color: var(--search-suggestion-item-none-color);
175
182
  }
176
183
  ul.pops-${PopsType}-search-suggestion-hint li:hover{
177
- background-color: rgba(0, 0, 0, .1);
184
+ background-color: var(--search-suggestion-item-hover-bg-color);
185
+ }
186
+
187
+ @media (prefers-color-scheme: dark){
188
+ .pops-${PopsType}-search-suggestion{
189
+ --search-suggestion-bg-color: #1d1e1f;
190
+ --search-suggestion-item-color: #cfd3d4;
191
+ --search-suggestion-item-hover-bg-color: rgba(175, 175, 175, .1);
192
+ }
178
193
  }
179
194
  `;
180
195
  },