@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
@@ -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 { PopsPromptConfig } from "./config";
9
- import type { PopsPromptDetails } from "./indexType";
9
+ import type { PopsPromptDetails } from "./types/index";
10
10
 
11
11
  export const PopsPrompt = {
12
12
  init(details: PopsPromptDetails) {
@@ -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") +
@@ -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.prompt
@@ -1,5 +1,5 @@
1
1
  import { PopsIcon } from "../../PopsIcon";
2
- import type { PopsRightClickMenuDetails } from "./indexType";
2
+ import type { PopsRightClickMenuDetails } from "./types";
3
3
 
4
4
  export const rightClickMenuConfig =
5
5
  (): DeepRequired<PopsRightClickMenuDetails> => {
@@ -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
+ }
@@ -1,4 +1,4 @@
1
- import { OriginPrototype } from "../../Core";
1
+ import { OriginPrototype } from "../../PopsCore";
2
2
  import { GlobalConfig } from "../../GlobalConfig";
3
3
  import { PopsHandler } from "../../handler/PopsHandler";
4
4
  import { popsDOMUtils } from "../../utils/PopsDOMUtils";
@@ -8,7 +8,7 @@ import { rightClickMenuConfig as PopsRightClickMenuConfig } from "./config";
8
8
  import type {
9
9
  PopsRightClickMenuDataDetails,
10
10
  PopsRightClickMenuDetails,
11
- } from "./indexType";
11
+ } from "./types";
12
12
  import { PopsCSS } from "../../PopsCSS";
13
13
  import { PopsIcon } from "../../PopsIcon";
14
14
 
@@ -1,5 +1,5 @@
1
- import type { PopsCommonConfig } from "../../types/components";
2
- import type { PopsIconType } from "../../types/icon";
1
+ import type { PopsCommonConfig } from "../../../types/components";
2
+ import type { PopsIconType } from "../../../types/icon";
3
3
 
4
4
  /**
5
5
  * pops.rightClickMenu的右键菜单配置
@@ -1,4 +1,4 @@
1
- import type { PopsSearchSuggestionDetails } from "./indexType";
1
+ import type { PopsSearchSuggestionDetails } from "./types/index";
2
2
 
3
3
  export const searchSuggestionConfig =
4
4
  (): DeepRequired<PopsSearchSuggestionDetails> => {
@@ -4,7 +4,7 @@ import { popsUtils } from "../../utils/PopsUtils";
4
4
  import { searchSuggestionConfig as PopsSearchSuggestionConfig } from "./config";
5
5
  import { GlobalConfig } from "../../GlobalConfig";
6
6
  import { PopsSafeUtils } from "../../utils/PopsSafeUtils";
7
- import type { PopsSearchSuggestionDetails } from "./indexType";
7
+ import type { PopsSearchSuggestionDetails } from "./types/index";
8
8
  import { PopsCSS } from "../../PopsCSS";
9
9
 
10
10
  export const PopsSearchSuggestion = {
@@ -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
  },
@@ -1,4 +1,4 @@
1
- import type { PopsCommonConfig } from "../../types/components";
1
+ import type { PopsCommonConfig } from "../../../types/components";
2
2
 
3
3
  /**
4
4
  * 搜索建议悬浮窗
@@ -1,4 +1,4 @@
1
- import type { PopsToolTipDetails } from "./indexType";
1
+ import type { PopsToolTipDetails } from "./types/index";
2
2
 
3
3
  export const PopsTooltipConfig = (): DeepRequired<PopsToolTipDetails> => {
4
4
  // @ts-ignore
@@ -1,25 +1,32 @@
1
1
  .pops-tip {
2
+ --pops-bg-opacity: 1;
2
3
  --tooltip-color: #4e4e4e;
3
4
  --tooltip-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));
4
5
  --tooltip-bd-radius: 2px;
6
+ --tooltip-box-shadow-left-color: rgba(0, 0, 0, 0.24);
7
+ --tooltip-box-shadow-right-color: rgba(0, 0, 0, 0.12);
5
8
  --tooltip-font-size: 14px;
6
9
  --tooltip-padding-top: 13px;
7
10
  --tooltip-padding-right: 13px;
8
11
  --tooltip-padding-bottom: 13px;
9
12
  --tooltip-padding-left: 13px;
10
13
 
14
+ --tooltip-arrow-box-shadow-left-color: rgba(0, 0, 0, 0.24);
15
+ --tooltip-arrow-box-shadow-right-color: rgba(0, 0, 0, 0.12);
11
16
  --tooltip-arrow--after-color: rgb(78, 78, 78);
12
17
  --tooltip-arrow--after-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));
13
18
  --tooltip-arrow--after-width: 12px;
14
19
  --tooltip-arrow--after-height: 12px;
15
-
20
+ }
21
+ .pops-tip {
16
22
  padding: var(--tooltip-padding-top) var(--tooltip-padding-right)
17
23
  var(--tooltip-padding-bottom) var(--tooltip-padding-left);
18
24
  max-width: 400px;
19
25
  max-height: 300px;
20
26
  border-radius: var(--tooltip-bd-radius);
21
27
  background-color: var(--tooltip-bg-color);
22
- box-shadow: 0 1.5px 4px rgba(0, 0, 0, 0.24), 0 1.5px 6px rgba(0, 0, 0, 0.12);
28
+ box-shadow: 0 1.5px 4px var(--tooltip-box-shadow-left-color),
29
+ 0 1.5px 6px var(--tooltip-box-shadow-right-color);
23
30
  color: var(--tooltip-color);
24
31
  font-size: var(--tooltip-font-size);
25
32
  }
@@ -29,22 +36,7 @@
29
36
  .pops-tip[data-position="fixed"] {
30
37
  position: fixed;
31
38
  }
32
- /* github的样式 */
33
- .pops-tip.github-tooltip {
34
- --tooltip-bg-opacity: 1;
35
- --tooltip-color: rgb(255, 255, 255);
36
- --tooltip-bg-color: rgb(36, 41, 47, var(--tooltip-bg-opacity));
37
- --tooltip-bd-radius: 6px;
38
- --tooltip-padding-top: 6px;
39
- --tooltip-padding-right: 8px;
40
- --tooltip-padding-bottom: 6px;
41
- --tooltip-padding-left: 8px;
42
39
 
43
- --tooltip-arrow--after-color: rgb(255, 255, 255);
44
- --tooltip-arrow--after-bg-color: rgb(36, 41, 47, var(--tooltip-bg-opacity));
45
- --tooltip-arrow--after-width: 8px;
46
- --tooltip-arrow--after-height: 8px;
47
- }
48
40
  .pops-tip .pops-tip-arrow {
49
41
  position: absolute;
50
42
  top: 100%;
@@ -63,7 +55,8 @@
63
55
  height: var(--tooltip-arrow--after-height);
64
56
  background: var(--tooltip-arrow--after-bg-color);
65
57
  color: var(--tooltip-arrow--after-color);
66
- box-shadow: 0 1px 7px rgba(0, 0, 0, 0.24), 0 1px 7px rgba(0, 0, 0, 0.12);
58
+ box-shadow: 0 1px 7px var(--tooltip-arrow-box-shadow-left-color),
59
+ 0 1px 7px var(--tooltip-arrow-box-shadow-right-color);
67
60
  content: "";
68
61
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
69
62
  }
@@ -85,7 +78,8 @@
85
78
  width: var(--tooltip-arrow--after-width);
86
79
  height: var(--tooltip-arrow--after-height);
87
80
  background: var(--tooltip-arrow--after-bg-color);
88
- box-shadow: 0 1px 7px rgba(0, 0, 0, 0.24), 0 1px 7px rgba(0, 0, 0, 0.12);
81
+ box-shadow: 0 1px 7px var(--tooltip-arrow-box-shadow-left-color),
82
+ 0 1px 7px var(--tooltip-arrow-box-shadow-right-color);
89
83
  content: "";
90
84
  transform: translateX(-50%) translateY(-50%) rotate(45deg);
91
85
  }
