@phillips/seldon 1.138.0 → 1.140.0
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/Countdown/Countdown.js +42 -38
- package/dist/components/Countdown/Countdown.stories.d.ts +14 -0
- package/dist/index.d.ts +42 -41
- package/dist/index.js +171 -169
- package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-collection/dist/index.js +27 -27
- package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +24 -9
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +50 -34
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +45 -45
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-popover/dist/index.js +239 -0
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +30 -25
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +13 -13
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +364 -338
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +41 -40
- package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +2 -2
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +3 -3
- package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +1 -1
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.d.ts +75 -0
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.js +131 -0
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.stories.d.ts +78 -0
- package/dist/patterns/FavoritesCollectionTile/FavoritesCollectionTile.test.d.ts +1 -0
- package/dist/patterns/FavoritesCollectionTile/index.d.ts +1 -0
- package/dist/scss/_vars.scss +1 -0
- package/dist/scss/_vars.scss.js +1 -0
- package/dist/scss/componentStyles.scss +1 -0
- package/dist/scss/components/Countdown/_countdown.scss +10 -0
- package/dist/scss/components/Countdown/_duration.scss +0 -6
- package/dist/scss/patterns/FavoritesCollectionTile/_favoritesCollectionTile.scss +159 -0
- package/package.json +2 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +0 -9
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -29
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +0 -68
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -127
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -17
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -136
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +0 -15
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +0 -35
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +0 -47
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -11
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -112
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -31
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -16
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -62
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
- package/dist/node_modules/@radix-ui/react-select/node_modules/tslib/tslib.es6.js +0 -27
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +0 -53
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +0 -70
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import * as f from "react";
|
|
2
|
-
function l(n, o) {
|
|
3
|
-
if (typeof n == "function")
|
|
4
|
-
return n(o);
|
|
5
|
-
n != null && (n.current = o);
|
|
6
|
-
}
|
|
7
|
-
function i(...n) {
|
|
8
|
-
return (o) => {
|
|
9
|
-
let u = !1;
|
|
10
|
-
const c = n.map((t) => {
|
|
11
|
-
const e = l(t, o);
|
|
12
|
-
return !u && typeof e == "function" && (u = !0), e;
|
|
13
|
-
});
|
|
14
|
-
if (u)
|
|
15
|
-
return () => {
|
|
16
|
-
for (let t = 0; t < c.length; t++) {
|
|
17
|
-
const e = c[t];
|
|
18
|
-
typeof e == "function" ? e() : l(n[t], null);
|
|
19
|
-
}
|
|
20
|
-
};
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
function s(...n) {
|
|
24
|
-
return f.useCallback(i(...n), n);
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
i as composeRefs,
|
|
28
|
-
s as useComposedRefs
|
|
29
|
-
};
|
package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js
DELETED
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import * as u from "react";
|
|
2
|
-
import { jsx as f } from "react/jsx-runtime";
|
|
3
|
-
function $(t, c) {
|
|
4
|
-
const n = u.createContext(c), p = (r) => {
|
|
5
|
-
const { children: e, ...o } = r, s = u.useMemo(() => o, Object.values(o));
|
|
6
|
-
return /* @__PURE__ */ f(n.Provider, { value: s, children: e });
|
|
7
|
-
};
|
|
8
|
-
p.displayName = t + "Provider";
|
|
9
|
-
function i(r) {
|
|
10
|
-
const e = u.useContext(n);
|
|
11
|
-
if (e) return e;
|
|
12
|
-
if (c !== void 0) return c;
|
|
13
|
-
throw new Error(`\`${r}\` must be used within \`${t}\``);
|
|
14
|
-
}
|
|
15
|
-
return [p, i];
|
|
16
|
-
}
|
|
17
|
-
function w(t, c = []) {
|
|
18
|
-
let n = [];
|
|
19
|
-
function p(r, e) {
|
|
20
|
-
const o = u.createContext(e), s = n.length;
|
|
21
|
-
n = [...n, e];
|
|
22
|
-
const d = (x) => {
|
|
23
|
-
const { scope: m, children: v, ...a } = x, S = m?.[t]?.[s] || o, h = u.useMemo(() => a, Object.values(a));
|
|
24
|
-
return /* @__PURE__ */ f(S.Provider, { value: h, children: v });
|
|
25
|
-
};
|
|
26
|
-
d.displayName = r + "Provider";
|
|
27
|
-
function C(x, m) {
|
|
28
|
-
const v = m?.[t]?.[s] || o, a = u.useContext(v);
|
|
29
|
-
if (a) return a;
|
|
30
|
-
if (e !== void 0) return e;
|
|
31
|
-
throw new Error(`\`${x}\` must be used within \`${r}\``);
|
|
32
|
-
}
|
|
33
|
-
return [d, C];
|
|
34
|
-
}
|
|
35
|
-
const i = () => {
|
|
36
|
-
const r = n.map((e) => u.createContext(e));
|
|
37
|
-
return function(o) {
|
|
38
|
-
const s = o?.[t] || r;
|
|
39
|
-
return u.useMemo(
|
|
40
|
-
() => ({ [`__scope${t}`]: { ...o, [t]: s } }),
|
|
41
|
-
[o, s]
|
|
42
|
-
);
|
|
43
|
-
};
|
|
44
|
-
};
|
|
45
|
-
return i.scopeName = t, [p, P(i, ...c)];
|
|
46
|
-
}
|
|
47
|
-
function P(...t) {
|
|
48
|
-
const c = t[0];
|
|
49
|
-
if (t.length === 1) return c;
|
|
50
|
-
const n = () => {
|
|
51
|
-
const p = t.map((i) => ({
|
|
52
|
-
useScope: i(),
|
|
53
|
-
scopeName: i.scopeName
|
|
54
|
-
}));
|
|
55
|
-
return function(r) {
|
|
56
|
-
const e = p.reduce((o, { useScope: s, scopeName: d }) => {
|
|
57
|
-
const x = s(r)[`__scope${d}`];
|
|
58
|
-
return { ...o, ...x };
|
|
59
|
-
}, {});
|
|
60
|
-
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: e }), [e]);
|
|
61
|
-
};
|
|
62
|
-
};
|
|
63
|
-
return n.scopeName = c.scopeName, n;
|
|
64
|
-
}
|
|
65
|
-
export {
|
|
66
|
-
$ as createContext,
|
|
67
|
-
w as createContextScope
|
|
68
|
-
};
|
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
import * as n from "react";
|
|
2
|
-
import { composeEventHandlers as h } from "../../primitive/dist/index.js";
|
|
3
|
-
import { Primitive as w, dispatchDiscreteCustomEvent as k } from "../../react-primitive/dist/index.js";
|
|
4
|
-
import { useComposedRefs as g } from "../../react-compose-refs/dist/index.js";
|
|
5
|
-
import { useCallbackRef as R } from "../../../../../react-use-callback-ref/dist/index.js";
|
|
6
|
-
import { useEscapeKeydown as U } from "../../../../../react-use-escape-keydown/dist/index.js";
|
|
7
|
-
import { jsx as T } from "react/jsx-runtime";
|
|
8
|
-
var z = "DismissableLayer", y = "dismissableLayer.update", H = "dismissableLayer.pointerDownOutside", M = "dismissableLayer.focusOutside", C, B = n.createContext({
|
|
9
|
-
layers: /* @__PURE__ */ new Set(),
|
|
10
|
-
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
11
|
-
branches: /* @__PURE__ */ new Set()
|
|
12
|
-
}), K = n.forwardRef(
|
|
13
|
-
(s, e) => {
|
|
14
|
-
const {
|
|
15
|
-
disableOutsidePointerEvents: r = !1,
|
|
16
|
-
onEscapeKeyDown: a,
|
|
17
|
-
onPointerDownOutside: i,
|
|
18
|
-
onFocusOutside: c,
|
|
19
|
-
onInteractOutside: f,
|
|
20
|
-
onDismiss: d,
|
|
21
|
-
...E
|
|
22
|
-
} = s, o = n.useContext(B), [u, F] = n.useState(null), l = u?.ownerDocument ?? globalThis?.document, [, I] = n.useState({}), S = g(e, (t) => F(t)), p = Array.from(o.layers), [W] = [...o.layersWithOutsidePointerEventsDisabled].slice(-1), A = p.indexOf(W), b = u ? p.indexOf(u) : -1, N = o.layersWithOutsidePointerEventsDisabled.size > 0, D = b >= A, _ = Y((t) => {
|
|
23
|
-
const v = t.target, P = [...o.branches].some((m) => m.contains(v));
|
|
24
|
-
!D || P || (i?.(t), f?.(t), t.defaultPrevented || d?.());
|
|
25
|
-
}, l), O = q((t) => {
|
|
26
|
-
const v = t.target;
|
|
27
|
-
[...o.branches].some((m) => m.contains(v)) || (c?.(t), f?.(t), t.defaultPrevented || d?.());
|
|
28
|
-
}, l);
|
|
29
|
-
return U((t) => {
|
|
30
|
-
b === o.layers.size - 1 && (a?.(t), !t.defaultPrevented && d && (t.preventDefault(), d()));
|
|
31
|
-
}, l), n.useEffect(() => {
|
|
32
|
-
if (u)
|
|
33
|
-
return r && (o.layersWithOutsidePointerEventsDisabled.size === 0 && (C = l.body.style.pointerEvents, l.body.style.pointerEvents = "none"), o.layersWithOutsidePointerEventsDisabled.add(u)), o.layers.add(u), L(), () => {
|
|
34
|
-
r && o.layersWithOutsidePointerEventsDisabled.size === 1 && (l.body.style.pointerEvents = C);
|
|
35
|
-
};
|
|
36
|
-
}, [u, l, r, o]), n.useEffect(() => () => {
|
|
37
|
-
u && (o.layers.delete(u), o.layersWithOutsidePointerEventsDisabled.delete(u), L());
|
|
38
|
-
}, [u, o]), n.useEffect(() => {
|
|
39
|
-
const t = () => I({});
|
|
40
|
-
return document.addEventListener(y, t), () => document.removeEventListener(y, t);
|
|
41
|
-
}, []), /* @__PURE__ */ T(
|
|
42
|
-
w.div,
|
|
43
|
-
{
|
|
44
|
-
...E,
|
|
45
|
-
ref: S,
|
|
46
|
-
style: {
|
|
47
|
-
pointerEvents: N ? D ? "auto" : "none" : void 0,
|
|
48
|
-
...s.style
|
|
49
|
-
},
|
|
50
|
-
onFocusCapture: h(s.onFocusCapture, O.onFocusCapture),
|
|
51
|
-
onBlurCapture: h(s.onBlurCapture, O.onBlurCapture),
|
|
52
|
-
onPointerDownCapture: h(
|
|
53
|
-
s.onPointerDownCapture,
|
|
54
|
-
_.onPointerDownCapture
|
|
55
|
-
)
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
59
|
-
);
|
|
60
|
-
K.displayName = z;
|
|
61
|
-
var j = "DismissableLayerBranch", X = n.forwardRef((s, e) => {
|
|
62
|
-
const r = n.useContext(B), a = n.useRef(null), i = g(e, a);
|
|
63
|
-
return n.useEffect(() => {
|
|
64
|
-
const c = a.current;
|
|
65
|
-
if (c)
|
|
66
|
-
return r.branches.add(c), () => {
|
|
67
|
-
r.branches.delete(c);
|
|
68
|
-
};
|
|
69
|
-
}, [r.branches]), /* @__PURE__ */ T(w.div, { ...s, ref: i });
|
|
70
|
-
});
|
|
71
|
-
X.displayName = j;
|
|
72
|
-
function Y(s, e = globalThis?.document) {
|
|
73
|
-
const r = R(s), a = n.useRef(!1), i = n.useRef(() => {
|
|
74
|
-
});
|
|
75
|
-
return n.useEffect(() => {
|
|
76
|
-
const c = (d) => {
|
|
77
|
-
if (d.target && !a.current) {
|
|
78
|
-
let E = function() {
|
|
79
|
-
x(
|
|
80
|
-
H,
|
|
81
|
-
r,
|
|
82
|
-
o,
|
|
83
|
-
{ discrete: !0 }
|
|
84
|
-
);
|
|
85
|
-
};
|
|
86
|
-
const o = { originalEvent: d };
|
|
87
|
-
d.pointerType === "touch" ? (e.removeEventListener("click", i.current), i.current = E, e.addEventListener("click", i.current, { once: !0 })) : E();
|
|
88
|
-
} else
|
|
89
|
-
e.removeEventListener("click", i.current);
|
|
90
|
-
a.current = !1;
|
|
91
|
-
}, f = window.setTimeout(() => {
|
|
92
|
-
e.addEventListener("pointerdown", c);
|
|
93
|
-
}, 0);
|
|
94
|
-
return () => {
|
|
95
|
-
window.clearTimeout(f), e.removeEventListener("pointerdown", c), e.removeEventListener("click", i.current);
|
|
96
|
-
};
|
|
97
|
-
}, [e, r]), {
|
|
98
|
-
// ensures we check React component tree (not just DOM tree)
|
|
99
|
-
onPointerDownCapture: () => a.current = !0
|
|
100
|
-
};
|
|
101
|
-
}
|
|
102
|
-
function q(s, e = globalThis?.document) {
|
|
103
|
-
const r = R(s), a = n.useRef(!1);
|
|
104
|
-
return n.useEffect(() => {
|
|
105
|
-
const i = (c) => {
|
|
106
|
-
c.target && !a.current && x(M, r, { originalEvent: c }, {
|
|
107
|
-
discrete: !1
|
|
108
|
-
});
|
|
109
|
-
};
|
|
110
|
-
return e.addEventListener("focusin", i), () => e.removeEventListener("focusin", i);
|
|
111
|
-
}, [e, r]), {
|
|
112
|
-
onFocusCapture: () => a.current = !0,
|
|
113
|
-
onBlurCapture: () => a.current = !1
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
function L() {
|
|
117
|
-
const s = new CustomEvent(y);
|
|
118
|
-
document.dispatchEvent(s);
|
|
119
|
-
}
|
|
120
|
-
function x(s, e, r, { discrete: a }) {
|
|
121
|
-
const i = r.originalEvent.target, c = new CustomEvent(s, { bubbles: !1, cancelable: !0, detail: r });
|
|
122
|
-
e && i.addEventListener(s, e, { once: !0 }), a ? k(i, c) : i.dispatchEvent(c);
|
|
123
|
-
}
|
|
124
|
-
export {
|
|
125
|
-
K as DismissableLayer,
|
|
126
|
-
X as DismissableLayerBranch
|
|
127
|
-
};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import * as r from "react";
|
|
2
|
-
var t = 0;
|
|
3
|
-
function a() {
|
|
4
|
-
r.useEffect(() => {
|
|
5
|
-
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
6
|
-
return document.body.insertAdjacentElement("afterbegin", e[0] ?? n()), document.body.insertAdjacentElement("beforeend", e[1] ?? n()), t++, () => {
|
|
7
|
-
t === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((o) => o.remove()), t--;
|
|
8
|
-
};
|
|
9
|
-
}, []);
|
|
10
|
-
}
|
|
11
|
-
function n() {
|
|
12
|
-
const e = document.createElement("span");
|
|
13
|
-
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
14
|
-
}
|
|
15
|
-
export {
|
|
16
|
-
a as useFocusGuards
|
|
17
|
-
};
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import * as d from "react";
|
|
2
|
-
import { useComposedRefs as R } from "../../react-compose-refs/dist/index.js";
|
|
3
|
-
import { Primitive as M } from "../../react-primitive/dist/index.js";
|
|
4
|
-
import { useCallbackRef as y } from "../../../../../react-use-callback-ref/dist/index.js";
|
|
5
|
-
import { jsx as _ } from "react/jsx-runtime";
|
|
6
|
-
var F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, t) => {
|
|
7
|
-
const {
|
|
8
|
-
loop: n = !1,
|
|
9
|
-
trapped: u = !1,
|
|
10
|
-
onMountAutoFocus: p,
|
|
11
|
-
onUnmountAutoFocus: L,
|
|
12
|
-
...g
|
|
13
|
-
} = e, [o, U] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), A = R(t, (s) => U(s)), a = d.useRef({
|
|
14
|
-
paused: !1,
|
|
15
|
-
pause() {
|
|
16
|
-
this.paused = !0;
|
|
17
|
-
},
|
|
18
|
-
resume() {
|
|
19
|
-
this.paused = !1;
|
|
20
|
-
}
|
|
21
|
-
}).current;
|
|
22
|
-
d.useEffect(() => {
|
|
23
|
-
if (u) {
|
|
24
|
-
let s = function(i) {
|
|
25
|
-
if (a.paused || !o) return;
|
|
26
|
-
const c = i.target;
|
|
27
|
-
o.contains(c) ? b.current = c : f(b.current, { select: !0 });
|
|
28
|
-
}, l = function(i) {
|
|
29
|
-
if (a.paused || !o) return;
|
|
30
|
-
const c = i.relatedTarget;
|
|
31
|
-
c !== null && (o.contains(c) || f(b.current, { select: !0 }));
|
|
32
|
-
}, r = function(i) {
|
|
33
|
-
if (document.activeElement === document.body)
|
|
34
|
-
for (const h of i)
|
|
35
|
-
h.removedNodes.length > 0 && f(o);
|
|
36
|
-
};
|
|
37
|
-
document.addEventListener("focusin", s), document.addEventListener("focusout", l);
|
|
38
|
-
const m = new MutationObserver(r);
|
|
39
|
-
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
40
|
-
document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
}, [u, o, a.paused]), d.useEffect(() => {
|
|
44
|
-
if (o) {
|
|
45
|
-
O.add(a);
|
|
46
|
-
const s = document.activeElement;
|
|
47
|
-
if (!o.contains(s)) {
|
|
48
|
-
const r = new CustomEvent(F, N);
|
|
49
|
-
o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(W(I(o)), { select: !0 }), document.activeElement === s && f(o));
|
|
50
|
-
}
|
|
51
|
-
return () => {
|
|
52
|
-
o.removeEventListener(F, E), setTimeout(() => {
|
|
53
|
-
const r = new CustomEvent(T, N);
|
|
54
|
-
o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), O.remove(a);
|
|
55
|
-
}, 0);
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
}, [o, E, v, a]);
|
|
59
|
-
const P = d.useCallback(
|
|
60
|
-
(s) => {
|
|
61
|
-
if (!n && !u || a.paused) return;
|
|
62
|
-
const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
|
|
63
|
-
if (l && r) {
|
|
64
|
-
const m = s.currentTarget, [i, c] = x(m);
|
|
65
|
-
i && c ? !s.shiftKey && r === c ? (s.preventDefault(), n && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), n && f(c, { select: !0 })) : r === m && s.preventDefault();
|
|
66
|
-
}
|
|
67
|
-
},
|
|
68
|
-
[n, u, a.paused]
|
|
69
|
-
);
|
|
70
|
-
return /* @__PURE__ */ _(M.div, { tabIndex: -1, ...g, ref: A, onKeyDown: P });
|
|
71
|
-
});
|
|
72
|
-
k.displayName = K;
|
|
73
|
-
function w(e, { select: t = !1 } = {}) {
|
|
74
|
-
const n = document.activeElement;
|
|
75
|
-
for (const u of e)
|
|
76
|
-
if (f(u, { select: t }), document.activeElement !== n) return;
|
|
77
|
-
}
|
|
78
|
-
function x(e) {
|
|
79
|
-
const t = I(e), n = S(t, e), u = S(t.reverse(), e);
|
|
80
|
-
return [n, u];
|
|
81
|
-
}
|
|
82
|
-
function I(e) {
|
|
83
|
-
const t = [], n = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
84
|
-
acceptNode: (u) => {
|
|
85
|
-
const p = u.tagName === "INPUT" && u.type === "hidden";
|
|
86
|
-
return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
87
|
-
}
|
|
88
|
-
});
|
|
89
|
-
for (; n.nextNode(); ) t.push(n.currentNode);
|
|
90
|
-
return t;
|
|
91
|
-
}
|
|
92
|
-
function S(e, t) {
|
|
93
|
-
for (const n of e)
|
|
94
|
-
if (!D(n, { upTo: t })) return n;
|
|
95
|
-
}
|
|
96
|
-
function D(e, { upTo: t }) {
|
|
97
|
-
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
98
|
-
for (; e; ) {
|
|
99
|
-
if (t !== void 0 && e === t) return !1;
|
|
100
|
-
if (getComputedStyle(e).display === "none") return !0;
|
|
101
|
-
e = e.parentElement;
|
|
102
|
-
}
|
|
103
|
-
return !1;
|
|
104
|
-
}
|
|
105
|
-
function H(e) {
|
|
106
|
-
return e instanceof HTMLInputElement && "select" in e;
|
|
107
|
-
}
|
|
108
|
-
function f(e, { select: t = !1 } = {}) {
|
|
109
|
-
if (e && e.focus) {
|
|
110
|
-
const n = document.activeElement;
|
|
111
|
-
e.focus({ preventScroll: !0 }), e !== n && H(e) && t && e.select();
|
|
112
|
-
}
|
|
113
|
-
}
|
|
114
|
-
var O = V();
|
|
115
|
-
function V() {
|
|
116
|
-
let e = [];
|
|
117
|
-
return {
|
|
118
|
-
add(t) {
|
|
119
|
-
const n = e[0];
|
|
120
|
-
t !== n && n?.pause(), e = C(e, t), e.unshift(t);
|
|
121
|
-
},
|
|
122
|
-
remove(t) {
|
|
123
|
-
e = C(e, t), e[0]?.resume();
|
|
124
|
-
}
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
function C(e, t) {
|
|
128
|
-
const n = [...e], u = n.indexOf(t);
|
|
129
|
-
return u !== -1 && n.splice(u, 1), n;
|
|
130
|
-
}
|
|
131
|
-
function W(e) {
|
|
132
|
-
return e.filter((t) => t.tagName !== "A");
|
|
133
|
-
}
|
|
134
|
-
export {
|
|
135
|
-
k as FocusScope
|
|
136
|
-
};
|
package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import n from "react-dom";
|
|
3
|
-
import { Primitive as s } from "../../react-primitive/dist/index.js";
|
|
4
|
-
import { useLayoutEffect as c } from "../../../../../react-use-layout-effect/dist/index.js";
|
|
5
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
6
|
-
var l = "Portal", p = o.forwardRef((r, e) => {
|
|
7
|
-
const { container: a, ...f } = r, [i, m] = o.useState(!1);
|
|
8
|
-
c(() => m(!0), []);
|
|
9
|
-
const t = a || i && globalThis?.document?.body;
|
|
10
|
-
return t ? n.createPortal(/* @__PURE__ */ u(s.div, { ...f, ref: e }), t) : null;
|
|
11
|
-
});
|
|
12
|
-
p.displayName = l;
|
|
13
|
-
export {
|
|
14
|
-
p as Portal
|
|
15
|
-
};
|
package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import * as i from "react";
|
|
2
|
-
import { useComposedRefs as O } from "../../react-compose-refs/dist/index.js";
|
|
3
|
-
import { useLayoutEffect as A } from "../../../../../react-use-layout-effect/dist/index.js";
|
|
4
|
-
function E(n, e) {
|
|
5
|
-
return i.useReducer((t, r) => e[t][r] ?? t, n);
|
|
6
|
-
}
|
|
7
|
-
var T = (n) => {
|
|
8
|
-
const { present: e, children: t } = n, r = R(e), a = typeof t == "function" ? t({ present: r.isPresent }) : i.Children.only(t), c = O(r.ref, v(a));
|
|
9
|
-
return typeof t == "function" || r.isPresent ? i.cloneElement(a, { ref: c }) : null;
|
|
10
|
-
};
|
|
11
|
-
T.displayName = "Presence";
|
|
12
|
-
function R(n) {
|
|
13
|
-
const [e, t] = i.useState(), r = i.useRef({}), a = i.useRef(n), c = i.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = E(p, {
|
|
14
|
-
mounted: {
|
|
15
|
-
UNMOUNT: "unmounted",
|
|
16
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
17
|
-
},
|
|
18
|
-
unmountSuspended: {
|
|
19
|
-
MOUNT: "mounted",
|
|
20
|
-
ANIMATION_END: "unmounted"
|
|
21
|
-
},
|
|
22
|
-
unmounted: {
|
|
23
|
-
MOUNT: "mounted"
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return i.useEffect(() => {
|
|
27
|
-
const o = l(r.current);
|
|
28
|
-
c.current = N === "mounted" ? o : "none";
|
|
29
|
-
}, [N]), A(() => {
|
|
30
|
-
const o = r.current, m = a.current;
|
|
31
|
-
if (m !== n) {
|
|
32
|
-
const f = c.current, u = l(o);
|
|
33
|
-
n ? s("MOUNT") : u === "none" || o?.display === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
|
|
34
|
-
}
|
|
35
|
-
}, [n, s]), A(() => {
|
|
36
|
-
if (e) {
|
|
37
|
-
let o;
|
|
38
|
-
const m = e.ownerDocument.defaultView ?? window, d = (u) => {
|
|
39
|
-
const g = l(r.current).includes(u.animationName);
|
|
40
|
-
if (u.target === e && g && (s("ANIMATION_END"), !a.current)) {
|
|
41
|
-
const y = e.style.animationFillMode;
|
|
42
|
-
e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
|
|
43
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = y);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}, f = (u) => {
|
|
47
|
-
u.target === e && (c.current = l(r.current));
|
|
48
|
-
};
|
|
49
|
-
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
50
|
-
m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
51
|
-
};
|
|
52
|
-
} else
|
|
53
|
-
s("ANIMATION_END");
|
|
54
|
-
}, [e, s]), {
|
|
55
|
-
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
56
|
-
ref: i.useCallback((o) => {
|
|
57
|
-
o && (r.current = getComputedStyle(o)), t(o);
|
|
58
|
-
}, [])
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function l(n) {
|
|
62
|
-
return n?.animationName || "none";
|
|
63
|
-
}
|
|
64
|
-
function v(n) {
|
|
65
|
-
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
66
|
-
return t ? n.ref : (e = Object.getOwnPropertyDescriptor(n, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning, t ? n.props.ref : n.props.ref || n.ref);
|
|
67
|
-
}
|
|
68
|
-
export {
|
|
69
|
-
T as Presence
|
|
70
|
-
};
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import * as s from "react";
|
|
2
|
-
import * as f from "react-dom";
|
|
3
|
-
import { Slot as p } from "../../react-slot/dist/index.js";
|
|
4
|
-
import { jsx as u } from "react/jsx-runtime";
|
|
5
|
-
var c = [
|
|
6
|
-
"a",
|
|
7
|
-
"button",
|
|
8
|
-
"div",
|
|
9
|
-
"form",
|
|
10
|
-
"h2",
|
|
11
|
-
"h3",
|
|
12
|
-
"img",
|
|
13
|
-
"input",
|
|
14
|
-
"label",
|
|
15
|
-
"li",
|
|
16
|
-
"nav",
|
|
17
|
-
"ol",
|
|
18
|
-
"p",
|
|
19
|
-
"span",
|
|
20
|
-
"svg",
|
|
21
|
-
"ul"
|
|
22
|
-
], v = c.reduce((r, i) => {
|
|
23
|
-
const t = s.forwardRef((o, e) => {
|
|
24
|
-
const { asChild: m, ...a } = o, n = m ? p : i;
|
|
25
|
-
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(n, { ...a, ref: e });
|
|
26
|
-
});
|
|
27
|
-
return t.displayName = `Primitive.${i}`, { ...r, [i]: t };
|
|
28
|
-
}, {});
|
|
29
|
-
function h(r, i) {
|
|
30
|
-
r && f.flushSync(() => r.dispatchEvent(i));
|
|
31
|
-
}
|
|
32
|
-
export {
|
|
33
|
-
v as Primitive,
|
|
34
|
-
h as dispatchDiscreteCustomEvent
|
|
35
|
-
};
|
package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import * as o from "react";
|
|
2
|
-
import { composeRefs as u } from "../../react-compose-refs/dist/index.js";
|
|
3
|
-
import { jsx as c, Fragment as d } from "react/jsx-runtime";
|
|
4
|
-
var m = o.forwardRef((e, n) => {
|
|
5
|
-
const { children: r, ...t } = e, l = o.Children.toArray(r), i = l.find(y);
|
|
6
|
-
if (i) {
|
|
7
|
-
const s = i.props.children, a = l.map((p) => p === i ? o.Children.count(s) > 1 ? o.Children.only(null) : o.isValidElement(s) ? s.props.children : null : p);
|
|
8
|
-
return /* @__PURE__ */ c(f, { ...t, ref: n, children: o.isValidElement(s) ? o.cloneElement(s, void 0, a) : null });
|
|
9
|
-
}
|
|
10
|
-
return /* @__PURE__ */ c(f, { ...t, ref: n, children: r });
|
|
11
|
-
});
|
|
12
|
-
m.displayName = "Slot";
|
|
13
|
-
var f = o.forwardRef((e, n) => {
|
|
14
|
-
const { children: r, ...t } = e;
|
|
15
|
-
if (o.isValidElement(r)) {
|
|
16
|
-
const l = C(r);
|
|
17
|
-
return o.cloneElement(r, {
|
|
18
|
-
...h(t, r.props),
|
|
19
|
-
// @ts-ignore
|
|
20
|
-
ref: n ? u(n, l) : l
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
return o.Children.count(r) > 1 ? o.Children.only(null) : null;
|
|
24
|
-
});
|
|
25
|
-
f.displayName = "SlotClone";
|
|
26
|
-
var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
|
|
27
|
-
function y(e) {
|
|
28
|
-
return o.isValidElement(e) && e.type === g;
|
|
29
|
-
}
|
|
30
|
-
function h(e, n) {
|
|
31
|
-
const r = { ...n };
|
|
32
|
-
for (const t in n) {
|
|
33
|
-
const l = e[t], i = n[t];
|
|
34
|
-
/^on[A-Z]/.test(t) ? l && i ? r[t] = (...a) => {
|
|
35
|
-
i(...a), l(...a);
|
|
36
|
-
} : l && (r[t] = l) : t === "style" ? r[t] = { ...l, ...i } : t === "className" && (r[t] = [l, i].filter(Boolean).join(" "));
|
|
37
|
-
}
|
|
38
|
-
return { ...e, ...r };
|
|
39
|
-
}
|
|
40
|
-
function C(e) {
|
|
41
|
-
let n = Object.getOwnPropertyDescriptor(e.props, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning;
|
|
42
|
-
return r ? e.ref : (n = Object.getOwnPropertyDescriptor(e, "ref")?.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
43
|
-
}
|
|
44
|
-
export {
|
|
45
|
-
m as Slot,
|
|
46
|
-
g as Slottable
|
|
47
|
-
};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { __assign as m } from "../../../tslib/tslib.es6.js";
|
|
2
|
-
import * as r from "react";
|
|
3
|
-
import { RemoveScroll as e } from "./UI.js";
|
|
4
|
-
import t from "./sidecar.js";
|
|
5
|
-
var s = r.forwardRef(function(a, o) {
|
|
6
|
-
return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
|
|
7
|
-
});
|
|
8
|
-
s.classNames = e.classNames;
|
|
9
|
-
export {
|
|
10
|
-
s as default
|
|
11
|
-
};
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
import { __spreadArray as x } from "../../../tslib/tslib.es6.js";
|
|
2
|
-
import * as n from "react";
|
|
3
|
-
import { RemoveScrollBar as A } from "../../../../../../react-remove-scroll-bar/dist/es2015/component.js";
|
|
4
|
-
import { styleSingleton as I } from "../../../../../../react-style-singleton/dist/es2015/component.js";
|
|
5
|
-
import { nonPassive as s } from "./aggresiveCapture.js";
|
|
6
|
-
import { locationCouldBeScrolled as T, handleScroll as W } from "./handleScroll.js";
|
|
7
|
-
var k = function(t) {
|
|
8
|
-
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
9
|
-
}, Y = function(t) {
|
|
10
|
-
return [t.deltaX, t.deltaY];
|
|
11
|
-
}, B = function(t) {
|
|
12
|
-
return t && "current" in t ? t.current : t;
|
|
13
|
-
}, F = function(t, c) {
|
|
14
|
-
return t[0] === c[0] && t[1] === c[1];
|
|
15
|
-
}, O = function(t) {
|
|
16
|
-
return `
|
|
17
|
-
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
18
|
-
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
19
|
-
`);
|
|
20
|
-
}, Q = 0, f = [];
|
|
21
|
-
function G(t) {
|
|
22
|
-
var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(), v = n.useState(Q++)[0], m = n.useState(I)[0], g = n.useRef(t);
|
|
23
|
-
n.useEffect(function() {
|
|
24
|
-
g.current = t;
|
|
25
|
-
}, [t]), n.useEffect(function() {
|
|
26
|
-
if (t.inert) {
|
|
27
|
-
document.body.classList.add("block-interactivity-".concat(v));
|
|
28
|
-
var e = x([t.lockRef.current], (t.shards || []).map(B), !0).filter(Boolean);
|
|
29
|
-
return e.forEach(function(r) {
|
|
30
|
-
return r.classList.add("allow-interactivity-".concat(v));
|
|
31
|
-
}), function() {
|
|
32
|
-
document.body.classList.remove("block-interactivity-".concat(v)), e.forEach(function(r) {
|
|
33
|
-
return r.classList.remove("allow-interactivity-".concat(v));
|
|
34
|
-
});
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
}, [t.inert, t.lockRef.current, t.shards]);
|
|
38
|
-
var y = n.useCallback(function(e, r) {
|
|
39
|
-
if ("touches" in e && e.touches.length === 2)
|
|
40
|
-
return !g.current.allowPinchZoom;
|
|
41
|
-
var l = k(e), o = E.current, u = "deltaX" in e ? e.deltaX : o[0] - l[0], i = "deltaY" in e ? e.deltaY : o[1] - l[1], a, C = e.target, h = Math.abs(u) > Math.abs(i) ? "h" : "v";
|
|
42
|
-
if ("touches" in e && h === "h" && C.type === "range")
|
|
43
|
-
return !1;
|
|
44
|
-
var b = T(h, C);
|
|
45
|
-
if (!b)
|
|
46
|
-
return !0;
|
|
47
|
-
if (b ? a = h : (a = h === "v" ? "h" : "v", b = T(h, C)), !b)
|
|
48
|
-
return !1;
|
|
49
|
-
if (!d.current && "changedTouches" in e && (u || i) && (d.current = a), !a)
|
|
50
|
-
return !0;
|
|
51
|
-
var P = d.current || a;
|
|
52
|
-
return W(P, r, e, P === "h" ? u : i, !0);
|
|
53
|
-
}, []), S = n.useCallback(function(e) {
|
|
54
|
-
var r = e;
|
|
55
|
-
if (!(!f.length || f[f.length - 1] !== m)) {
|
|
56
|
-
var l = "deltaY" in r ? Y(r) : k(r), o = c.current.filter(function(a) {
|
|
57
|
-
return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) && F(a.delta, l);
|
|
58
|
-
})[0];
|
|
59
|
-
if (o && o.should) {
|
|
60
|
-
r.cancelable && r.preventDefault();
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
if (!o) {
|
|
64
|
-
var u = (g.current.shards || []).map(B).filter(Boolean).filter(function(a) {
|
|
65
|
-
return a.contains(r.target);
|
|
66
|
-
}), i = u.length > 0 ? y(r, u[0]) : !g.current.noIsolation;
|
|
67
|
-
i && r.cancelable && r.preventDefault();
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}, []), R = n.useCallback(function(e, r, l, o) {
|
|
71
|
-
var u = { name: e, delta: r, target: l, should: o, shadowParent: Z(l) };
|
|
72
|
-
c.current.push(u), setTimeout(function() {
|
|
73
|
-
c.current = c.current.filter(function(i) {
|
|
74
|
-
return i !== u;
|
|
75
|
-
});
|
|
76
|
-
}, 1);
|
|
77
|
-
}, []), w = n.useCallback(function(e) {
|
|
78
|
-
E.current = k(e), d.current = void 0;
|
|
79
|
-
}, []), L = n.useCallback(function(e) {
|
|
80
|
-
R(e.type, Y(e), e.target, y(e, t.lockRef.current));
|
|
81
|
-
}, []), M = n.useCallback(function(e) {
|
|
82
|
-
R(e.type, k(e), e.target, y(e, t.lockRef.current));
|
|
83
|
-
}, []);
|
|
84
|
-
n.useEffect(function() {
|
|
85
|
-
return f.push(m), t.setCallbacks({
|
|
86
|
-
onScrollCapture: L,
|
|
87
|
-
onWheelCapture: L,
|
|
88
|
-
onTouchMoveCapture: M
|
|
89
|
-
}), document.addEventListener("wheel", S, s), document.addEventListener("touchmove", S, s), document.addEventListener("touchstart", w, s), function() {
|
|
90
|
-
f = f.filter(function(e) {
|
|
91
|
-
return e !== m;
|
|
92
|
-
}), document.removeEventListener("wheel", S, s), document.removeEventListener("touchmove", S, s), document.removeEventListener("touchstart", w, s);
|
|
93
|
-
};
|
|
94
|
-
}, []);
|
|
95
|
-
var X = t.removeScrollBar, D = t.inert;
|
|
96
|
-
return n.createElement(
|
|
97
|
-
n.Fragment,
|
|
98
|
-
null,
|
|
99
|
-
D ? n.createElement(m, { styles: O(v) }) : null,
|
|
100
|
-
X ? n.createElement(A, { gapMode: t.gapMode }) : null
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
function Z(t) {
|
|
104
|
-
for (var c = null; t !== null; )
|
|
105
|
-
t instanceof ShadowRoot && (c = t.host, t = t.host), t = t.parentNode;
|
|
106
|
-
return c;
|
|
107
|
-
}
|
|
108
|
-
export {
|
|
109
|
-
G as RemoveScrollSideCar,
|
|
110
|
-
Y as getDeltaXY,
|
|
111
|
-
k as getTouchXY
|
|
112
|
-
};
|