@anoki/fse-ui 1.0.595 → 1.0.596
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.cjs218.js +1 -1
- package/dist/index.cjs219.js +1 -1
- package/dist/index.cjs219.js.map +1 -1
- package/dist/index.cjs225.js +1 -1
- package/dist/index.cjs235.js +1 -1
- package/dist/index.cjs242.js +1 -1
- package/dist/index.cjs249.js +1 -1
- package/dist/index.cjs254.js +1 -1
- package/dist/index.cjs261.js +1 -1
- package/dist/index.cjs269.js +1 -1
- package/dist/index.cjs308.js +1 -1
- package/dist/index.cjs335.js +1 -1
- package/dist/index.cjs344.js +1 -1
- package/dist/index.cjs351.js +1 -1
- package/dist/index.cjs361.js +1 -1
- package/dist/index.cjs362.js +1 -1
- package/dist/{index.cjs364.js → index.cjs365.js} +1 -1
- package/dist/{index.cjs364.js.map → index.cjs365.js.map} +1 -1
- package/dist/index.cjs368.js +1 -1
- package/dist/index.cjs368.js.map +1 -1
- package/dist/index.cjs369.js +1 -1
- package/dist/index.cjs369.js.map +1 -1
- package/dist/index.cjs370.js +1 -1
- package/dist/index.cjs370.js.map +1 -1
- package/dist/index.cjs373.js +2 -0
- package/dist/index.cjs373.js.map +1 -0
- package/dist/{index.cjs383.js → index.cjs375.js} +1 -1
- package/dist/{index.cjs383.js.map → index.cjs375.js.map} +1 -1
- package/dist/{index.cjs384.js → index.cjs376.js} +1 -1
- package/dist/{index.cjs384.js.map → index.cjs376.js.map} +1 -1
- package/dist/{index.cjs385.js → index.cjs377.js} +1 -1
- package/dist/{index.cjs385.js.map → index.cjs377.js.map} +1 -1
- package/dist/{index.cjs386.js → index.cjs378.js} +1 -1
- package/dist/{index.cjs386.js.map → index.cjs378.js.map} +1 -1
- package/dist/{index.cjs387.js → index.cjs379.js} +2 -2
- package/dist/{index.cjs387.js.map → index.cjs379.js.map} +1 -1
- package/dist/{index.cjs388.js → index.cjs380.js} +1 -1
- package/dist/{index.cjs388.js.map → index.cjs380.js.map} +1 -1
- package/dist/{index.cjs389.js → index.cjs381.js} +1 -1
- package/dist/{index.cjs389.js.map → index.cjs381.js.map} +1 -1
- package/dist/index.cjs396.js +1 -27
- package/dist/index.cjs396.js.map +1 -1
- package/dist/index.cjs397.js +1 -1
- package/dist/index.cjs397.js.map +1 -1
- package/dist/index.cjs398.js +1 -1
- package/dist/index.cjs398.js.map +1 -1
- package/dist/index.cjs399.js +27 -1
- package/dist/index.cjs399.js.map +1 -1
- package/dist/index.cjs400.js +1 -1
- package/dist/index.cjs400.js.map +1 -1
- package/dist/index.cjs401.js +1 -1
- package/dist/index.cjs401.js.map +1 -1
- package/dist/index.cjs407.js +1 -1
- package/dist/index.cjs409.js +1 -1
- package/dist/index.cjs412.js +1 -1
- package/dist/index.cjs420.js +1 -1
- package/dist/index.cjs421.js +1 -1
- package/dist/index.cjs421.js.map +1 -1
- package/dist/index.cjs422.js +1 -1
- package/dist/index.cjs422.js.map +1 -1
- package/dist/index.cjs423.js +1 -1
- package/dist/index.cjs423.js.map +1 -1
- package/dist/index.cjs424.js +1 -1
- package/dist/index.cjs424.js.map +1 -1
- package/dist/index.cjs425.js +1 -1
- package/dist/index.cjs432.js +1 -1
- package/dist/index.cjs434.js +1 -1
- package/dist/index.cjs436.js +1 -1
- package/dist/index.cjs437.js +1 -1
- package/dist/index.cjs446.js +1 -1
- package/dist/index.cjs446.js.map +1 -1
- package/dist/index.cjs447.js +1 -1
- package/dist/index.cjs447.js.map +1 -1
- package/dist/index.cjs448.js +1 -1
- package/dist/index.cjs448.js.map +1 -1
- package/dist/index.cjs449.js +38 -1
- package/dist/index.cjs449.js.map +1 -1
- package/dist/index.cjs450.js +1 -38
- package/dist/index.cjs450.js.map +1 -1
- package/dist/index.cjs451.js +1 -1
- package/dist/index.cjs451.js.map +1 -1
- package/dist/index.cjs452.js +1 -1
- package/dist/index.cjs452.js.map +1 -1
- package/dist/index.cjs453.js +1 -1
- package/dist/index.cjs453.js.map +1 -1
- package/dist/index.es218.js +1 -1
- package/dist/index.es219.js +1 -4
- package/dist/index.es219.js.map +1 -1
- package/dist/index.es225.js +3 -3
- package/dist/index.es235.js +1 -1
- package/dist/index.es242.js +8 -8
- package/dist/index.es249.js +1 -1
- package/dist/index.es254.js +1 -1
- package/dist/index.es261.js +1 -1
- package/dist/index.es269.js +2 -2
- package/dist/index.es308.js +1 -1
- package/dist/index.es335.js +3 -3
- package/dist/index.es344.js +1 -1
- package/dist/index.es351.js +1 -1
- package/dist/index.es361.js +1 -1
- package/dist/index.es362.js +8 -8
- package/dist/{index.es364.js → index.es365.js} +1 -1
- package/dist/{index.es364.js.map → index.es365.js.map} +1 -1
- package/dist/index.es368.js +5 -14
- package/dist/index.es368.js.map +1 -1
- package/dist/index.es369.js +24 -5
- package/dist/index.es369.js.map +1 -1
- package/dist/index.es370.js +67 -23
- package/dist/index.es370.js.map +1 -1
- package/dist/index.es373.js +18 -0
- package/dist/index.es373.js.map +1 -0
- package/dist/{index.es383.js → index.es375.js} +1 -1
- package/dist/{index.es383.js.map → index.es375.js.map} +1 -1
- package/dist/{index.es384.js → index.es376.js} +1 -1
- package/dist/{index.es384.js.map → index.es376.js.map} +1 -1
- package/dist/{index.es385.js → index.es377.js} +1 -1
- package/dist/{index.es385.js.map → index.es377.js.map} +1 -1
- package/dist/{index.es386.js → index.es378.js} +1 -1
- package/dist/{index.es386.js.map → index.es378.js.map} +1 -1
- package/dist/{index.es387.js → index.es379.js} +4 -4
- package/dist/{index.es387.js.map → index.es379.js.map} +1 -1
- package/dist/{index.es388.js → index.es380.js} +1 -1
- package/dist/{index.es388.js.map → index.es380.js.map} +1 -1
- package/dist/{index.es389.js → index.es381.js} +1 -1
- package/dist/{index.es389.js.map → index.es381.js.map} +1 -1
- package/dist/index.es396.js +2019 -3662
- package/dist/index.es396.js.map +1 -1
- package/dist/index.es397.js +59 -5
- package/dist/index.es397.js.map +1 -1
- package/dist/index.es398.js +189 -2
- package/dist/index.es398.js.map +1 -1
- package/dist/index.es399.js +3664 -2021
- package/dist/index.es399.js.map +1 -1
- package/dist/index.es400.js +5 -59
- package/dist/index.es400.js.map +1 -1
- package/dist/index.es401.js +2 -189
- package/dist/index.es401.js.map +1 -1
- package/dist/index.es407.js +1 -1
- package/dist/index.es409.js +1 -1
- package/dist/index.es412.js +1 -1
- package/dist/index.es420.js +3 -3
- package/dist/index.es421.js +24 -82
- package/dist/index.es421.js.map +1 -1
- package/dist/index.es422.js +28 -24
- package/dist/index.es422.js.map +1 -1
- package/dist/index.es423.js +5 -29
- package/dist/index.es423.js.map +1 -1
- package/dist/index.es424.js +83 -5
- package/dist/index.es424.js.map +1 -1
- package/dist/index.es425.js +1 -1
- package/dist/index.es432.js +1 -1
- package/dist/index.es434.js +1 -1
- package/dist/index.es436.js +5 -5
- package/dist/index.es437.js +1 -1
- package/dist/index.es446.js +512 -54
- package/dist/index.es446.js.map +1 -1
- package/dist/index.es447.js +113 -509
- package/dist/index.es447.js.map +1 -1
- package/dist/index.es448.js +123 -121
- package/dist/index.es448.js.map +1 -1
- package/dist/index.es449.js +67 -127
- package/dist/index.es449.js.map +1 -1
- package/dist/index.es450.js +8 -68
- package/dist/index.es450.js.map +1 -1
- package/dist/index.es451.js +14 -9
- package/dist/index.es451.js.map +1 -1
- package/dist/index.es452.js +62 -14
- package/dist/index.es452.js.map +1 -1
- package/dist/index.es453.js +64 -61
- package/dist/index.es453.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs371.js +0 -2
- package/dist/index.cjs371.js.map +0 -1
- package/dist/index.es371.js +0 -72
- package/dist/index.es371.js.map +0 -1
- /package/dist/components/ui/{DoctorConfirmModal/DoctorConfirmModalFooter/DoctorConfirmModalFooter.css → DoctorModal/DoctorModalFooter/DoctorModalFooter.css} +0 -0
package/dist/index.es449.js
CHANGED
@@ -1,132 +1,72 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
}
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
function E(n) {
|
12
|
-
var t;
|
13
|
-
return (t = (p(n) ? n.ownerDocument : n.document) || window.document) == null ? void 0 : t.documentElement;
|
14
|
-
}
|
15
|
-
function p(n) {
|
16
|
-
return c() ? n instanceof Node || n instanceof i(n).Node : !1;
|
17
|
-
}
|
18
|
-
function m(n) {
|
19
|
-
return c() ? n instanceof Element || n instanceof i(n).Element : !1;
|
20
|
-
}
|
21
|
-
function w(n) {
|
22
|
-
return c() ? n instanceof HTMLElement || n instanceof i(n).HTMLElement : !1;
|
23
|
-
}
|
24
|
-
function a(n) {
|
25
|
-
return !c() || typeof ShadowRoot > "u" ? !1 : n instanceof ShadowRoot || n instanceof i(n).ShadowRoot;
|
26
|
-
}
|
27
|
-
function y(n) {
|
28
|
-
const {
|
29
|
-
overflow: t,
|
30
|
-
overflowX: e,
|
31
|
-
overflowY: o,
|
32
|
-
display: r
|
33
|
-
} = b(n);
|
34
|
-
return /auto|scroll|overlay|hidden|clip/.test(t + o + e) && !["inline", "contents"].includes(r);
|
35
|
-
}
|
36
|
-
function D(n) {
|
37
|
-
return ["table", "td", "th"].includes(s(n));
|
38
|
-
}
|
39
|
-
function N(n) {
|
40
|
-
return [":popover-open", ":modal"].some((t) => {
|
41
|
-
try {
|
42
|
-
return n.matches(t);
|
43
|
-
} catch {
|
44
|
-
return !1;
|
45
|
-
}
|
46
|
-
});
|
47
|
-
}
|
48
|
-
function T(n) {
|
49
|
-
const t = L(), e = m(n) ? b(n) : n;
|
50
|
-
return ["transform", "translate", "scale", "rotate", "perspective"].some((o) => e[o] ? e[o] !== "none" : !1) || (e.containerType ? e.containerType !== "normal" : !1) || !t && (e.backdropFilter ? e.backdropFilter !== "none" : !1) || !t && (e.filter ? e.filter !== "none" : !1) || ["transform", "translate", "scale", "rotate", "perspective", "filter"].some((o) => (e.willChange || "").includes(o)) || ["paint", "layout", "strict", "content"].some((o) => (e.contain || "").includes(o));
|
51
|
-
}
|
52
|
-
function k(n) {
|
53
|
-
let t = u(n);
|
54
|
-
for (; w(t) && !g(t); ) {
|
55
|
-
if (T(t))
|
56
|
-
return t;
|
57
|
-
if (N(t))
|
58
|
-
return null;
|
59
|
-
t = u(t);
|
1
|
+
import * as d from "react";
|
2
|
+
import { styleSingleton as f } from "./index.es450.js";
|
3
|
+
import { noScrollbarsClassName as p, zeroRightClassName as g, fullWidthClassName as l, removedBarSizeVariable as v } from "./index.es433.js";
|
4
|
+
import { getGapWidth as m } from "./index.es457.js";
|
5
|
+
var b = f(), e = "data-scroll-locked", h = function(n, a, o, t) {
|
6
|
+
var r = n.left, i = n.top, s = n.right, c = n.gap;
|
7
|
+
return o === void 0 && (o = "margin"), `
|
8
|
+
.`.concat(p, ` {
|
9
|
+
overflow: hidden `).concat(t, `;
|
10
|
+
padding-right: `).concat(c, "px ").concat(t, `;
|
60
11
|
}
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
} : {
|
77
|
-
scrollLeft: n.scrollX,
|
78
|
-
scrollTop: n.scrollY
|
79
|
-
};
|
80
|
-
}
|
81
|
-
function u(n) {
|
82
|
-
if (s(n) === "html")
|
83
|
-
return n;
|
84
|
-
const t = (
|
85
|
-
// Step into the shadow DOM of the parent of a slotted node.
|
86
|
-
n.assignedSlot || // DOM Element detected.
|
87
|
-
n.parentNode || // ShadowRoot detected.
|
88
|
-
a(n) && n.host || // Fallback.
|
89
|
-
E(n)
|
90
|
-
);
|
91
|
-
return a(t) ? t.host : t;
|
92
|
-
}
|
93
|
-
function h(n) {
|
94
|
-
const t = u(n);
|
95
|
-
return g(t) ? n.ownerDocument ? n.ownerDocument.body : n.body : w(t) && y(t) ? t : h(t);
|
96
|
-
}
|
97
|
-
function d(n, t, e) {
|
98
|
-
var o;
|
99
|
-
t === void 0 && (t = []), e === void 0 && (e = !0);
|
100
|
-
const r = h(n), S = r === ((o = n.ownerDocument) == null ? void 0 : o.body), l = i(r);
|
101
|
-
if (S) {
|
102
|
-
const f = v(l);
|
103
|
-
return t.concat(l, l.visualViewport || [], y(r) ? r : [], f && e ? d(f) : []);
|
12
|
+
body[`).concat(e, `] {
|
13
|
+
overflow: hidden `).concat(t, `;
|
14
|
+
overscroll-behavior: contain;
|
15
|
+
`).concat([
|
16
|
+
a && "position: relative ".concat(t, ";"),
|
17
|
+
o === "margin" && `
|
18
|
+
padding-left: `.concat(r, `px;
|
19
|
+
padding-top: `).concat(i, `px;
|
20
|
+
padding-right: `).concat(s, `px;
|
21
|
+
margin-left:0;
|
22
|
+
margin-top:0;
|
23
|
+
margin-right: `).concat(c, "px ").concat(t, `;
|
24
|
+
`),
|
25
|
+
o === "padding" && "padding-right: ".concat(c, "px ").concat(t, ";")
|
26
|
+
].filter(Boolean).join(""), `
|
104
27
|
}
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
28
|
+
|
29
|
+
.`).concat(g, ` {
|
30
|
+
right: `).concat(c, "px ").concat(t, `;
|
31
|
+
}
|
32
|
+
|
33
|
+
.`).concat(l, ` {
|
34
|
+
margin-right: `).concat(c, "px ").concat(t, `;
|
35
|
+
}
|
36
|
+
|
37
|
+
.`).concat(g, " .").concat(g, ` {
|
38
|
+
right: 0 `).concat(t, `;
|
39
|
+
}
|
40
|
+
|
41
|
+
.`).concat(l, " .").concat(l, ` {
|
42
|
+
margin-right: 0 `).concat(t, `;
|
43
|
+
}
|
44
|
+
|
45
|
+
body[`).concat(e, `] {
|
46
|
+
`).concat(v, ": ").concat(c, `px;
|
47
|
+
}
|
48
|
+
`);
|
49
|
+
}, u = function() {
|
50
|
+
var n = parseInt(document.body.getAttribute(e) || "0", 10);
|
51
|
+
return isFinite(n) ? n : 0;
|
52
|
+
}, x = function() {
|
53
|
+
d.useEffect(function() {
|
54
|
+
return document.body.setAttribute(e, (u() + 1).toString()), function() {
|
55
|
+
var n = u() - 1;
|
56
|
+
n <= 0 ? document.body.removeAttribute(e) : document.body.setAttribute(e, n.toString());
|
57
|
+
};
|
58
|
+
}, []);
|
59
|
+
}, C = function(n) {
|
60
|
+
var a = n.noRelative, o = n.noImportant, t = n.gapMode, r = t === void 0 ? "margin" : t;
|
61
|
+
x();
|
62
|
+
var i = d.useMemo(function() {
|
63
|
+
return m(r);
|
64
|
+
}, [r]);
|
65
|
+
return d.createElement(b, { styles: h(i, !a, r, o ? "" : "!important") });
|
66
|
+
};
|
110
67
|
export {
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
v as getFrameElement,
|
115
|
-
h as getNearestOverflowAncestor,
|
116
|
-
s as getNodeName,
|
117
|
-
C as getNodeScroll,
|
118
|
-
d as getOverflowAncestors,
|
119
|
-
u as getParentNode,
|
120
|
-
i as getWindow,
|
121
|
-
T as isContainingBlock,
|
122
|
-
m as isElement,
|
123
|
-
w as isHTMLElement,
|
124
|
-
g as isLastTraversableNode,
|
125
|
-
p as isNode,
|
126
|
-
y as isOverflowElement,
|
127
|
-
a as isShadowRoot,
|
128
|
-
D as isTableElement,
|
129
|
-
N as isTopLayer,
|
130
|
-
L as isWebKit
|
68
|
+
C as RemoveScrollBar,
|
69
|
+
e as lockAttribute,
|
70
|
+
x as useLockAttribute
|
131
71
|
};
|
132
72
|
//# sourceMappingURL=index.es449.js.map
|
package/dist/index.es449.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es449.js","sources":["../node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.mjs"],"sourcesContent":["function hasWindow() {\n return typeof window !== 'undefined';\n}\nfunction getNodeName(node) {\n if (isNode(node)) {\n return (node.nodeName || '').toLowerCase();\n }\n // Mocked nodes in testing environments may not be instances of Node. By\n // returning `#document` an infinite loop won't occur.\n // https://github.com/floating-ui/floating-ui/issues/2317\n return '#document';\n}\nfunction getWindow(node) {\n var _node$ownerDocument;\n return (node == null || (_node$ownerDocument = node.ownerDocument) == null ? void 0 : _node$ownerDocument.defaultView) || window;\n}\nfunction getDocumentElement(node) {\n var _ref;\n return (_ref = (isNode(node) ? node.ownerDocument : node.document) || window.document) == null ? void 0 : _ref.documentElement;\n}\nfunction isNode(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Node || value instanceof getWindow(value).Node;\n}\nfunction isElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof Element || value instanceof getWindow(value).Element;\n}\nfunction isHTMLElement(value) {\n if (!hasWindow()) {\n return false;\n }\n return value instanceof HTMLElement || value instanceof getWindow(value).HTMLElement;\n}\nfunction isShadowRoot(value) {\n if (!hasWindow() || typeof ShadowRoot === 'undefined') {\n return false;\n }\n return value instanceof ShadowRoot || value instanceof getWindow(value).ShadowRoot;\n}\nfunction isOverflowElement(element) {\n const {\n overflow,\n overflowX,\n overflowY,\n display\n } = getComputedStyle(element);\n return /auto|scroll|overlay|hidden|clip/.test(overflow + overflowY + overflowX) && !['inline', 'contents'].includes(display);\n}\nfunction isTableElement(element) {\n return ['table', 'td', 'th'].includes(getNodeName(element));\n}\nfunction isTopLayer(element) {\n return [':popover-open', ':modal'].some(selector => {\n try {\n return element.matches(selector);\n } catch (e) {\n return false;\n }\n });\n}\nfunction isContainingBlock(elementOrCss) {\n const webkit = isWebKit();\n const css = isElement(elementOrCss) ? getComputedStyle(elementOrCss) : elementOrCss;\n\n // https://developer.mozilla.org/en-US/docs/Web/CSS/Containing_block#identifying_the_containing_block\n // https://drafts.csswg.org/css-transforms-2/#individual-transforms\n return ['transform', 'translate', 'scale', 'rotate', 'perspective'].some(value => css[value] ? css[value] !== 'none' : false) || (css.containerType ? css.containerType !== 'normal' : false) || !webkit && (css.backdropFilter ? css.backdropFilter !== 'none' : false) || !webkit && (css.filter ? css.filter !== 'none' : false) || ['transform', 'translate', 'scale', 'rotate', 'perspective', 'filter'].some(value => (css.willChange || '').includes(value)) || ['paint', 'layout', 'strict', 'content'].some(value => (css.contain || '').includes(value));\n}\nfunction getContainingBlock(element) {\n let currentNode = getParentNode(element);\n while (isHTMLElement(currentNode) && !isLastTraversableNode(currentNode)) {\n if (isContainingBlock(currentNode)) {\n return currentNode;\n } else if (isTopLayer(currentNode)) {\n return null;\n }\n currentNode = getParentNode(currentNode);\n }\n return null;\n}\nfunction isWebKit() {\n if (typeof CSS === 'undefined' || !CSS.supports) return false;\n return CSS.supports('-webkit-backdrop-filter', 'none');\n}\nfunction isLastTraversableNode(node) {\n return ['html', 'body', '#document'].includes(getNodeName(node));\n}\nfunction getComputedStyle(element) {\n return getWindow(element).getComputedStyle(element);\n}\nfunction getNodeScroll(element) {\n if (isElement(element)) {\n return {\n scrollLeft: element.scrollLeft,\n scrollTop: element.scrollTop\n };\n }\n return {\n scrollLeft: element.scrollX,\n scrollTop: element.scrollY\n };\n}\nfunction getParentNode(node) {\n if (getNodeName(node) === 'html') {\n return node;\n }\n const result =\n // Step into the shadow DOM of the parent of a slotted node.\n node.assignedSlot ||\n // DOM Element detected.\n node.parentNode ||\n // ShadowRoot detected.\n isShadowRoot(node) && node.host ||\n // Fallback.\n getDocumentElement(node);\n return isShadowRoot(result) ? result.host : result;\n}\nfunction getNearestOverflowAncestor(node) {\n const parentNode = getParentNode(node);\n if (isLastTraversableNode(parentNode)) {\n return node.ownerDocument ? node.ownerDocument.body : node.body;\n }\n if (isHTMLElement(parentNode) && isOverflowElement(parentNode)) {\n return parentNode;\n }\n return getNearestOverflowAncestor(parentNode);\n}\nfunction getOverflowAncestors(node, list, traverseIframes) {\n var _node$ownerDocument2;\n if (list === void 0) {\n list = [];\n }\n if (traverseIframes === void 0) {\n traverseIframes = true;\n }\n const scrollableAncestor = getNearestOverflowAncestor(node);\n const isBody = scrollableAncestor === ((_node$ownerDocument2 = node.ownerDocument) == null ? void 0 : _node$ownerDocument2.body);\n const win = getWindow(scrollableAncestor);\n if (isBody) {\n const frameElement = getFrameElement(win);\n return list.concat(win, win.visualViewport || [], isOverflowElement(scrollableAncestor) ? scrollableAncestor : [], frameElement && traverseIframes ? getOverflowAncestors(frameElement) : []);\n }\n return list.concat(scrollableAncestor, getOverflowAncestors(scrollableAncestor, [], traverseIframes));\n}\nfunction getFrameElement(win) {\n return win.parent && Object.getPrototypeOf(win.parent) ? win.frameElement : null;\n}\n\nexport { getComputedStyle, getContainingBlock, getDocumentElement, getFrameElement, getNearestOverflowAncestor, getNodeName, getNodeScroll, getOverflowAncestors, getParentNode, getWindow, isContainingBlock, isElement, isHTMLElement, isLastTraversableNode, isNode, isOverflowElement, isShadowRoot, isTableElement, isTopLayer, isWebKit };\n"],"names":["hasWindow","getNodeName","node","isNode","getWindow","_node$ownerDocument","getDocumentElement","_ref","value","isElement","isHTMLElement","isShadowRoot","isOverflowElement","element","overflow","overflowX","overflowY","display","getComputedStyle","isTableElement","isTopLayer","selector","isContainingBlock","elementOrCss","webkit","isWebKit","css","getContainingBlock","currentNode","getParentNode","isLastTraversableNode","getNodeScroll","result","getNearestOverflowAncestor","parentNode","getOverflowAncestors","list","traverseIframes","_node$ownerDocument2","scrollableAncestor","isBody","win","frameElement","getFrameElement"],"mappings":"AAAA,SAASA,IAAY;AACnB,SAAO,OAAO,SAAW;AAC3B;AACA,SAASC,EAAYC,GAAM;AACzB,SAAIC,EAAOD,CAAI,KACLA,EAAK,YAAY,IAAI,YAAa,IAKrC;AACT;AACA,SAASE,EAAUF,GAAM;AACvB,MAAIG;AACJ,UAAQH,KAAQ,SAASG,IAAsBH,EAAK,kBAAkB,OAAO,SAASG,EAAoB,gBAAgB;AAC5H;AACA,SAASC,EAAmBJ,GAAM;AAChC,MAAIK;AACJ,UAAQA,KAAQJ,EAAOD,CAAI,IAAIA,EAAK,gBAAgBA,EAAK,aAAa,OAAO,aAAa,OAAO,SAASK,EAAK;AACjH;AACA,SAASJ,EAAOK,GAAO;AACrB,SAAKR,EAAS,IAGPQ,aAAiB,QAAQA,aAAiBJ,EAAUI,CAAK,EAAE,OAFzD;AAGX;AACA,SAASC,EAAUD,GAAO;AACxB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,EAAO,OAAOA;AAC9C;AACA,SAASC,EAA2B/B,GAAM;AACxC,QAAMgC,IAAaL,EAAc3B,CAAI;AACrC,SAAI4B,EAAsBI,CAAU,IAC3BhC,EAAK,gBAAgBA,EAAK,cAAc,OAAOA,EAAK,OAEzDQ,EAAcwB,CAAU,KAAKtB,EAAkBsB,CAAU,IACpDA,IAEFD,EAA2BC,CAAU;AAC9C;AACA,SAASC,EAAqBjC,GAAMkC,GAAMC,GAAiB;AACzD,MAAIC;AACJ,EAAIF,MAAS,WACXA,IAAO,CAAE,IAEPC,MAAoB,WACtBA,IAAkB;AAEpB,QAAME,IAAqBN,EAA2B/B,CAAI,GACpDsC,IAASD,QAAyBD,IAAuBpC,EAAK,kBAAkB,OAAO,SAASoC,EAAqB,OACrHG,IAAMrC,EAAUmC,CAAkB;AACxC,MAAIC,GAAQ;AACV,UAAME,IAAeC,EAAgBF,CAAG;AACxC,WAAOL,EAAK,OAAOK,GAAKA,EAAI,kBAAkB,CAAE,GAAE7B,EAAkB2B,CAAkB,IAAIA,IAAqB,CAAE,GAAEG,KAAgBL,IAAkBF,EAAqBO,CAAY,IAAI,EAAE;AAAA,EAChM;AACE,SAAON,EAAK,OAAOG,GAAoBJ,EAAqBI,GAAoB,CAAA,GAAIF,CAAe,CAAC;AACtG;AACA,SAASM,EAAgBF,GAAK;AAC5B,SAAOA,EAAI,UAAU,OAAO,eAAeA,EAAI,MAAM,IAAIA,EAAI,eAAe;AAC9E;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es449.js","sources":["../node_modules/react-remove-scroll-bar/dist/es2015/component.js"],"sourcesContent":["import * as React from 'react';\nimport { styleSingleton } from 'react-style-singleton';\nimport { fullWidthClassName, zeroRightClassName, noScrollbarsClassName, removedBarSizeVariable } from './constants';\nimport { getGapWidth } from './utils';\nvar Style = styleSingleton();\nexport var lockAttribute = 'data-scroll-locked';\n// important tip - once we measure scrollBar width and remove them\n// we could not repeat this operation\n// thus we are using style-singleton - only the first \"yet correct\" style will be applied.\nvar getStyles = function (_a, allowRelative, gapMode, important) {\n var left = _a.left, top = _a.top, right = _a.right, gap = _a.gap;\n if (gapMode === void 0) { gapMode = 'margin'; }\n return \"\\n .\".concat(noScrollbarsClassName, \" {\\n overflow: hidden \").concat(important, \";\\n padding-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n body[\").concat(lockAttribute, \"] {\\n overflow: hidden \").concat(important, \";\\n overscroll-behavior: contain;\\n \").concat([\n allowRelative && \"position: relative \".concat(important, \";\"),\n gapMode === 'margin' &&\n \"\\n padding-left: \".concat(left, \"px;\\n padding-top: \").concat(top, \"px;\\n padding-right: \").concat(right, \"px;\\n margin-left:0;\\n margin-top:0;\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n \"),\n gapMode === 'padding' && \"padding-right: \".concat(gap, \"px \").concat(important, \";\"),\n ]\n .filter(Boolean)\n .join(''), \"\\n }\\n \\n .\").concat(zeroRightClassName, \" {\\n right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" {\\n margin-right: \").concat(gap, \"px \").concat(important, \";\\n }\\n \\n .\").concat(zeroRightClassName, \" .\").concat(zeroRightClassName, \" {\\n right: 0 \").concat(important, \";\\n }\\n \\n .\").concat(fullWidthClassName, \" .\").concat(fullWidthClassName, \" {\\n margin-right: 0 \").concat(important, \";\\n }\\n \\n body[\").concat(lockAttribute, \"] {\\n \").concat(removedBarSizeVariable, \": \").concat(gap, \"px;\\n }\\n\");\n};\nvar getCurrentUseCounter = function () {\n var counter = parseInt(document.body.getAttribute(lockAttribute) || '0', 10);\n return isFinite(counter) ? counter : 0;\n};\nexport var useLockAttribute = function () {\n React.useEffect(function () {\n document.body.setAttribute(lockAttribute, (getCurrentUseCounter() + 1).toString());\n return function () {\n var newCounter = getCurrentUseCounter() - 1;\n if (newCounter <= 0) {\n document.body.removeAttribute(lockAttribute);\n }\n else {\n document.body.setAttribute(lockAttribute, newCounter.toString());\n }\n };\n }, []);\n};\n/**\n * Removes page scrollbar and blocks page scroll when mounted\n */\nexport var RemoveScrollBar = function (_a) {\n var noRelative = _a.noRelative, noImportant = _a.noImportant, _b = _a.gapMode, gapMode = _b === void 0 ? 'margin' : _b;\n useLockAttribute();\n /*\n gap will be measured on every component mount\n however it will be used only by the \"first\" invocation\n due to singleton nature of <Style\n */\n var gap = React.useMemo(function () { return getGapWidth(gapMode); }, [gapMode]);\n return React.createElement(Style, { styles: getStyles(gap, !noRelative, gapMode, !noImportant ? '!important' : '') });\n};\n"],"names":["Style","styleSingleton","lockAttribute","getStyles","_a","allowRelative","gapMode","important","left","top","right","gap","noScrollbarsClassName","zeroRightClassName","fullWidthClassName","removedBarSizeVariable","getCurrentUseCounter","counter","useLockAttribute","React","newCounter","RemoveScrollBar","noRelative","noImportant","_b","getGapWidth"],"mappings":";;;;AAIA,IAAIA,IAAQC,EAAgB,GACjBC,IAAgB,sBAIvBC,IAAY,SAAUC,GAAIC,GAAeC,GAASC,GAAW;AAC7D,MAAIC,IAAOJ,EAAG,MAAMK,IAAML,EAAG,KAAKM,IAAQN,EAAG,OAAOO,IAAMP,EAAG;AAC7D,SAAIE,MAAY,WAAUA,IAAU,WAC7B;AAAA,KAAQ,OAAOM,GAAuB;AAAA,qBAA0B,EAAE,OAAOL,GAAW;AAAA,mBAAuB,EAAE,OAAOI,GAAK,KAAK,EAAE,OAAOJ,GAAW;AAAA;AAAA,QAAiB,EAAE,OAAOL,GAAe;AAAA,sBAA4B,EAAE,OAAOK,GAAW;AAAA;AAAA,KAA4C,EAAE,OAAO;AAAA,IACnSF,KAAiB,sBAAsB,OAAOE,GAAW,GAAG;AAAA,IAC5DD,MAAY,YACR;AAAA,oBAAuB,OAAOE,GAAM;AAAA,kBAAwB,EAAE,OAAOC,GAAK;AAAA,oBAA0B,EAAE,OAAOC,GAAO;AAAA;AAAA;AAAA,mBAAgE,EAAE,OAAOC,GAAK,KAAK,EAAE,OAAOJ,GAAW;AAAA,KAAS;AAAA,IACxOD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AWA;AACpH,EAAAN,EAAkB;AAMlB,MAAIP,IAAMQ,EAAM,QAAQ,WAAY;AAAE,WAAOM,EAAYnB,CAAO;AAAA,EAAE,GAAI,CAACA,CAAO,CAAC;AAC/E,SAAOa,EAAM,cAAcnB,GAAO,EAAE,QAAQG,EAAUQ,GAAK,CAACW,GAAYhB,GAAUiB,IAA6B,KAAf,YAAiB,EAAC,CAAE;AACxH;","x_google_ignoreList":[0]}
|
package/dist/index.es450.js
CHANGED
@@ -1,72 +1,12 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
return
|
8
|
-
.`.concat(p, ` {
|
9
|
-
overflow: hidden `).concat(t, `;
|
10
|
-
padding-right: `).concat(c, "px ").concat(t, `;
|
11
|
-
}
|
12
|
-
body[`).concat(e, `] {
|
13
|
-
overflow: hidden `).concat(t, `;
|
14
|
-
overscroll-behavior: contain;
|
15
|
-
`).concat([
|
16
|
-
a && "position: relative ".concat(t, ";"),
|
17
|
-
o === "margin" && `
|
18
|
-
padding-left: `.concat(r, `px;
|
19
|
-
padding-top: `).concat(i, `px;
|
20
|
-
padding-right: `).concat(s, `px;
|
21
|
-
margin-left:0;
|
22
|
-
margin-top:0;
|
23
|
-
margin-right: `).concat(c, "px ").concat(t, `;
|
24
|
-
`),
|
25
|
-
o === "padding" && "padding-right: ".concat(c, "px ").concat(t, ";")
|
26
|
-
].filter(Boolean).join(""), `
|
27
|
-
}
|
28
|
-
|
29
|
-
.`).concat(g, ` {
|
30
|
-
right: `).concat(c, "px ").concat(t, `;
|
31
|
-
}
|
32
|
-
|
33
|
-
.`).concat(l, ` {
|
34
|
-
margin-right: `).concat(c, "px ").concat(t, `;
|
35
|
-
}
|
36
|
-
|
37
|
-
.`).concat(g, " .").concat(g, ` {
|
38
|
-
right: 0 `).concat(t, `;
|
39
|
-
}
|
40
|
-
|
41
|
-
.`).concat(l, " .").concat(l, ` {
|
42
|
-
margin-right: 0 `).concat(t, `;
|
43
|
-
}
|
44
|
-
|
45
|
-
body[`).concat(e, `] {
|
46
|
-
`).concat(v, ": ").concat(c, `px;
|
47
|
-
}
|
48
|
-
`);
|
49
|
-
}, u = function() {
|
50
|
-
var n = parseInt(document.body.getAttribute(e) || "0", 10);
|
51
|
-
return isFinite(n) ? n : 0;
|
52
|
-
}, x = function() {
|
53
|
-
d.useEffect(function() {
|
54
|
-
return document.body.setAttribute(e, (u() + 1).toString()), function() {
|
55
|
-
var n = u() - 1;
|
56
|
-
n <= 0 ? document.body.removeAttribute(e) : document.body.setAttribute(e, n.toString());
|
57
|
-
};
|
58
|
-
}, []);
|
59
|
-
}, C = function(n) {
|
60
|
-
var a = n.noRelative, o = n.noImportant, t = n.gapMode, r = t === void 0 ? "margin" : t;
|
61
|
-
x();
|
62
|
-
var i = d.useMemo(function() {
|
63
|
-
return m(r);
|
64
|
-
}, [r]);
|
65
|
-
return d.createElement(b, { styles: h(i, !a, r, o ? "" : "!important") });
|
1
|
+
import { styleHookSingleton as o } from "./index.es458.js";
|
2
|
+
var s = function() {
|
3
|
+
var e = o(), n = function(t) {
|
4
|
+
var r = t.styles, l = t.dynamic;
|
5
|
+
return e(r, l), null;
|
6
|
+
};
|
7
|
+
return n;
|
66
8
|
};
|
67
9
|
export {
|
68
|
-
|
69
|
-
e as lockAttribute,
|
70
|
-
x as useLockAttribute
|
10
|
+
s as styleSingleton
|
71
11
|
};
|
72
12
|
//# sourceMappingURL=index.es450.js.map
|
package/dist/index.es450.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es450.js","sources":["../node_modules/react-
|
1
|
+
{"version":3,"file":"index.es450.js","sources":["../node_modules/react-style-singleton/dist/es2015/component.js"],"sourcesContent":["import { styleHookSingleton } from './hook';\n/**\n * create a Component to add styles on demand\n * - styles are added when first instance is mounted\n * - styles are removed when the last instance is unmounted\n * - changing styles in runtime does nothing unless dynamic is set. But with multiple components that can lead to the undefined behavior\n */\nexport var styleSingleton = function () {\n var useStyle = styleHookSingleton();\n var Sheet = function (_a) {\n var styles = _a.styles, dynamic = _a.dynamic;\n useStyle(styles, dynamic);\n return null;\n };\n return Sheet;\n};\n"],"names":["styleSingleton","useStyle","styleHookSingleton","Sheet","_a","styles","dynamic"],"mappings":";AAOU,IAACA,IAAiB,WAAY;AACpC,MAAIC,IAAWC,EAAoB,GAC/BC,IAAQ,SAAUC,GAAI;AACtB,QAAIC,IAASD,EAAG,QAAQE,IAAUF,EAAG;AACrC,WAAAH,EAASI,GAAQC,CAAO,GACjB;AAAA,EACV;AACD,SAAOH;AACX;","x_google_ignoreList":[0]}
|
package/dist/index.es451.js
CHANGED
@@ -1,12 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
var
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
};
|
1
|
+
var r = !1;
|
2
|
+
if (typeof window < "u")
|
3
|
+
try {
|
4
|
+
var e = Object.defineProperty({}, "passive", {
|
5
|
+
get: function() {
|
6
|
+
return r = !0, !0;
|
7
|
+
}
|
8
|
+
});
|
9
|
+
window.addEventListener("test", e, e), window.removeEventListener("test", e, e);
|
10
|
+
} catch {
|
11
|
+
r = !1;
|
12
|
+
}
|
13
|
+
var a = r ? { passive: !1 } : !1;
|
9
14
|
export {
|
10
|
-
|
15
|
+
a as nonPassive
|
11
16
|
};
|
12
17
|
//# sourceMappingURL=index.es451.js.map
|
package/dist/index.es451.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es451.js","sources":["../node_modules/react-
|
1
|
+
{"version":3,"file":"index.es451.js","sources":["../node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js"],"sourcesContent":["var passiveSupported = false;\nif (typeof window !== 'undefined') {\n try {\n var options = Object.defineProperty({}, 'passive', {\n get: function () {\n passiveSupported = true;\n return true;\n },\n });\n // @ts-ignore\n window.addEventListener('test', options, options);\n // @ts-ignore\n window.removeEventListener('test', options, options);\n }\n catch (err) {\n passiveSupported = false;\n }\n}\nexport var nonPassive = passiveSupported ? { passive: false } : false;\n"],"names":["passiveSupported","options","nonPassive"],"mappings":"AAAA,IAAIA,IAAmB;AACvB,IAAI,OAAO,SAAW;AAClB,MAAI;AACA,QAAIC,IAAU,OAAO,eAAe,CAAA,GAAI,WAAW;AAAA,MAC/C,KAAK,WAAY;AACb,eAAAD,IAAmB,IACZ;AAAA,MACV;AAAA,IACb,CAAS;AAED,WAAO,iBAAiB,QAAQC,GAASA,CAAO,GAEhD,OAAO,oBAAoB,QAAQA,GAASA,CAAO;AAAA,EAC3D,QACgB;AACR,IAAAD,IAAmB;AAAA,EAC3B;AAEU,IAACE,IAAaF,IAAmB,EAAE,SAAS,GAAK,IAAK;","x_google_ignoreList":[0]}
|
package/dist/index.es452.js
CHANGED
@@ -1,17 +1,65 @@
|
|
1
|
-
var
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
1
|
+
var p = function(e) {
|
2
|
+
return e.tagName === "TEXTAREA";
|
3
|
+
}, w = function(e, r) {
|
4
|
+
if (!(e instanceof Element))
|
5
|
+
return !1;
|
6
|
+
var o = window.getComputedStyle(e);
|
7
|
+
return (
|
8
|
+
// not-not-scrollable
|
9
|
+
o[r] !== "hidden" && // contains scroll inside self
|
10
|
+
!(o.overflowY === o.overflowX && !p(e) && o[r] === "visible")
|
11
|
+
);
|
12
|
+
}, y = function(e) {
|
13
|
+
return w(e, "overflowY");
|
14
|
+
}, H = function(e) {
|
15
|
+
return w(e, "overflowX");
|
16
|
+
}, R = function(e, r) {
|
17
|
+
var o = r.ownerDocument, t = r;
|
18
|
+
do {
|
19
|
+
typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
|
20
|
+
var v = g(e, t);
|
21
|
+
if (v) {
|
22
|
+
var n = b(e, t), a = n[1], l = n[2];
|
23
|
+
if (a > l)
|
24
|
+
return !0;
|
25
|
+
}
|
26
|
+
t = t.parentNode;
|
27
|
+
} while (t && t !== o.body);
|
28
|
+
return !1;
|
29
|
+
}, B = function(e) {
|
30
|
+
var r = e.scrollTop, o = e.scrollHeight, t = e.clientHeight;
|
31
|
+
return [
|
32
|
+
r,
|
33
|
+
o,
|
34
|
+
t
|
35
|
+
];
|
36
|
+
}, V = function(e) {
|
37
|
+
var r = e.scrollLeft, o = e.scrollWidth, t = e.clientWidth;
|
38
|
+
return [
|
39
|
+
r,
|
40
|
+
o,
|
41
|
+
t
|
42
|
+
];
|
43
|
+
}, g = function(e, r) {
|
44
|
+
return e === "v" ? y(r) : H(r);
|
45
|
+
}, b = function(e, r) {
|
46
|
+
return e === "v" ? B(r) : V(r);
|
47
|
+
}, D = function(e, r) {
|
48
|
+
return e === "h" && r === "rtl" ? -1 : 1;
|
49
|
+
}, W = function(e, r, o, t, v) {
|
50
|
+
var n = D(e, window.getComputedStyle(r).direction), a = n * t, l = o.target, f = r.contains(l), i = !1, s = a > 0, d = 0, h = 0;
|
51
|
+
do {
|
52
|
+
var c = b(e, l), u = c[0], m = c[1], C = c[2], S = m - C - n * u;
|
53
|
+
(u || S) && g(e, l) && (d += S, h += u), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
|
54
|
+
} while (
|
55
|
+
// portaled content
|
56
|
+
!f && l !== document.body || // self content
|
57
|
+
f && (r.contains(l) || r === l)
|
58
|
+
);
|
59
|
+
return (s && Math.abs(d) < 1 || !s && Math.abs(h) < 1) && (i = !0), i;
|
60
|
+
};
|
14
61
|
export {
|
15
|
-
|
62
|
+
W as handleScroll,
|
63
|
+
R as locationCouldBeScrolled
|
16
64
|
};
|
17
65
|
//# sourceMappingURL=index.es452.js.map
|
package/dist/index.es452.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es452.js","sources":["../node_modules/react-remove-scroll/dist/es2015/
|
1
|
+
{"version":3,"file":"index.es452.js","sources":["../node_modules/react-remove-scroll/dist/es2015/handleScroll.js"],"sourcesContent":["var alwaysContainsScroll = function (node) {\n // textarea will always _contain_ scroll inside self. It only can be hidden\n return node.tagName === 'TEXTAREA';\n};\nvar elementCanBeScrolled = function (node, overflow) {\n if (!(node instanceof Element)) {\n return false;\n }\n var styles = window.getComputedStyle(node);\n return (\n // not-not-scrollable\n styles[overflow] !== 'hidden' &&\n // contains scroll inside self\n !(styles.overflowY === styles.overflowX && !alwaysContainsScroll(node) && styles[overflow] === 'visible'));\n};\nvar elementCouldBeVScrolled = function (node) { return elementCanBeScrolled(node, 'overflowY'); };\nvar elementCouldBeHScrolled = function (node) { return elementCanBeScrolled(node, 'overflowX'); };\nexport var locationCouldBeScrolled = function (axis, node) {\n var ownerDocument = node.ownerDocument;\n var current = node;\n do {\n // Skip over shadow root\n if (typeof ShadowRoot !== 'undefined' && current instanceof ShadowRoot) {\n current = current.host;\n }\n var isScrollable = elementCouldBeScrolled(axis, current);\n if (isScrollable) {\n var _a = getScrollVariables(axis, current), scrollHeight = _a[1], clientHeight = _a[2];\n if (scrollHeight > clientHeight) {\n return true;\n }\n }\n current = current.parentNode;\n } while (current && current !== ownerDocument.body);\n return false;\n};\nvar getVScrollVariables = function (_a) {\n var scrollTop = _a.scrollTop, scrollHeight = _a.scrollHeight, clientHeight = _a.clientHeight;\n return [\n scrollTop,\n scrollHeight,\n clientHeight,\n ];\n};\nvar getHScrollVariables = function (_a) {\n var scrollLeft = _a.scrollLeft, scrollWidth = _a.scrollWidth, clientWidth = _a.clientWidth;\n return [\n scrollLeft,\n scrollWidth,\n clientWidth,\n ];\n};\nvar elementCouldBeScrolled = function (axis, node) {\n return axis === 'v' ? elementCouldBeVScrolled(node) : elementCouldBeHScrolled(node);\n};\nvar getScrollVariables = function (axis, node) {\n return axis === 'v' ? getVScrollVariables(node) : getHScrollVariables(node);\n};\nvar getDirectionFactor = function (axis, direction) {\n /**\n * If the element's direction is rtl (right-to-left), then scrollLeft is 0 when the scrollbar is at its rightmost position,\n * and then increasingly negative as you scroll towards the end of the content.\n * @see https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollLeft\n */\n return axis === 'h' && direction === 'rtl' ? -1 : 1;\n};\nexport var handleScroll = function (axis, endTarget, event, sourceDelta, noOverscroll) {\n var directionFactor = getDirectionFactor(axis, window.getComputedStyle(endTarget).direction);\n var delta = directionFactor * sourceDelta;\n // find scrollable target\n var target = event.target;\n var targetInLock = endTarget.contains(target);\n var shouldCancelScroll = false;\n var isDeltaPositive = delta > 0;\n var availableScroll = 0;\n var availableScrollTop = 0;\n do {\n var _a = getScrollVariables(axis, target), position = _a[0], scroll_1 = _a[1], capacity = _a[2];\n var elementScroll = scroll_1 - capacity - directionFactor * position;\n if (position || elementScroll) {\n if (elementCouldBeScrolled(axis, target)) {\n availableScroll += elementScroll;\n availableScrollTop += position;\n }\n }\n if (target instanceof ShadowRoot) {\n target = target.host;\n }\n else {\n target = target.parentNode;\n }\n } while (\n // portaled content\n (!targetInLock && target !== document.body) ||\n // self content\n (targetInLock && (endTarget.contains(target) || endTarget === target)));\n // handle epsilon around 0 (non standard zoom levels)\n if (isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScroll) < 1) || (!noOverscroll && delta > availableScroll))) {\n shouldCancelScroll = true;\n }\n else if (!isDeltaPositive &&\n ((noOverscroll && Math.abs(availableScrollTop) < 1) || (!noOverscroll && -delta > availableScrollTop))) {\n shouldCancelScroll = true;\n }\n return shouldCancelScroll;\n};\n"],"names":["alwaysContainsScroll","node","elementCanBeScrolled","overflow","styles","elementCouldBeVScrolled","elementCouldBeHScrolled","locationCouldBeScrolled","axis","ownerDocument","current","isScrollable","elementCouldBeScrolled","_a","getScrollVariables","scrollHeight","clientHeight","getVScrollVariables","scrollTop","getHScrollVariables","scrollLeft","scrollWidth","clientWidth","getDirectionFactor","direction","handleScroll","endTarget","event","sourceDelta","noOverscroll","directionFactor","delta","target","targetInLock","shouldCancelScroll","isDeltaPositive","availableScroll","availableScrollTop","position","scroll_1","capacity","elementScro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
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
},
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
1
|
+
import { __assign as d } from "./index.es421.js";
|
2
|
+
function l(r) {
|
3
|
+
return r;
|
4
|
+
}
|
5
|
+
function h(r, t) {
|
6
|
+
t === void 0 && (t = l);
|
7
|
+
var e = [], o = !1, c = {
|
8
|
+
read: function() {
|
9
|
+
if (o)
|
10
|
+
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
11
|
+
return e.length ? e[e.length - 1] : r;
|
12
|
+
},
|
13
|
+
useMedium: function(u) {
|
14
|
+
var n = t(u, o);
|
15
|
+
return e.push(n), function() {
|
16
|
+
e = e.filter(function(i) {
|
17
|
+
return i !== n;
|
18
|
+
});
|
19
|
+
};
|
20
|
+
},
|
21
|
+
assignSyncMedium: function(u) {
|
22
|
+
for (o = !0; e.length; ) {
|
23
|
+
var n = e;
|
24
|
+
e = [], n.forEach(u);
|
25
|
+
}
|
26
|
+
e = {
|
27
|
+
push: function(i) {
|
28
|
+
return u(i);
|
29
|
+
},
|
30
|
+
filter: function() {
|
31
|
+
return e;
|
32
|
+
}
|
33
|
+
};
|
34
|
+
},
|
35
|
+
assignMedium: function(u) {
|
36
|
+
o = !0;
|
37
|
+
var n = [];
|
38
|
+
if (e.length) {
|
39
|
+
var i = e;
|
40
|
+
e = [], i.forEach(u), n = e;
|
41
|
+
}
|
42
|
+
var s = function() {
|
43
|
+
var f = n;
|
44
|
+
n = [], f.forEach(u);
|
45
|
+
}, a = function() {
|
46
|
+
return Promise.resolve().then(s);
|
47
|
+
};
|
48
|
+
a(), e = {
|
49
|
+
push: function(f) {
|
50
|
+
n.push(f), a();
|
51
|
+
},
|
52
|
+
filter: function(f) {
|
53
|
+
return n = n.filter(f), e;
|
54
|
+
}
|
55
|
+
};
|
25
56
|
}
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
t
|
35
|
-
];
|
36
|
-
}, V = function(e) {
|
37
|
-
var r = e.scrollLeft, o = e.scrollWidth, t = e.clientWidth;
|
38
|
-
return [
|
39
|
-
r,
|
40
|
-
o,
|
41
|
-
t
|
42
|
-
];
|
43
|
-
}, g = function(e, r) {
|
44
|
-
return e === "v" ? y(r) : H(r);
|
45
|
-
}, b = function(e, r) {
|
46
|
-
return e === "v" ? B(r) : V(r);
|
47
|
-
}, D = function(e, r) {
|
48
|
-
return e === "h" && r === "rtl" ? -1 : 1;
|
49
|
-
}, W = function(e, r, o, t, v) {
|
50
|
-
var n = D(e, window.getComputedStyle(r).direction), a = n * t, l = o.target, f = r.contains(l), i = !1, s = a > 0, d = 0, h = 0;
|
51
|
-
do {
|
52
|
-
var c = b(e, l), u = c[0], m = c[1], C = c[2], S = m - C - n * u;
|
53
|
-
(u || S) && g(e, l) && (d += S, h += u), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
|
54
|
-
} while (
|
55
|
-
// portaled content
|
56
|
-
!f && l !== document.body || // self content
|
57
|
-
f && (r.contains(l) || r === l)
|
58
|
-
);
|
59
|
-
return (s && Math.abs(d) < 1 || !s && Math.abs(h) < 1) && (i = !0), i;
|
60
|
-
};
|
57
|
+
};
|
58
|
+
return c;
|
59
|
+
}
|
60
|
+
function v(r) {
|
61
|
+
r === void 0 && (r = {});
|
62
|
+
var t = h(null);
|
63
|
+
return t.options = d({ async: !0, ssr: !1 }, r), t;
|
64
|
+
}
|
61
65
|
export {
|
62
|
-
|
63
|
-
R as locationCouldBeScrolled
|
66
|
+
v as createSidecarMedium
|
64
67
|
};
|
65
68
|
//# sourceMappingURL=index.es453.js.map
|