@@ -174,3 +168,29 @@
174
168
  -webkit-animation-name: pops-motion-fadeInRight;
175
169
  animation-name: pops-motion-fadeInRight;
176
170
  }
171
+
172
+ /* github的样式 */
173
+ .pops-tip.github-tooltip {
174
+ --tooltip-bg-opacity: 1;
175
+ --tooltip-color: #ffffff;
176
+ --tooltip-bg-color: rgb(36, 41, 47, var(--tooltip-bg-opacity));
177
+ --tooltip-bd-radius: 6px;
178
+ --tooltip-padding-top: 6px;
179
+ --tooltip-padding-right: 8px;
180
+ --tooltip-padding-bottom: 6px;
181
+ --tooltip-padding-left: 8px;
182
+
183
+ --tooltip-arrow--after-color: rgb(255, 255, 255);
184
+ --tooltip-arrow--after-bg-color: rgb(36, 41, 47, var(--tooltip-bg-opacity));
185
+ --tooltip-arrow--after-width: 8px;
186
+ --tooltip-arrow--after-height: 8px;
187
+ }
188
+
189
+ @media (prefers-color-scheme: dark) {
190
+ .pops-tip {
191
+ --tooltip-color: #ffffff;
192
+ --tooltip-bg-color: #fafafa;
193
+ --tooltip-arrow--after-color: #fafafa;
194
+ --tooltip-arrow--after-bg-color: rgb(250, 250, 250, var(--pops-bg-opacity));
195
+ }
196
+ }
@@ -5,7 +5,7 @@ import { popsDOMUtils } from "../../utils/PopsDOMUtils";
5
5
  import { PopsSafeUtils } from "../../utils/PopsSafeUtils";
6
6
  import { popsUtils } from "../../utils/PopsUtils";
7
7
  import { PopsTooltipConfig } from "./config";
8
- import type { PopsToolTipDetails } from "./indexType";
8
+ import type { PopsToolTipDetails } from "./types/index";
9
9
 
10
10
  type ToolTipEventTypeName = "MouseEvent" | "TouchEvent";
11
11
 
@@ -1,4 +1,4 @@
1
- import type { PopsCommonConfig } from "../../types/components";
1
+ import type { PopsCommonConfig } from "../../../types/components";
2
2
 
3
3
  /** tooltip的出现位置 */
4
4
  export type PopsTooltipPosition =