fina-react-ds 1.0.21 → 1.0.23
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/components/alert-dialog.d.ts +1 -1
- package/dist/components/alert-dialog.js +65 -59
- package/dist/components/avatar.d.ts +1 -1
- package/dist/components/avatar.js +19 -19
- package/dist/components/badge.js +12 -11
- package/dist/components/button.js +12 -11
- package/dist/components/checkbox.d.ts +1 -1
- package/dist/components/checkbox.js +17 -17
- package/dist/components/dialog.d.ts +1 -1
- package/dist/components/dialog.js +60 -60
- package/dist/components/dropdown-menu.d.ts +1 -1
- package/dist/components/dropdown-menu.js +93 -93
- package/dist/components/form.d.ts +2 -3
- package/dist/components/form.js +2 -2
- package/dist/components/hover-card.d.ts +1 -1
- package/dist/components/hover-card.js +23 -23
- package/dist/components/label.d.ts +1 -1
- package/dist/components/label.js +12 -12
- package/dist/components/popover.d.ts +1 -1
- package/dist/components/popover.js +28 -28
- package/dist/components/separator.d.ts +1 -1
- package/dist/components/separator.js +10 -10
- package/dist/components/sheet.d.ts +1 -1
- package/dist/components/sheet.js +73 -73
- package/dist/components/sidebar.js +73 -69
- package/dist/components/switch.d.ts +1 -1
- package/dist/components/switch.js +13 -13
- package/dist/components/tabs.d.ts +1 -1
- package/dist/components/tabs.js +22 -22
- package/dist/components/tooltip.d.ts +1 -1
- package/dist/components/tooltip.js +27 -27
- package/dist/index.d.ts +6 -3
- package/dist/index.js +190 -172
- package/dist/lib/http.d.ts +13 -0
- package/dist/lib/http.js +59 -0
- package/dist/lib/utils.d.ts +15 -1
- package/dist/lib/utils.js +29 -9
- package/dist/lib/yup.d.ts +2 -0
- package/dist/lib/yup.js +88 -0
- package/package.json +6 -3
- package/dist/_virtual/index.js +0 -5
- package/dist/_virtual/index2.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.development.js +0 -4
- package/dist/_virtual/use-sync-external-store-shim.production.js +0 -4
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -534
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -430
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -215
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -159
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -149
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -130
- package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -24
- package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +0 -80
- package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -258
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +0 -51
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -34
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -76
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -265
- package/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -12
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -133
- package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -230
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -21
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -149
- package/dist/node_modules/@radix-ui/react-hover-card/dist/index.js +0 -192
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-label/dist/index.js +0 -22
- package/dist/node_modules/@radix-ui/react-menu/dist/index.js +0 -663
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -247
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -224
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -77
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -39
- package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -189
- package/dist/node_modules/@radix-ui/react-separator/dist/index.js +0 -27
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -67
- package/dist/node_modules/@radix-ui/react-switch/dist/index.js +0 -136
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +0 -168
- package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -348
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -16
- package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -59
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -19
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -6
- package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -11
- package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -30
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -32
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -54
- package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -9
- package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -116
- package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -33
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -18
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -70
- package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -73
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -7
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -27
- package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -13
- package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -17
- package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -35
- package/dist/node_modules/tslib/tslib.es6.js +0 -31
- package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -9
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -29
- package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -28
- package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
- package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -72
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -73
- package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -62
- package/dist/node_modules/use-sync-external-store/shim/index.js +0 -13
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
var A = Object.defineProperty;
|
|
2
|
-
var l = (t, a) => A(t, "name", { value: a, configurable: !0 });
|
|
3
|
-
import { __spreadArray as I } from "../../../tslib/tslib.es6.js";
|
|
4
|
-
import * as n from "react";
|
|
5
|
-
import { RemoveScrollBar as W } from "../../../react-remove-scroll-bar/dist/es2015/component.js";
|
|
6
|
-
import { nonPassive as f } from "./aggresiveCapture.js";
|
|
7
|
-
import { locationCouldBeScrolled as Y, handleScroll as F } from "./handleScroll.js";
|
|
8
|
-
import { styleSingleton as K } from "../../../react-style-singleton/dist/es2015/component.js";
|
|
9
|
-
var k = /* @__PURE__ */ l(function(t) {
|
|
10
|
-
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
11
|
-
}, "getTouchXY"), B = /* @__PURE__ */ l(function(t) {
|
|
12
|
-
return [t.deltaX, t.deltaY];
|
|
13
|
-
}, "getDeltaXY"), M = /* @__PURE__ */ l(function(t) {
|
|
14
|
-
return t && "current" in t ? t.current : t;
|
|
15
|
-
}, "extractRef"), O = /* @__PURE__ */ l(function(t, a) {
|
|
16
|
-
return t[0] === a[0] && t[1] === a[1];
|
|
17
|
-
}, "deltaCompare"), Q = /* @__PURE__ */ l(function(t) {
|
|
18
|
-
return `
|
|
19
|
-
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
20
|
-
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
21
|
-
`);
|
|
22
|
-
}, "generateStyle"), Z = 0, h = [];
|
|
23
|
-
function N(t) {
|
|
24
|
-
var a = n.useRef([]), R = n.useRef([0, 0]), m = n.useRef(), v = n.useState(Z++)[0], g = n.useState(K)[0], S = n.useRef(t);
|
|
25
|
-
n.useEffect(function() {
|
|
26
|
-
S.current = t;
|
|
27
|
-
}, [t]), n.useEffect(function() {
|
|
28
|
-
if (t.inert) {
|
|
29
|
-
document.body.classList.add("block-interactivity-".concat(v));
|
|
30
|
-
var e = I([t.lockRef.current], (t.shards || []).map(M), !0).filter(Boolean);
|
|
31
|
-
return e.forEach(function(r) {
|
|
32
|
-
return r.classList.add("allow-interactivity-".concat(v));
|
|
33
|
-
}), function() {
|
|
34
|
-
document.body.classList.remove("block-interactivity-".concat(v)), e.forEach(function(r) {
|
|
35
|
-
return r.classList.remove("allow-interactivity-".concat(v));
|
|
36
|
-
});
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
}, [t.inert, t.lockRef.current, t.shards]);
|
|
40
|
-
var C = n.useCallback(function(e, r) {
|
|
41
|
-
if ("touches" in e && e.touches.length === 2 || e.type === "wheel" && e.ctrlKey)
|
|
42
|
-
return !S.current.allowPinchZoom;
|
|
43
|
-
var i = k(e), o = R.current, u = "deltaX" in e ? e.deltaX : o[0] - i[0], s = "deltaY" in e ? e.deltaY : o[1] - i[1], c, E = e.target, d = Math.abs(u) > Math.abs(s) ? "h" : "v";
|
|
44
|
-
if ("touches" in e && d === "h" && E.type === "range")
|
|
45
|
-
return !1;
|
|
46
|
-
var b = Y(d, E);
|
|
47
|
-
if (!b)
|
|
48
|
-
return !0;
|
|
49
|
-
if (b ? c = d : (c = d === "v" ? "h" : "v", b = Y(d, E)), !b)
|
|
50
|
-
return !1;
|
|
51
|
-
if (!m.current && "changedTouches" in e && (u || s) && (m.current = c), !c)
|
|
52
|
-
return !0;
|
|
53
|
-
var T = m.current || c;
|
|
54
|
-
return F(T, r, e, T === "h" ? u : s);
|
|
55
|
-
}, []), y = n.useCallback(function(e) {
|
|
56
|
-
var r = e;
|
|
57
|
-
if (!(!h.length || h[h.length - 1] !== g)) {
|
|
58
|
-
var i = "deltaY" in r ? B(r) : k(r), o = a.current.filter(function(c) {
|
|
59
|
-
return c.name === r.type && (c.target === r.target || r.target === c.shadowParent) && O(c.delta, i);
|
|
60
|
-
})[0];
|
|
61
|
-
if (o && o.should) {
|
|
62
|
-
r.cancelable && r.preventDefault();
|
|
63
|
-
return;
|
|
64
|
-
}
|
|
65
|
-
if (!o) {
|
|
66
|
-
var u = (S.current.shards || []).map(M).filter(Boolean).filter(function(c) {
|
|
67
|
-
return c.contains(r.target);
|
|
68
|
-
}), s = u.length > 0 ? C(r, u[0]) : !S.current.noIsolation;
|
|
69
|
-
s && r.cancelable && r.preventDefault();
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
}, []), w = n.useCallback(function(e, r, i, o) {
|
|
73
|
-
var u = { name: e, delta: r, target: i, should: o, shadowParent: _(i) };
|
|
74
|
-
a.current.push(u), setTimeout(function() {
|
|
75
|
-
a.current = a.current.filter(function(s) {
|
|
76
|
-
return s !== u;
|
|
77
|
-
});
|
|
78
|
-
}, 1);
|
|
79
|
-
}, []), L = n.useCallback(function(e) {
|
|
80
|
-
R.current = k(e), m.current = void 0;
|
|
81
|
-
}, []), P = n.useCallback(function(e) {
|
|
82
|
-
w(e.type, B(e), e.target, C(e, t.lockRef.current));
|
|
83
|
-
}, []), X = n.useCallback(function(e) {
|
|
84
|
-
w(e.type, k(e), e.target, C(e, t.lockRef.current));
|
|
85
|
-
}, []);
|
|
86
|
-
n.useEffect(function() {
|
|
87
|
-
return h.push(g), t.setCallbacks({
|
|
88
|
-
onScrollCapture: P,
|
|
89
|
-
onWheelCapture: P,
|
|
90
|
-
onTouchMoveCapture: X
|
|
91
|
-
}), document.addEventListener("wheel", y, f), document.addEventListener("touchmove", y, f), document.addEventListener("touchstart", L, f), function() {
|
|
92
|
-
h = h.filter(function(e) {
|
|
93
|
-
return e !== g;
|
|
94
|
-
}), document.removeEventListener("wheel", y, f), document.removeEventListener("touchmove", y, f), document.removeEventListener("touchstart", L, f);
|
|
95
|
-
};
|
|
96
|
-
}, []);
|
|
97
|
-
var D = t.removeScrollBar, x = t.inert;
|
|
98
|
-
return n.createElement(
|
|
99
|
-
n.Fragment,
|
|
100
|
-
null,
|
|
101
|
-
x ? n.createElement(g, { styles: Q(v) }) : null,
|
|
102
|
-
D ? n.createElement(W, { noRelative: t.noRelative, gapMode: t.gapMode }) : null
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
l(N, "RemoveScrollSideCar");
|
|
106
|
-
function _(t) {
|
|
107
|
-
for (var a = null; t !== null; )
|
|
108
|
-
t instanceof ShadowRoot && (a = t.host, t = t.host), t = t.parentNode;
|
|
109
|
-
return a;
|
|
110
|
-
}
|
|
111
|
-
l(_, "getOutermostShadowParent");
|
|
112
|
-
export {
|
|
113
|
-
N as RemoveScrollSideCar,
|
|
114
|
-
B as getDeltaXY,
|
|
115
|
-
k as getTouchXY
|
|
116
|
-
};
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
var I = Object.defineProperty;
|
|
2
|
-
var d = (e, l) => I(e, "name", { value: l, configurable: !0 });
|
|
3
|
-
import { __rest as Z, __assign as r } from "../../../tslib/tslib.es6.js";
|
|
4
|
-
import * as a from "react";
|
|
5
|
-
import { zeroRightClassName as W, fullWidthClassName as z } from "../../../react-remove-scroll-bar/dist/es2015/constants.js";
|
|
6
|
-
import { effectCar as x } from "./medium.js";
|
|
7
|
-
import { useMergeRefs as y } from "../../../use-callback-ref/dist/es2015/useMergeRef.js";
|
|
8
|
-
var o = /* @__PURE__ */ d(function() {
|
|
9
|
-
}, "nothing"), f = a.forwardRef(function(e, l) {
|
|
10
|
-
var n = a.useRef(null), t = a.useState({
|
|
11
|
-
onScrollCapture: o,
|
|
12
|
-
onWheelCapture: o,
|
|
13
|
-
onTouchMoveCapture: o
|
|
14
|
-
}), v = t[0], h = t[1], u = e.forwardProps, i = e.children, C = e.className, R = e.removeScrollBar, g = e.enabled, P = e.shards, S = e.sideCar, b = e.noRelative, w = e.noIsolation, N = e.inert, M = e.allowPinchZoom, s = e.as, _ = s === void 0 ? "div" : s, B = e.gapMode, k = Z(e, ["forwardProps", "children", "className", "removeScrollBar", "enabled", "shards", "sideCar", "noRelative", "noIsolation", "inert", "allowPinchZoom", "as", "gapMode"]), E = S, c = y([n, l]), m = r(r({}, k), v);
|
|
15
|
-
return a.createElement(
|
|
16
|
-
a.Fragment,
|
|
17
|
-
null,
|
|
18
|
-
g && a.createElement(E, { sideCar: x, removeScrollBar: R, shards: P, noRelative: b, noIsolation: w, inert: N, setCallbacks: h, allowPinchZoom: !!M, lockRef: n, gapMode: B }),
|
|
19
|
-
u ? a.cloneElement(a.Children.only(i), r(r({}, m), { ref: c })) : a.createElement(_, r({}, m, { className: C, ref: c }), i)
|
|
20
|
-
);
|
|
21
|
-
});
|
|
22
|
-
f.defaultProps = {
|
|
23
|
-
enabled: !0,
|
|
24
|
-
removeScrollBar: !0,
|
|
25
|
-
inert: !1
|
|
26
|
-
};
|
|
27
|
-
f.classNames = {
|
|
28
|
-
fullWidth: z,
|
|
29
|
-
zeroRight: W
|
|
30
|
-
};
|
|
31
|
-
export {
|
|
32
|
-
f as RemoveScroll
|
|
33
|
-
};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var n = Object.defineProperty;
|
|
2
|
-
var a = (t, s) => n(t, "name", { value: s, configurable: !0 });
|
|
3
|
-
var r = !1;
|
|
4
|
-
if (typeof window < "u")
|
|
5
|
-
try {
|
|
6
|
-
var e = Object.defineProperty({}, "passive", {
|
|
7
|
-
get: /* @__PURE__ */ a(function() {
|
|
8
|
-
return r = !0, !0;
|
|
9
|
-
}, "get")
|
|
10
|
-
});
|
|
11
|
-
window.addEventListener("test", e, e), window.removeEventListener("test", e, e);
|
|
12
|
-
} catch {
|
|
13
|
-
r = !1;
|
|
14
|
-
}
|
|
15
|
-
var v = r ? { passive: !1 } : !1;
|
|
16
|
-
export {
|
|
17
|
-
v as nonPassive
|
|
18
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
var D = Object.defineProperty;
|
|
2
|
-
var o = (r, e) => D(r, "name", { value: e, configurable: !0 });
|
|
3
|
-
var E = /* @__PURE__ */ o(function(r) {
|
|
4
|
-
return r.tagName === "TEXTAREA";
|
|
5
|
-
}, "alwaysContainsScroll"), g = /* @__PURE__ */ o(function(r, e) {
|
|
6
|
-
if (!(r instanceof Element))
|
|
7
|
-
return !1;
|
|
8
|
-
var t = window.getComputedStyle(r);
|
|
9
|
-
return (
|
|
10
|
-
// not-not-scrollable
|
|
11
|
-
t[e] !== "hidden" && // contains scroll inside self
|
|
12
|
-
!(t.overflowY === t.overflowX && !E(r) && t[e] === "visible")
|
|
13
|
-
);
|
|
14
|
-
}, "elementCanBeScrolled"), H = /* @__PURE__ */ o(function(r) {
|
|
15
|
-
return g(r, "overflowY");
|
|
16
|
-
}, "elementCouldBeVScrolled"), p = /* @__PURE__ */ o(function(r) {
|
|
17
|
-
return g(r, "overflowX");
|
|
18
|
-
}, "elementCouldBeHScrolled"), R = /* @__PURE__ */ o(function(r, e) {
|
|
19
|
-
var t = e.ownerDocument, l = e;
|
|
20
|
-
do {
|
|
21
|
-
typeof ShadowRoot < "u" && l instanceof ShadowRoot && (l = l.host);
|
|
22
|
-
var d = m(r, l);
|
|
23
|
-
if (d) {
|
|
24
|
-
var a = C(r, l), c = a[1], n = a[2];
|
|
25
|
-
if (c > n)
|
|
26
|
-
return !0;
|
|
27
|
-
}
|
|
28
|
-
l = l.parentNode;
|
|
29
|
-
} while (l && l !== t.body);
|
|
30
|
-
return !1;
|
|
31
|
-
}, "locationCouldBeScrolled"), B = /* @__PURE__ */ o(function(r) {
|
|
32
|
-
var e = r.scrollTop, t = r.scrollHeight, l = r.clientHeight;
|
|
33
|
-
return [
|
|
34
|
-
e,
|
|
35
|
-
t,
|
|
36
|
-
l
|
|
37
|
-
];
|
|
38
|
-
}, "getVScrollVariables"), T = /* @__PURE__ */ o(function(r) {
|
|
39
|
-
var e = r.scrollLeft, t = r.scrollWidth, l = r.clientWidth;
|
|
40
|
-
return [
|
|
41
|
-
e,
|
|
42
|
-
t,
|
|
43
|
-
l
|
|
44
|
-
];
|
|
45
|
-
}, "getHScrollVariables"), m = /* @__PURE__ */ o(function(r, e) {
|
|
46
|
-
return r === "v" ? H(e) : p(e);
|
|
47
|
-
}, "elementCouldBeScrolled"), C = /* @__PURE__ */ o(function(r, e) {
|
|
48
|
-
return r === "v" ? B(e) : T(e);
|
|
49
|
-
}, "getScrollVariables"), V = /* @__PURE__ */ o(function(r, e) {
|
|
50
|
-
return r === "h" && e === "rtl" ? -1 : 1;
|
|
51
|
-
}, "getDirectionFactor"), W = /* @__PURE__ */ o(function(r, e, t, l, d) {
|
|
52
|
-
var a = V(r, window.getComputedStyle(e).direction), c = a * l, n = t.target, s = e.contains(n), u = !1, h = c > 0, S = 0, w = 0;
|
|
53
|
-
do {
|
|
54
|
-
if (!n)
|
|
55
|
-
break;
|
|
56
|
-
var v = C(r, n), f = v[0], y = v[1], N = v[2], b = y - N - a * f;
|
|
57
|
-
(f || b) && m(r, n) && (S += b, w += f);
|
|
58
|
-
var i = n.parentNode;
|
|
59
|
-
n = i && i.nodeType === Node.DOCUMENT_FRAGMENT_NODE ? i.host : i;
|
|
60
|
-
} while (
|
|
61
|
-
// portaled content
|
|
62
|
-
!s && n !== document.body || // self content
|
|
63
|
-
s && (e.contains(n) || e === n)
|
|
64
|
-
);
|
|
65
|
-
return (h && Math.abs(S) < 1 || !h && Math.abs(w) < 1) && (u = !0), u;
|
|
66
|
-
}, "handleScroll");
|
|
67
|
-
export {
|
|
68
|
-
W as handleScroll,
|
|
69
|
-
R as locationCouldBeScrolled
|
|
70
|
-
};
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
var p = Object.defineProperty;
|
|
2
|
-
var i = (n, r) => p(n, "name", { value: r, configurable: !0 });
|
|
3
|
-
import * as u from "react";
|
|
4
|
-
import { noScrollbarsClassName as v, zeroRightClassName as l, fullWidthClassName as d, removedBarSizeVariable as m } from "./constants.js";
|
|
5
|
-
import { getGapWidth as b } from "./utils.js";
|
|
6
|
-
import { styleSingleton as h } from "../../../react-style-singleton/dist/es2015/component.js";
|
|
7
|
-
var x = h(), e = "data-scroll-locked", y = /* @__PURE__ */ i(function(n, r, o, t) {
|
|
8
|
-
var a = n.left, g = n.top, f = n.right, c = n.gap;
|
|
9
|
-
return o === void 0 && (o = "margin"), `
|
|
10
|
-
.`.concat(v, ` {
|
|
11
|
-
overflow: hidden `).concat(t, `;
|
|
12
|
-
padding-right: `).concat(c, "px ").concat(t, `;
|
|
13
|
-
}
|
|
14
|
-
body[`).concat(e, `] {
|
|
15
|
-
overflow: hidden `).concat(t, `;
|
|
16
|
-
overscroll-behavior: contain;
|
|
17
|
-
`).concat([
|
|
18
|
-
r && "position: relative ".concat(t, ";"),
|
|
19
|
-
o === "margin" && `
|
|
20
|
-
padding-left: `.concat(a, `px;
|
|
21
|
-
padding-top: `).concat(g, `px;
|
|
22
|
-
padding-right: `).concat(f, `px;
|
|
23
|
-
margin-left:0;
|
|
24
|
-
margin-top:0;
|
|
25
|
-
margin-right: `).concat(c, "px ").concat(t, `;
|
|
26
|
-
`),
|
|
27
|
-
o === "padding" && "padding-right: ".concat(c, "px ").concat(t, ";")
|
|
28
|
-
].filter(Boolean).join(""), `
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
.`).concat(l, ` {
|
|
32
|
-
right: `).concat(c, "px ").concat(t, `;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
.`).concat(d, ` {
|
|
36
|
-
margin-right: `).concat(c, "px ").concat(t, `;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.`).concat(l, " .").concat(l, ` {
|
|
40
|
-
right: 0 `).concat(t, `;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.`).concat(d, " .").concat(d, ` {
|
|
44
|
-
margin-right: 0 `).concat(t, `;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
body[`).concat(e, `] {
|
|
48
|
-
`).concat(m, ": ").concat(c, `px;
|
|
49
|
-
}
|
|
50
|
-
`);
|
|
51
|
-
}, "getStyles"), s = /* @__PURE__ */ i(function() {
|
|
52
|
-
var n = parseInt(document.body.getAttribute(e) || "0", 10);
|
|
53
|
-
return isFinite(n) ? n : 0;
|
|
54
|
-
}, "getCurrentUseCounter"), S = /* @__PURE__ */ i(function() {
|
|
55
|
-
u.useEffect(function() {
|
|
56
|
-
return document.body.setAttribute(e, (s() + 1).toString()), function() {
|
|
57
|
-
var n = s() - 1;
|
|
58
|
-
n <= 0 ? document.body.removeAttribute(e) : document.body.setAttribute(e, n.toString());
|
|
59
|
-
};
|
|
60
|
-
}, []);
|
|
61
|
-
}, "useLockAttribute"), w = /* @__PURE__ */ i(function(n) {
|
|
62
|
-
var r = n.noRelative, o = n.noImportant, t = n.gapMode, a = t === void 0 ? "margin" : t;
|
|
63
|
-
S();
|
|
64
|
-
var g = u.useMemo(function() {
|
|
65
|
-
return b(a);
|
|
66
|
-
}, [a]);
|
|
67
|
-
return u.createElement(x, { styles: y(g, !r, a, o ? "" : "!important") });
|
|
68
|
-
}, "RemoveScrollBar");
|
|
69
|
-
export {
|
|
70
|
-
w as RemoveScrollBar,
|
|
71
|
-
e as lockAttribute,
|
|
72
|
-
S as useLockAttribute
|
|
73
|
-
};
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
var o = Object.defineProperty;
|
|
2
|
-
var i = (t, n) => o(t, "name", { value: n, configurable: !0 });
|
|
3
|
-
var f = {
|
|
4
|
-
left: 0,
|
|
5
|
-
top: 0,
|
|
6
|
-
right: 0,
|
|
7
|
-
gap: 0
|
|
8
|
-
}, d = /* @__PURE__ */ i(function(t) {
|
|
9
|
-
return parseInt(t || "", 10) || 0;
|
|
10
|
-
}, "parse"), g = /* @__PURE__ */ i(function(t) {
|
|
11
|
-
var n = window.getComputedStyle(document.body), r = n[t === "padding" ? "paddingLeft" : "marginLeft"], e = n[t === "padding" ? "paddingTop" : "marginTop"], a = n[t === "padding" ? "paddingRight" : "marginRight"];
|
|
12
|
-
return [d(r), d(e), d(a)];
|
|
13
|
-
}, "getOffset"), u = /* @__PURE__ */ i(function(t) {
|
|
14
|
-
if (t === void 0 && (t = "margin"), typeof window > "u")
|
|
15
|
-
return f;
|
|
16
|
-
var n = g(t), r = document.documentElement.clientWidth, e = window.innerWidth;
|
|
17
|
-
return {
|
|
18
|
-
left: n[0],
|
|
19
|
-
top: n[1],
|
|
20
|
-
right: n[2],
|
|
21
|
-
gap: Math.max(0, e - r + n[2] - n[0])
|
|
22
|
-
};
|
|
23
|
-
}, "getGapWidth");
|
|
24
|
-
export {
|
|
25
|
-
u as getGapWidth,
|
|
26
|
-
f as zeroGap
|
|
27
|
-
};
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
var i = Object.defineProperty;
|
|
2
|
-
var n = (t, e) => i(t, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { styleHookSingleton as s } from "./hook.js";
|
|
4
|
-
var a = /* @__PURE__ */ n(function() {
|
|
5
|
-
var t = s(), e = /* @__PURE__ */ n(function(r) {
|
|
6
|
-
var l = r.styles, o = r.dynamic;
|
|
7
|
-
return t(l, o), null;
|
|
8
|
-
}, "Sheet");
|
|
9
|
-
return e;
|
|
10
|
-
}, "styleSingleton");
|
|
11
|
-
export {
|
|
12
|
-
a as styleSingleton
|
|
13
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
var r = Object.defineProperty;
|
|
2
|
-
var n = (t, e) => r(t, "name", { value: e, configurable: !0 });
|
|
3
|
-
import * as f from "react";
|
|
4
|
-
import { stylesheetSingleton as i } from "./singleton.js";
|
|
5
|
-
var a = /* @__PURE__ */ n(function() {
|
|
6
|
-
var t = i();
|
|
7
|
-
return function(e, o) {
|
|
8
|
-
f.useEffect(function() {
|
|
9
|
-
return t.add(e), function() {
|
|
10
|
-
t.remove();
|
|
11
|
-
};
|
|
12
|
-
}, [e && o]);
|
|
13
|
-
};
|
|
14
|
-
}, "styleHookSingleton");
|
|
15
|
-
export {
|
|
16
|
-
a as styleHookSingleton
|
|
17
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
var r = Object.defineProperty;
|
|
2
|
-
var n = (t, e) => r(t, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { getNonce as l } from "../../../get-nonce/dist/es2015/index.js";
|
|
4
|
-
function a() {
|
|
5
|
-
if (!document)
|
|
6
|
-
return null;
|
|
7
|
-
var t = document.createElement("style");
|
|
8
|
-
t.type = "text/css";
|
|
9
|
-
var e = l();
|
|
10
|
-
return e && t.setAttribute("nonce", e), t;
|
|
11
|
-
}
|
|
12
|
-
n(a, "makeStyleTag");
|
|
13
|
-
function i(t, e) {
|
|
14
|
-
t.styleSheet ? t.styleSheet.cssText = e : t.appendChild(document.createTextNode(e));
|
|
15
|
-
}
|
|
16
|
-
n(i, "injectStyles");
|
|
17
|
-
function c(t) {
|
|
18
|
-
var e = document.head || document.getElementsByTagName("head")[0];
|
|
19
|
-
e.appendChild(t);
|
|
20
|
-
}
|
|
21
|
-
n(c, "insertStyleTag");
|
|
22
|
-
var s = /* @__PURE__ */ n(function() {
|
|
23
|
-
var t = 0, e = null;
|
|
24
|
-
return {
|
|
25
|
-
add: /* @__PURE__ */ n(function(o) {
|
|
26
|
-
t == 0 && (e = a()) && (i(e, o), c(e)), t++;
|
|
27
|
-
}, "add"),
|
|
28
|
-
remove: /* @__PURE__ */ n(function() {
|
|
29
|
-
t--, !t && e && (e.parentNode && e.parentNode.removeChild(e), e = null);
|
|
30
|
-
}, "remove")
|
|
31
|
-
};
|
|
32
|
-
}, "stylesheetSingleton");
|
|
33
|
-
export {
|
|
34
|
-
s as stylesheetSingleton
|
|
35
|
-
};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
var l = Object.defineProperty;
|
|
2
|
-
var p = (t, e) => l(t, "name", { value: e, configurable: !0 });
|
|
3
|
-
var c = /* @__PURE__ */ p(function() {
|
|
4
|
-
return c = Object.assign || /* @__PURE__ */ p(function(e) {
|
|
5
|
-
for (var n, r = 1, o = arguments.length; r < o; r++) {
|
|
6
|
-
n = arguments[r];
|
|
7
|
-
for (var a in n) Object.prototype.hasOwnProperty.call(n, a) && (e[a] = n[a]);
|
|
8
|
-
}
|
|
9
|
-
return e;
|
|
10
|
-
}, "__assign"), c.apply(this, arguments);
|
|
11
|
-
}, "__assign");
|
|
12
|
-
function s(t, e) {
|
|
13
|
-
var n = {};
|
|
14
|
-
for (var r in t) Object.prototype.hasOwnProperty.call(t, r) && e.indexOf(r) < 0 && (n[r] = t[r]);
|
|
15
|
-
if (t != null && typeof Object.getOwnPropertySymbols == "function")
|
|
16
|
-
for (var o = 0, r = Object.getOwnPropertySymbols(t); o < r.length; o++)
|
|
17
|
-
e.indexOf(r[o]) < 0 && Object.prototype.propertyIsEnumerable.call(t, r[o]) && (n[r[o]] = t[r[o]]);
|
|
18
|
-
return n;
|
|
19
|
-
}
|
|
20
|
-
p(s, "__rest");
|
|
21
|
-
function f(t, e, n) {
|
|
22
|
-
if (n || arguments.length === 2) for (var r = 0, o = e.length, a; r < o; r++)
|
|
23
|
-
(a || !(r in e)) && (a || (a = Array.prototype.slice.call(e, 0, r)), a[r] = e[r]);
|
|
24
|
-
return t.concat(a || Array.prototype.slice.call(e));
|
|
25
|
-
}
|
|
26
|
-
p(f, "__spreadArray");
|
|
27
|
-
export {
|
|
28
|
-
c as __assign,
|
|
29
|
-
s as __rest,
|
|
30
|
-
f as __spreadArray
|
|
31
|
-
};
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
var m = Object.defineProperty;
|
|
2
|
-
var c = (a, r) => m(a, "name", { value: r, configurable: !0 });
|
|
3
|
-
import * as i from "react";
|
|
4
|
-
import { assignRef as o } from "./assignRef.js";
|
|
5
|
-
import { useCallbackRef as h } from "./useRef.js";
|
|
6
|
-
var p = typeof window < "u" ? i.useLayoutEffect : i.useEffect, l = /* @__PURE__ */ new WeakMap();
|
|
7
|
-
function w(a, r) {
|
|
8
|
-
var t = h(null, function(n) {
|
|
9
|
-
return a.forEach(function(u) {
|
|
10
|
-
return o(u, n);
|
|
11
|
-
});
|
|
12
|
-
});
|
|
13
|
-
return p(function() {
|
|
14
|
-
var n = l.get(t);
|
|
15
|
-
if (n) {
|
|
16
|
-
var u = new Set(n), f = new Set(a), s = t.current;
|
|
17
|
-
u.forEach(function(e) {
|
|
18
|
-
f.has(e) || o(e, null);
|
|
19
|
-
}), f.forEach(function(e) {
|
|
20
|
-
u.has(e) || o(e, s);
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
l.set(t, a);
|
|
24
|
-
}, [a]), t;
|
|
25
|
-
}
|
|
26
|
-
c(w, "useMergeRefs");
|
|
27
|
-
export {
|
|
28
|
-
w as useMergeRefs
|
|
29
|
-
};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
var l = Object.defineProperty;
|
|
2
|
-
var u = (r, a) => l(r, "name", { value: a, configurable: !0 });
|
|
3
|
-
import { useState as n } from "react";
|
|
4
|
-
function i(r, a) {
|
|
5
|
-
var e = n(function() {
|
|
6
|
-
return {
|
|
7
|
-
// value
|
|
8
|
-
value: r,
|
|
9
|
-
// last callback
|
|
10
|
-
callback: a,
|
|
11
|
-
// "memoized" public interface
|
|
12
|
-
facade: {
|
|
13
|
-
get current() {
|
|
14
|
-
return e.value;
|
|
15
|
-
},
|
|
16
|
-
set current(t) {
|
|
17
|
-
var c = e.value;
|
|
18
|
-
c !== t && (e.value = t, e.callback(t, c));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
};
|
|
22
|
-
})[0];
|
|
23
|
-
return e.callback = a, e.facade;
|
|
24
|
-
}
|
|
25
|
-
u(i, "useCallbackRef");
|
|
26
|
-
export {
|
|
27
|
-
i as useCallbackRef
|
|
28
|
-
};
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
var d = Object.defineProperty;
|
|
2
|
-
var t = (r, e) => d(r, "name", { value: e, configurable: !0 });
|
|
3
|
-
import { __rest as n, __assign as s } from "../../../tslib/tslib.es6.js";
|
|
4
|
-
import * as p from "react";
|
|
5
|
-
var a = /* @__PURE__ */ t(function(r) {
|
|
6
|
-
var e = r.sideCar, o = n(r, ["sideCar"]);
|
|
7
|
-
if (!e)
|
|
8
|
-
throw new Error("Sidecar: please provide `sideCar` property to import the right car");
|
|
9
|
-
var i = e.read();
|
|
10
|
-
if (!i)
|
|
11
|
-
throw new Error("Sidecar medium not found");
|
|
12
|
-
return p.createElement(i, s({}, o));
|
|
13
|
-
}, "SideCar");
|
|
14
|
-
a.isSideCarExport = !0;
|
|
15
|
-
function c(r, e) {
|
|
16
|
-
return r.useMedium(e), a;
|
|
17
|
-
}
|
|
18
|
-
t(c, "exportSidecar");
|
|
19
|
-
export {
|
|
20
|
-
c as exportSidecar
|
|
21
|
-
};
|
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
var l = Object.defineProperty;
|
|
2
|
-
var n = (u, t) => l(u, "name", { value: t, configurable: !0 });
|
|
3
|
-
import { __assign as h } from "../../../tslib/tslib.es6.js";
|
|
4
|
-
function m(u) {
|
|
5
|
-
return u;
|
|
6
|
-
}
|
|
7
|
-
n(m, "ItoI");
|
|
8
|
-
function v(u, t) {
|
|
9
|
-
t === void 0 && (t = m);
|
|
10
|
-
var e = [], a = !1, s = {
|
|
11
|
-
read: /* @__PURE__ */ n(function() {
|
|
12
|
-
if (a)
|
|
13
|
-
throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");
|
|
14
|
-
return e.length ? e[e.length - 1] : u;
|
|
15
|
-
}, "read"),
|
|
16
|
-
useMedium: /* @__PURE__ */ n(function(i) {
|
|
17
|
-
var r = t(i, a);
|
|
18
|
-
return e.push(r), function() {
|
|
19
|
-
e = e.filter(function(f) {
|
|
20
|
-
return f !== r;
|
|
21
|
-
});
|
|
22
|
-
};
|
|
23
|
-
}, "useMedium"),
|
|
24
|
-
assignSyncMedium: /* @__PURE__ */ n(function(i) {
|
|
25
|
-
for (a = !0; e.length; ) {
|
|
26
|
-
var r = e;
|
|
27
|
-
e = [], r.forEach(i);
|
|
28
|
-
}
|
|
29
|
-
e = {
|
|
30
|
-
push: /* @__PURE__ */ n(function(f) {
|
|
31
|
-
return i(f);
|
|
32
|
-
}, "push"),
|
|
33
|
-
filter: /* @__PURE__ */ n(function() {
|
|
34
|
-
return e;
|
|
35
|
-
}, "filter")
|
|
36
|
-
};
|
|
37
|
-
}, "assignSyncMedium"),
|
|
38
|
-
assignMedium: /* @__PURE__ */ n(function(i) {
|
|
39
|
-
a = !0;
|
|
40
|
-
var r = [];
|
|
41
|
-
if (e.length) {
|
|
42
|
-
var f = e;
|
|
43
|
-
e = [], f.forEach(i), r = e;
|
|
44
|
-
}
|
|
45
|
-
var d = /* @__PURE__ */ n(function() {
|
|
46
|
-
var o = r;
|
|
47
|
-
r = [], o.forEach(i);
|
|
48
|
-
}, "executeQueue"), c = /* @__PURE__ */ n(function() {
|
|
49
|
-
return Promise.resolve().then(d);
|
|
50
|
-
}, "cycle");
|
|
51
|
-
c(), e = {
|
|
52
|
-
push: /* @__PURE__ */ n(function(o) {
|
|
53
|
-
r.push(o), c();
|
|
54
|
-
}, "push"),
|
|
55
|
-
filter: /* @__PURE__ */ n(function(o) {
|
|
56
|
-
return r = r.filter(o), e;
|
|
57
|
-
}, "filter")
|
|
58
|
-
};
|
|
59
|
-
}, "assignMedium")
|
|
60
|
-
};
|
|
61
|
-
return s;
|
|
62
|
-
}
|
|
63
|
-
n(v, "innerCreateMedium");
|
|
64
|
-
function M(u) {
|
|
65
|
-
u === void 0 && (u = {});
|
|
66
|
-
var t = v(null);
|
|
67
|
-
return t.options = h({ async: !0, ssr: !1 }, u), t;
|
|
68
|
-
}
|
|
69
|
-
n(M, "createSidecarMedium");
|
|
70
|
-
export {
|
|
71
|
-
M as createSidecarMedium
|
|
72
|
-
};
|