@v-c/dialog 0.0.4 → 1.0.1
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/Dialog/index.js +7 -1
- package/package.json +4 -4
- package/dist/Dialog/Content/Panel.cjs +0 -366
- package/dist/Dialog/Content/index.cjs +0 -329
- package/dist/Dialog/Mask.cjs +0 -53
- package/dist/Dialog/index.cjs +0 -376
- package/dist/DialogWrap.cjs +0 -294
- package/dist/IDialogPropTypes.cjs +0 -1
- package/dist/_virtual/rolldown_runtime.cjs +0 -21
- package/dist/context.cjs +0 -26
- package/dist/index.cjs +0 -9
- package/dist/util.cjs +0 -32
package/dist/util.cjs
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
function getMotionName(prefixCls, transitionName, animationName) {
|
|
3
|
-
let motionName = transitionName;
|
|
4
|
-
if (!motionName && animationName) motionName = `${prefixCls}-${animationName}`;
|
|
5
|
-
return motionName;
|
|
6
|
-
}
|
|
7
|
-
function getScroll(w, top) {
|
|
8
|
-
let ret = w[`page${top ? "Y" : "X"}Offset`];
|
|
9
|
-
const method = `scroll${top ? "Top" : "Left"}`;
|
|
10
|
-
if (typeof ret !== "number") {
|
|
11
|
-
const d = w.document;
|
|
12
|
-
ret = d.documentElement[method];
|
|
13
|
-
if (typeof ret !== "number") ret = d.body[method];
|
|
14
|
-
}
|
|
15
|
-
return ret;
|
|
16
|
-
}
|
|
17
|
-
function offset(el) {
|
|
18
|
-
const rect = el.getBoundingClientRect();
|
|
19
|
-
const pos = {
|
|
20
|
-
left: rect.left,
|
|
21
|
-
top: rect.top
|
|
22
|
-
};
|
|
23
|
-
const doc = el.ownerDocument;
|
|
24
|
-
const w = doc.defaultView || doc.parentWindow;
|
|
25
|
-
if (w) {
|
|
26
|
-
pos.left += getScroll(w);
|
|
27
|
-
pos.top += getScroll(w, true);
|
|
28
|
-
}
|
|
29
|
-
return pos;
|
|
30
|
-
}
|
|
31
|
-
exports.getMotionName = getMotionName;
|
|
32
|
-
exports.offset = offset;
|