@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.
- package/dist/index.amd.js +172 -112
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +172 -112
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +172 -112
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +172 -112
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +172 -112
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +172 -112
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/GlobalConfig.d.ts +7 -2
- package/dist/types/src/Pops.d.ts +52 -34
- package/dist/types/src/{Core.d.ts → PopsCore.d.ts} +4 -3
- package/dist/types/src/PopsIcon.d.ts +30 -2
- package/dist/types/src/PopsLayer.d.ts +3 -1
- package/dist/types/src/components/alert/config.d.ts +1 -1
- package/dist/types/src/components/alert/index.d.ts +1 -1
- package/dist/types/src/components/alert/{indexType.d.ts → types/index.d.ts} +2 -2
- package/dist/types/src/components/confirm/config.d.ts +1 -1
- package/dist/types/src/components/confirm/index.d.ts +1 -1
- package/dist/types/src/components/confirm/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/drawer/config.d.ts +1 -1
- package/dist/types/src/components/drawer/index.d.ts +1 -1
- package/dist/types/src/components/drawer/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/folder/config.d.ts +1 -1
- package/dist/types/src/components/folder/index.d.ts +1 -1
- package/dist/types/src/components/folder/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/iframe/config.d.ts +1 -1
- package/dist/types/src/components/iframe/index.d.ts +1 -1
- package/dist/types/src/components/iframe/{indexType.d.ts → types/index.d.ts} +2 -2
- package/dist/types/src/components/loading/config.d.ts +1 -1
- package/dist/types/src/components/loading/index.d.ts +1 -1
- package/dist/types/src/components/loading/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/panel/config.d.ts +1 -1
- package/dist/types/src/components/panel/{PanelHandleContentDetails.d.ts → handlerComponents.d.ts} +16 -13
- package/dist/types/src/components/panel/index.d.ts +1 -1
- package/dist/types/src/components/panel/{buttonType.d.ts → types/components-button.d.ts} +3 -3
- package/dist/types/src/components/panel/{commonType.d.ts → types/components-common.d.ts} +2 -2
- package/dist/types/src/components/panel/{deepMenuType.d.ts → types/components-deepMenu.d.ts} +3 -3
- package/dist/types/src/components/panel/{formsType.d.ts → types/components-forms.d.ts} +2 -2
- package/dist/types/src/components/panel/{inputType.d.ts → types/components-input.d.ts} +1 -1
- package/dist/types/src/components/panel/{ownType.d.ts → types/components-own.d.ts} +1 -1
- package/dist/types/src/components/panel/{selectType.d.ts → types/components-select.d.ts} +3 -3
- package/dist/types/src/components/panel/{selectMultipleType.d.ts → types/components-selectMultiple.d.ts} +2 -2
- package/dist/types/src/components/panel/{sliderType.d.ts → types/components-slider.d.ts} +1 -1
- package/dist/types/src/components/panel/{switchType.d.ts → types/components-switch.d.ts} +1 -1
- package/dist/types/src/components/panel/{textareaType.d.ts → types/components-textarea.d.ts} +1 -1
- package/dist/types/src/components/panel/{indexType.d.ts → types/index.d.ts} +12 -12
- package/dist/types/src/components/prompt/config.d.ts +1 -1
- package/dist/types/src/components/prompt/index.d.ts +1 -1
- package/dist/types/src/components/prompt/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/rightClickMenu/config.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/index.d.ts +2 -2
- package/dist/types/src/components/rightClickMenu/{indexType.d.ts → types/index.d.ts} +2 -2
- package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
- package/dist/types/src/components/searchSuggestion/index.d.ts +2 -2
- package/dist/types/src/components/searchSuggestion/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/tooltip/config.d.ts +1 -1
- package/dist/types/src/components/tooltip/index.d.ts +2 -2
- package/dist/types/src/components/tooltip/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/handler/PopsHandler.d.ts +8 -8
- package/dist/types/src/types/button.d.ts +5 -39
- package/dist/types/src/types/event.d.ts +1 -1
- package/dist/types/src/types/main.d.ts +18 -18
- package/dist/types/src/types/mask.d.ts +7 -7
- package/dist/types/src/{Config.d.ts → utils/PopsDOMUtilsEventsConfig.d.ts} +3 -0
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +8 -8
- package/package.json +3 -2
- package/src/GlobalConfig.ts +6 -5
- package/src/Pops.ts +30 -17
- package/src/{Core.ts → PopsCore.ts} +13 -14
- package/src/PopsIcon.ts +34 -32
- package/src/PopsLayer.ts +8 -7
- package/src/components/alert/config.ts +1 -1
- package/src/components/alert/index.css +0 -47
- package/src/components/alert/index.ts +3 -3
- package/src/components/alert/{indexType.ts → types/index.ts} +2 -2
- package/src/components/confirm/config.ts +1 -1
- package/src/components/confirm/index.css +0 -47
- package/src/components/confirm/index.ts +5 -5
- package/src/components/confirm/{indexType.ts → types/index.ts} +1 -1
- package/src/components/drawer/config.ts +1 -1
- package/src/components/drawer/index.css +0 -17
- package/src/components/drawer/index.ts +3 -4
- package/src/components/drawer/{indexType.ts → types/index.ts} +1 -1
- package/src/components/folder/config.ts +24 -10
- package/src/components/folder/index.css +67 -62
- package/src/components/folder/index.ts +5 -5
- package/src/components/folder/{indexType.ts → types/index.ts} +1 -1
- package/src/components/iframe/config.ts +1 -1
- package/src/components/iframe/index.css +3 -33
- package/src/components/iframe/index.ts +9 -9
- package/src/components/iframe/{indexType.ts → types/index.ts} +2 -2
- package/src/components/loading/config.ts +1 -1
- package/src/components/loading/index.css +17 -12
- package/src/components/loading/index.ts +6 -6
- package/src/components/loading/{indexType.ts → types/index.ts} +1 -1
- package/src/components/panel/config.ts +1 -1
- package/src/components/panel/{PanelHandleContentDetails.ts → handlerComponents.ts} +29 -15
- package/src/components/panel/index.css +136 -63
- package/src/components/panel/index.ts +6 -6
- package/src/components/panel/{buttonType.ts → types/components-button.ts} +5 -4
- package/src/components/panel/{commonType.ts → types/components-common.ts} +2 -2
- package/src/components/panel/{deepMenuType.ts → types/components-deepMenu.ts} +3 -3
- package/src/components/panel/{formsType.ts → types/components-forms.ts} +2 -2
- package/src/components/panel/{inputType.ts → types/components-input.ts} +1 -1
- package/src/components/panel/{ownType.ts → types/components-own.ts} +1 -1
- package/src/components/panel/{selectType.ts → types/components-select.ts} +3 -3
- package/src/components/panel/{selectMultipleType.ts → types/components-selectMultiple.ts} +2 -2
- package/src/components/panel/{sliderType.ts → types/components-slider.ts} +1 -1
- package/src/components/panel/{switchType.ts → types/components-switch.ts} +1 -1
- package/src/components/panel/{textareaType.ts → types/components-textarea.ts} +1 -1
- package/src/components/panel/{indexType.ts → types/index.ts} +12 -12
- package/src/components/prompt/config.ts +1 -1
- package/src/components/prompt/index.css +23 -51
- package/src/components/prompt/index.ts +7 -7
- package/src/components/prompt/{indexType.ts → types/index.ts} +1 -1
- package/src/components/rightClickMenu/config.ts +1 -1
- package/src/components/rightClickMenu/index.css +14 -3
- package/src/components/rightClickMenu/index.ts +2 -2
- package/src/components/rightClickMenu/{indexType.ts → types/index.ts} +2 -2
- package/src/components/searchSuggestion/config.ts +1 -1
- package/src/components/searchSuggestion/index.ts +21 -6
- package/src/components/searchSuggestion/{indexType.ts → types/index.ts} +1 -1
- package/src/components/tooltip/config.ts +1 -1
- package/src/components/tooltip/index.css +39 -19
- package/src/components/tooltip/index.ts +1 -1
- package/src/components/tooltip/{indexType.ts → types/index.ts} +1 -1
- package/src/css/button.css +354 -98
- package/src/css/index.css +88 -16
- package/src/handler/PopsElementHandler.ts +5 -5
- package/src/handler/PopsHandler.ts +26 -26
- package/src/types/button.d.ts +5 -39
- package/src/types/event.d.ts +1 -1
- package/src/types/main.d.ts +18 -18
- package/src/types/mask.d.ts +7 -7
- package/src/utils/PopsDOMUtils.ts +2 -2
- package/src/{Config.ts → utils/PopsDOMUtilsEventsConfig.ts} +3 -0
- package/src/utils/PopsInstanceUtils.ts +12 -12
- 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 "./
|
|
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-
|
|
53
|
-
|
|
54
|
-
|
|
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-
|
|
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
|
|
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:
|
|
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:
|
|
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 "../../
|
|
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 "./
|
|
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 "
|
|
2
|
-
import type { PopsIconType } from "
|
|
1
|
+
import type { PopsCommonConfig } from "../../../types/components";
|
|
2
|
+
import type { PopsIconType } from "../../../types/icon";
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* pops.rightClickMenu的右键菜单配置
|
|
@@ -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 "./
|
|
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:
|
|
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
|
|
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:
|
|
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:
|
|
181
|
+
color: var(--search-suggestion-item-none-color);
|
|
175
182
|
}
|
|
176
183
|
ul.pops-${PopsType}-search-suggestion-hint li:hover{
|
|
177
|
-
background-color:
|
|
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,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
|
|
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
|
|
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
|
|
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 "./
|
|
8
|
+
import type { PopsToolTipDetails } from "./types/index";
|
|
9
9
|
|
|
10
10
|
type ToolTipEventTypeName = "MouseEvent" | "TouchEvent";
|
|
11
11
|
|