@phillips/seldon 1.118.2 → 1.120.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/_virtual/_commonjsHelpers.js +1 -1
- package/dist/components/Accordion/Accordion.js +18 -18
- package/dist/components/Accordion/AccordionItem.js +67 -68
- package/dist/components/Carousel/Carousel.js +49 -51
- package/dist/components/Carousel/CarouselDots.js +46 -47
- package/dist/components/ContentPeek/ContentPeek.js +47 -47
- package/dist/components/ErrorBoundary/ErrorBoundary.js +11 -12
- package/dist/components/Filter/Filter.js +40 -41
- package/dist/components/Filter/FilterHeader.js +24 -24
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +21 -20
- package/dist/components/Input/Input.stories.d.ts +7 -0
- package/dist/components/Link/utils.js +2 -2
- package/dist/components/LinkBlock/LinkBlock.js +12 -13
- package/dist/components/LinkList/LinkList.js +8 -11
- package/dist/components/Navigation/Navigation.js +21 -22
- package/dist/components/Navigation/NavigationItemTrigger/NavigationItemTrigger.js +49 -50
- package/dist/components/Navigation/NavigationList/NavigationList.js +33 -35
- package/dist/components/Pagination/Pagination.js +7 -7
- package/dist/components/Pagination/utils.js +1 -1
- package/dist/components/PinchZoom/PinchZoom.js +40 -43
- package/dist/components/Search/Search.js +93 -96
- package/dist/components/Search/SearchButton.js +19 -19
- package/dist/components/SeldonImage/SeldonImage.js +1 -1
- package/dist/components/Select/Select.js +22 -14
- package/dist/components/Select/Select.stories.d.ts +15 -0
- package/dist/components/Tabs/TabTrigger.js +13 -13
- package/dist/node_modules/@artsy/fresnel/dist/Breakpoints.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/DynamicResponsive.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Interactions.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/Media.js +2 -2
- package/dist/node_modules/@artsy/fresnel/dist/MediaQueries.js +1 -1
- package/dist/node_modules/@artsy/fresnel/dist/Utils.js +1 -1
- package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +1 -1
- package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +1 -1
- package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +2 -2
- package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +2 -2
- package/dist/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +63 -67
- package/dist/node_modules/@radix-ui/react-context/dist/index.js +35 -35
- package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +80 -84
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js +5 -5
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js +43 -45
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +86 -87
- package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +7 -8
- package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +56 -57
- package/dist/node_modules/@radix-ui/react-id/dist/index.js +10 -10
- package/dist/node_modules/@radix-ui/react-popper/dist/index.js +113 -115
- package/dist/node_modules/@radix-ui/react-portal/dist/index.js +12 -13
- package/dist/node_modules/@radix-ui/react-presence/dist/index.js +33 -37
- package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/dist/index.js +423 -440
- package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +28 -28
- package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/@radix-ui/react-select/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +62 -0
- package/dist/node_modules/@radix-ui/react-slot/dist/index.js +18 -19
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js +39 -41
- package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js +37 -42
- package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +7 -10
- package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +1 -1
- package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +1 -1
- package/dist/node_modules/aria-hidden/dist/es2015/index.js +1 -1
- package/dist/node_modules/change-case/dist/index.js +41 -44
- package/dist/node_modules/date-fns/differenceInCalendarDays.js +11 -11
- package/dist/node_modules/date-fns/differenceInDays.js +9 -9
- package/dist/node_modules/date-fns/differenceInHours.js +11 -11
- package/dist/node_modules/date-fns/differenceInMinutes.js +8 -8
- package/dist/node_modules/date-fns/differenceInSeconds.js +7 -7
- package/dist/node_modules/date-fns/formatDuration.js +11 -12
- package/dist/node_modules/date-fns/isSameWeek.js +8 -8
- package/dist/node_modules/date-fns/locale/_lib/buildLocalizeFn.js +12 -12
- package/dist/node_modules/date-fns/locale/en-US/_lib/formatDistance.js +3 -3
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/formatDistance.js +5 -5
- package/dist/node_modules/date-fns/locale/zh-CN/_lib/localize.js +10 -10
- package/dist/node_modules/date-fns/startOfDay.js +6 -6
- package/dist/node_modules/date-fns/startOfWeek.js +7 -8
- package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +1 -1
- package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +1 -1
- package/dist/node_modules/exenv/index.js +2 -2
- package/dist/node_modules/get-nonce/dist/es2015/index.js +1 -1
- package/dist/node_modules/prop-types/checkPropTypes.js +2 -2
- package/dist/node_modules/prop-types/factoryWithTypeCheckers.js +3 -3
- package/dist/node_modules/react-intersection-observer/dist/index.js +2 -2
- package/dist/node_modules/react-lifecycles-compat/react-lifecycles-compat.es.js +1 -1
- package/dist/node_modules/react-modal/lib/components/ModalPortal.js +1 -1
- package/dist/node_modules/react-modal/lib/helpers/scopeTab.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +28 -28
- package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +34 -32
- package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +1 -1
- package/dist/node_modules/react-transition-group/esm/Transition.js +1 -1
- package/dist/node_modules/react-zoom-pan-pinch/dist/index.esm.js +14 -14
- package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +1 -1
- package/dist/node_modules/usehooks-ts/dist/index.js +1 -1
- package/dist/node_modules/warning/warning.js +1 -1
- package/dist/node_modules/wheel-gestures/dist/wheel-gestures.esm.js +1 -1
- package/dist/patterns/BidSnapshot/BidSnapshot.js +58 -58
- package/dist/patterns/DetailList/DetailList.js +22 -22
- package/dist/patterns/FilterMenu/FilterMenu.js +15 -15
- package/dist/patterns/LanguageSelector/LanguageSelector.js +23 -23
- package/dist/patterns/LanguageSelector/utils.js +2 -5
- package/dist/patterns/ObjectTile/ObjectTile.js +46 -46
- package/dist/patterns/ViewingsList/StatefulViewingsList.js +16 -16
- package/dist/patterns/ViewingsList/ViewingsList.js +42 -42
- package/dist/patterns/ViewingsList/ViewingsListCard.js +122 -123
- package/dist/patterns/ViewingsList/ViewingsListCardForm.js +170 -170
- package/dist/scss/components/Search/SearchResults/_searchResults.scss +8 -0
- package/dist/site-furniture/Header/Header.js +32 -32
- package/package.json +3 -1
- package/dist/node_modules/@radix-ui/react-dialog/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -64
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -0
- /package/dist/node_modules/@radix-ui/{react-dialog → react-select}/node_modules/tslib/tslib.es6.js +0 -0
|
@@ -4,47 +4,47 @@ import { RemoveScrollBar as A } from "../../../../../../react-remove-scroll-bar/
|
|
|
4
4
|
import { styleSingleton as I } from "../../../../../../react-style-singleton/dist/es2015/component.js";
|
|
5
5
|
import { nonPassive as s } from "./aggresiveCapture.js";
|
|
6
6
|
import { locationCouldBeScrolled as T, handleScroll as W } from "./handleScroll.js";
|
|
7
|
-
var
|
|
7
|
+
var k = function(t) {
|
|
8
8
|
return "changedTouches" in t ? [t.changedTouches[0].clientX, t.changedTouches[0].clientY] : [0, 0];
|
|
9
9
|
}, Y = function(t) {
|
|
10
10
|
return [t.deltaX, t.deltaY];
|
|
11
11
|
}, B = function(t) {
|
|
12
12
|
return t && "current" in t ? t.current : t;
|
|
13
|
-
},
|
|
13
|
+
}, F = function(t, c) {
|
|
14
14
|
return t[0] === c[0] && t[1] === c[1];
|
|
15
|
-
},
|
|
15
|
+
}, O = function(t) {
|
|
16
16
|
return `
|
|
17
17
|
.block-interactivity-`.concat(t, ` {pointer-events: none;}
|
|
18
18
|
.allow-interactivity-`).concat(t, ` {pointer-events: all;}
|
|
19
19
|
`);
|
|
20
|
-
},
|
|
21
|
-
function
|
|
22
|
-
var c = n.useRef([]), E = n.useRef([0, 0]), d = n.useRef(),
|
|
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
23
|
n.useEffect(function() {
|
|
24
24
|
g.current = t;
|
|
25
25
|
}, [t]), n.useEffect(function() {
|
|
26
26
|
if (t.inert) {
|
|
27
|
-
document.body.classList.add("block-interactivity-".concat(
|
|
27
|
+
document.body.classList.add("block-interactivity-".concat(v));
|
|
28
28
|
var e = x([t.lockRef.current], (t.shards || []).map(B), !0).filter(Boolean);
|
|
29
29
|
return e.forEach(function(r) {
|
|
30
|
-
return r.classList.add("allow-interactivity-".concat(
|
|
30
|
+
return r.classList.add("allow-interactivity-".concat(v));
|
|
31
31
|
}), function() {
|
|
32
|
-
document.body.classList.remove("block-interactivity-".concat(
|
|
33
|
-
return r.classList.remove("allow-interactivity-".concat(
|
|
32
|
+
document.body.classList.remove("block-interactivity-".concat(v)), e.forEach(function(r) {
|
|
33
|
+
return r.classList.remove("allow-interactivity-".concat(v));
|
|
34
34
|
});
|
|
35
35
|
};
|
|
36
36
|
}
|
|
37
37
|
}, [t.inert, t.lockRef.current, t.shards]);
|
|
38
|
-
var
|
|
39
|
-
if ("touches" in e && e.touches.length === 2
|
|
38
|
+
var y = n.useCallback(function(e, r) {
|
|
39
|
+
if ("touches" in e && e.touches.length === 2)
|
|
40
40
|
return !g.current.allowPinchZoom;
|
|
41
|
-
var l =
|
|
42
|
-
if ("touches" in e &&
|
|
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
43
|
return !1;
|
|
44
|
-
var
|
|
45
|
-
if (!
|
|
44
|
+
var b = T(h, C);
|
|
45
|
+
if (!b)
|
|
46
46
|
return !0;
|
|
47
|
-
if (
|
|
47
|
+
if (b ? a = h : (a = h === "v" ? "h" : "v", b = T(h, C)), !b)
|
|
48
48
|
return !1;
|
|
49
49
|
if (!d.current && "changedTouches" in e && (u || i) && (d.current = a), !a)
|
|
50
50
|
return !0;
|
|
@@ -53,8 +53,8 @@ function z(t) {
|
|
|
53
53
|
}, []), S = n.useCallback(function(e) {
|
|
54
54
|
var r = e;
|
|
55
55
|
if (!(!f.length || f[f.length - 1] !== m)) {
|
|
56
|
-
var l = "deltaY" in r ? Y(r) :
|
|
57
|
-
return a.name === r.type && (a.target === r.target || r.target === a.shadowParent) &&
|
|
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
58
|
})[0];
|
|
59
59
|
if (o && o.should) {
|
|
60
60
|
r.cancelable && r.preventDefault();
|
|
@@ -63,23 +63,23 @@ function z(t) {
|
|
|
63
63
|
if (!o) {
|
|
64
64
|
var u = (g.current.shards || []).map(B).filter(Boolean).filter(function(a) {
|
|
65
65
|
return a.contains(r.target);
|
|
66
|
-
}), i = u.length > 0 ?
|
|
66
|
+
}), i = u.length > 0 ? y(r, u[0]) : !g.current.noIsolation;
|
|
67
67
|
i && r.cancelable && r.preventDefault();
|
|
68
68
|
}
|
|
69
69
|
}
|
|
70
70
|
}, []), R = n.useCallback(function(e, r, l, o) {
|
|
71
|
-
var u = { name: e, delta: r, target: l, should: o, shadowParent:
|
|
71
|
+
var u = { name: e, delta: r, target: l, should: o, shadowParent: Z(l) };
|
|
72
72
|
c.current.push(u), setTimeout(function() {
|
|
73
73
|
c.current = c.current.filter(function(i) {
|
|
74
74
|
return i !== u;
|
|
75
75
|
});
|
|
76
76
|
}, 1);
|
|
77
77
|
}, []), w = n.useCallback(function(e) {
|
|
78
|
-
E.current =
|
|
78
|
+
E.current = k(e), d.current = void 0;
|
|
79
79
|
}, []), L = n.useCallback(function(e) {
|
|
80
|
-
R(e.type, Y(e), e.target,
|
|
80
|
+
R(e.type, Y(e), e.target, y(e, t.lockRef.current));
|
|
81
81
|
}, []), M = n.useCallback(function(e) {
|
|
82
|
-
R(e.type,
|
|
82
|
+
R(e.type, k(e), e.target, y(e, t.lockRef.current));
|
|
83
83
|
}, []);
|
|
84
84
|
n.useEffect(function() {
|
|
85
85
|
return f.push(m), t.setCallbacks({
|
|
@@ -96,17 +96,17 @@ function z(t) {
|
|
|
96
96
|
return n.createElement(
|
|
97
97
|
n.Fragment,
|
|
98
98
|
null,
|
|
99
|
-
D ? n.createElement(m, { styles:
|
|
99
|
+
D ? n.createElement(m, { styles: O(v) }) : null,
|
|
100
100
|
X ? n.createElement(A, { gapMode: t.gapMode }) : null
|
|
101
101
|
);
|
|
102
102
|
}
|
|
103
|
-
function
|
|
103
|
+
function Z(t) {
|
|
104
104
|
for (var c = null; t !== null; )
|
|
105
105
|
t instanceof ShadowRoot && (c = t.host, t = t.host), t = t.parentNode;
|
|
106
106
|
return c;
|
|
107
107
|
}
|
|
108
108
|
export {
|
|
109
|
-
|
|
109
|
+
G as RemoveScrollSideCar,
|
|
110
110
|
Y as getDeltaXY,
|
|
111
|
-
|
|
111
|
+
k as getTouchXY
|
|
112
112
|
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
var p = function(r) {
|
|
2
|
+
return r.tagName === "TEXTAREA";
|
|
3
|
+
}, w = function(r, e) {
|
|
4
|
+
var o = window.getComputedStyle(r);
|
|
5
|
+
return (
|
|
6
|
+
// not-not-scrollable
|
|
7
|
+
o[e] !== "hidden" && // contains scroll inside self
|
|
8
|
+
!(o.overflowY === o.overflowX && !p(r) && o[e] === "visible")
|
|
9
|
+
);
|
|
10
|
+
}, y = function(r) {
|
|
11
|
+
return w(r, "overflowY");
|
|
12
|
+
}, H = function(r) {
|
|
13
|
+
return w(r, "overflowX");
|
|
14
|
+
}, R = function(r, e) {
|
|
15
|
+
var o = e.ownerDocument, t = e;
|
|
16
|
+
do {
|
|
17
|
+
typeof ShadowRoot < "u" && t instanceof ShadowRoot && (t = t.host);
|
|
18
|
+
var a = g(r, t);
|
|
19
|
+
if (a) {
|
|
20
|
+
var n = b(r, t), i = n[1], l = n[2];
|
|
21
|
+
if (i > l)
|
|
22
|
+
return !0;
|
|
23
|
+
}
|
|
24
|
+
t = t.parentNode;
|
|
25
|
+
} while (t && t !== o.body);
|
|
26
|
+
return !1;
|
|
27
|
+
}, B = function(r) {
|
|
28
|
+
var e = r.scrollTop, o = r.scrollHeight, t = r.clientHeight;
|
|
29
|
+
return [
|
|
30
|
+
e,
|
|
31
|
+
o,
|
|
32
|
+
t
|
|
33
|
+
];
|
|
34
|
+
}, V = function(r) {
|
|
35
|
+
var e = r.scrollLeft, o = r.scrollWidth, t = r.clientWidth;
|
|
36
|
+
return [
|
|
37
|
+
e,
|
|
38
|
+
o,
|
|
39
|
+
t
|
|
40
|
+
];
|
|
41
|
+
}, g = function(r, e) {
|
|
42
|
+
return r === "v" ? y(e) : H(e);
|
|
43
|
+
}, b = function(r, e) {
|
|
44
|
+
return r === "v" ? B(e) : V(e);
|
|
45
|
+
}, D = function(r, e) {
|
|
46
|
+
return r === "h" && e === "rtl" ? -1 : 1;
|
|
47
|
+
}, W = function(r, e, o, t, a) {
|
|
48
|
+
var n = D(r, window.getComputedStyle(e).direction), i = n * t, l = o.target, f = e.contains(l), c = !1, d = i > 0, s = 0, h = 0;
|
|
49
|
+
do {
|
|
50
|
+
var u = b(r, l), v = u[0], m = u[1], C = u[2], S = m - C - n * v;
|
|
51
|
+
(v || S) && g(r, l) && (s += S, h += v), l instanceof ShadowRoot ? l = l.host : l = l.parentNode;
|
|
52
|
+
} while (
|
|
53
|
+
// portaled content
|
|
54
|
+
!f && l !== document.body || // self content
|
|
55
|
+
f && (e.contains(l) || e === l)
|
|
56
|
+
);
|
|
57
|
+
return (d && (Math.abs(s) < 1 || !a) || !d && (Math.abs(h) < 1 || !a)) && (c = !0), c;
|
|
58
|
+
};
|
|
59
|
+
export {
|
|
60
|
+
W as handleScroll,
|
|
61
|
+
R as locationCouldBeScrolled
|
|
62
|
+
};
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as o from "react";
|
|
2
2
|
import { composeRefs as u } from "../../react-compose-refs/dist/index.js";
|
|
3
3
|
import { jsx as c, Fragment as d } from "react/jsx-runtime";
|
|
4
|
-
var m =
|
|
5
|
-
const { children: r, ...t } = e,
|
|
4
|
+
var m = o.forwardRef((e, n) => {
|
|
5
|
+
const { children: r, ...t } = e, l = o.Children.toArray(r), i = l.find(y);
|
|
6
6
|
if (i) {
|
|
7
|
-
const s = i.props.children, a =
|
|
8
|
-
return /* @__PURE__ */ c(f, { ...t, ref: n, children:
|
|
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
9
|
}
|
|
10
10
|
return /* @__PURE__ */ c(f, { ...t, ref: n, children: r });
|
|
11
11
|
});
|
|
12
12
|
m.displayName = "Slot";
|
|
13
|
-
var f =
|
|
13
|
+
var f = o.forwardRef((e, n) => {
|
|
14
14
|
const { children: r, ...t } = e;
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
return
|
|
15
|
+
if (o.isValidElement(r)) {
|
|
16
|
+
const l = C(r);
|
|
17
|
+
return o.cloneElement(r, {
|
|
18
18
|
...h(t, r.props),
|
|
19
19
|
// @ts-ignore
|
|
20
|
-
ref: n ? u(n,
|
|
20
|
+
ref: n ? u(n, l) : l
|
|
21
21
|
});
|
|
22
22
|
}
|
|
23
|
-
return
|
|
23
|
+
return o.Children.count(r) > 1 ? o.Children.only(null) : null;
|
|
24
24
|
});
|
|
25
25
|
f.displayName = "SlotClone";
|
|
26
26
|
var g = ({ children: e }) => /* @__PURE__ */ c(d, { children: e });
|
|
27
27
|
function y(e) {
|
|
28
|
-
return
|
|
28
|
+
return o.isValidElement(e) && e.type === g;
|
|
29
29
|
}
|
|
30
30
|
function h(e, n) {
|
|
31
31
|
const r = { ...n };
|
|
32
32
|
for (const t in n) {
|
|
33
|
-
const
|
|
34
|
-
/^on[A-Z]/.test(t) ?
|
|
35
|
-
i(...a),
|
|
36
|
-
} :
|
|
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
37
|
}
|
|
38
38
|
return { ...e, ...r };
|
|
39
39
|
}
|
|
40
40
|
function C(e) {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
return r ? e.ref : (n = (o = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : o.get, r = n && "isReactWarning" in n && n.isReactWarning, r ? e.props.ref : e.props.ref || e.ref);
|
|
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);
|
|
44
43
|
}
|
|
45
44
|
export {
|
|
46
45
|
m as Slot,
|
package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-context/dist/index.js
CHANGED
|
@@ -1,55 +1,53 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { jsx as
|
|
3
|
-
function
|
|
4
|
-
let
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return /* @__PURE__ */ h(f.Provider, { value: _, children: S });
|
|
1
|
+
import * as u from "react";
|
|
2
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
+
function P(e, p = []) {
|
|
4
|
+
let n = [];
|
|
5
|
+
function m(s, t) {
|
|
6
|
+
const o = u.createContext(t), c = n.length;
|
|
7
|
+
n = [...n, t];
|
|
8
|
+
const a = (i) => {
|
|
9
|
+
const { scope: f, children: C, ...x } = i, d = f?.[e]?.[c] || o, v = u.useMemo(() => x, Object.values(x));
|
|
10
|
+
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
12
11
|
};
|
|
13
|
-
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
if (
|
|
18
|
-
|
|
19
|
-
throw new Error(`\`${a}\` must be used within \`${u}\``);
|
|
12
|
+
a.displayName = s + "Provider";
|
|
13
|
+
function S(i, f) {
|
|
14
|
+
const C = f?.[e]?.[c] || o, x = u.useContext(C);
|
|
15
|
+
if (x) return x;
|
|
16
|
+
if (t !== void 0) return t;
|
|
17
|
+
throw new Error(`\`${i}\` must be used within \`${s}\``);
|
|
20
18
|
}
|
|
21
|
-
return [
|
|
19
|
+
return [a, S];
|
|
22
20
|
}
|
|
23
|
-
const
|
|
24
|
-
const
|
|
25
|
-
return function(
|
|
26
|
-
const
|
|
27
|
-
return
|
|
28
|
-
() => ({ [`__scope${
|
|
29
|
-
[
|
|
21
|
+
const r = () => {
|
|
22
|
+
const s = n.map((t) => u.createContext(t));
|
|
23
|
+
return function(o) {
|
|
24
|
+
const c = o?.[e] || s;
|
|
25
|
+
return u.useMemo(
|
|
26
|
+
() => ({ [`__scope${e}`]: { ...o, [e]: c } }),
|
|
27
|
+
[o, c]
|
|
30
28
|
);
|
|
31
29
|
};
|
|
32
30
|
};
|
|
33
|
-
return
|
|
31
|
+
return r.scopeName = e, [m, h(r, ...p)];
|
|
34
32
|
}
|
|
35
|
-
function
|
|
36
|
-
const
|
|
37
|
-
if (
|
|
38
|
-
const
|
|
39
|
-
const
|
|
40
|
-
useScope:
|
|
41
|
-
scopeName:
|
|
33
|
+
function h(...e) {
|
|
34
|
+
const p = e[0];
|
|
35
|
+
if (e.length === 1) return p;
|
|
36
|
+
const n = () => {
|
|
37
|
+
const m = e.map((r) => ({
|
|
38
|
+
useScope: r(),
|
|
39
|
+
scopeName: r.scopeName
|
|
42
40
|
}));
|
|
43
|
-
return function(
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
return { ...
|
|
41
|
+
return function(s) {
|
|
42
|
+
const t = m.reduce((o, { useScope: c, scopeName: a }) => {
|
|
43
|
+
const i = c(s)[`__scope${a}`];
|
|
44
|
+
return { ...o, ...i };
|
|
47
45
|
}, {});
|
|
48
|
-
return
|
|
46
|
+
return u.useMemo(() => ({ [`__scope${p.scopeName}`]: t }), [t]);
|
|
49
47
|
};
|
|
50
48
|
};
|
|
51
|
-
return
|
|
49
|
+
return n.scopeName = p.scopeName, n;
|
|
52
50
|
}
|
|
53
51
|
export {
|
|
54
|
-
|
|
52
|
+
P as createContextScope
|
|
55
53
|
};
|
package/dist/node_modules/@radix-ui/react-tabs/node_modules/@radix-ui/react-presence/dist/index.js
CHANGED
|
@@ -1,19 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { useComposedRefs as
|
|
3
|
-
import { useLayoutEffect as
|
|
4
|
-
function
|
|
5
|
-
return
|
|
6
|
-
const o = e[r][t];
|
|
7
|
-
return o != null ? o : r;
|
|
8
|
-
}, n);
|
|
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);
|
|
9
6
|
}
|
|
10
|
-
var
|
|
11
|
-
const { present: e, children:
|
|
12
|
-
return typeof
|
|
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;
|
|
13
10
|
};
|
|
14
|
-
|
|
15
|
-
function
|
|
16
|
-
const [e,
|
|
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, {
|
|
17
14
|
mounted: {
|
|
18
15
|
UNMOUNT: "unmounted",
|
|
19
16
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -26,50 +23,48 @@ function v(n) {
|
|
|
26
23
|
MOUNT: "mounted"
|
|
27
24
|
}
|
|
28
25
|
});
|
|
29
|
-
return
|
|
30
|
-
const
|
|
31
|
-
c.current = N === "mounted" ?
|
|
32
|
-
}, [N]),
|
|
33
|
-
const
|
|
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;
|
|
34
31
|
if (m !== n) {
|
|
35
|
-
const
|
|
36
|
-
n ? s("MOUNT") :
|
|
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;
|
|
37
34
|
}
|
|
38
|
-
}, [n, s]),
|
|
39
|
-
var i;
|
|
35
|
+
}, [n, s]), A(() => {
|
|
40
36
|
if (e) {
|
|
41
|
-
let
|
|
42
|
-
const
|
|
43
|
-
const g = l(
|
|
44
|
-
if (
|
|
45
|
-
const
|
|
46
|
-
e.style.animationFillMode = "forwards",
|
|
47
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode =
|
|
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);
|
|
48
44
|
});
|
|
49
45
|
}
|
|
50
|
-
},
|
|
51
|
-
|
|
46
|
+
}, f = (u) => {
|
|
47
|
+
u.target === e && (c.current = l(r.current));
|
|
52
48
|
};
|
|
53
|
-
return e.addEventListener("animationstart",
|
|
54
|
-
|
|
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);
|
|
55
51
|
};
|
|
56
52
|
} else
|
|
57
53
|
s("ANIMATION_END");
|
|
58
54
|
}, [e, s]), {
|
|
59
55
|
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
60
|
-
ref:
|
|
61
|
-
|
|
56
|
+
ref: i.useCallback((o) => {
|
|
57
|
+
o && (r.current = getComputedStyle(o)), t(o);
|
|
62
58
|
}, [])
|
|
63
59
|
};
|
|
64
60
|
}
|
|
65
61
|
function l(n) {
|
|
66
|
-
return
|
|
62
|
+
return n?.animationName || "none";
|
|
67
63
|
}
|
|
68
|
-
function
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
return r ? n.ref : (e = (o = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : o.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
|
|
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);
|
|
72
67
|
}
|
|
73
68
|
export {
|
|
74
|
-
|
|
69
|
+
T as Presence
|
|
75
70
|
};
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
function
|
|
3
|
-
const
|
|
4
|
-
return
|
|
5
|
-
|
|
6
|
-
}),
|
|
7
|
-
var u;
|
|
8
|
-
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
|
9
|
-
}, []);
|
|
1
|
+
import * as e from "react";
|
|
2
|
+
function c(r) {
|
|
3
|
+
const t = e.useRef(r);
|
|
4
|
+
return e.useEffect(() => {
|
|
5
|
+
t.current = r;
|
|
6
|
+
}), e.useMemo(() => (...u) => t.current?.(...u), []);
|
|
10
7
|
}
|
|
11
8
|
export {
|
|
12
|
-
|
|
9
|
+
c as useCallbackRef
|
|
13
10
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as r from "react";
|
|
2
2
|
import { useCallbackRef as s } from "../../react-use-callback-ref/dist/index.js";
|
|
3
|
-
function p(n, e = globalThis
|
|
3
|
+
function p(n, e = globalThis?.document) {
|
|
4
4
|
const t = s(n);
|
|
5
5
|
r.useEffect(() => {
|
|
6
6
|
const o = (a) => {
|
|
@@ -1,64 +1,61 @@
|
|
|
1
|
-
const
|
|
2
|
-
function
|
|
3
|
-
let e =
|
|
4
|
-
e = e.replace(
|
|
5
|
-
let
|
|
6
|
-
for (; e.charAt(
|
|
7
|
-
|
|
8
|
-
if (
|
|
1
|
+
const h = /([\p{Ll}\d])(\p{Lu})/gu, L = /(\p{Lu})([\p{Lu}][\p{Ll}])/gu, E = /(\d)\p{Ll}|(\p{L})\d/u, d = /[^\p{L}\d]+/giu, a = "$1\0$2", f = "";
|
|
2
|
+
function o(t) {
|
|
3
|
+
let e = t.trim();
|
|
4
|
+
e = e.replace(h, a).replace(L, a), e = e.replace(d, "\0");
|
|
5
|
+
let r = 0, c = e.length;
|
|
6
|
+
for (; e.charAt(r) === "\0"; )
|
|
7
|
+
r++;
|
|
8
|
+
if (r === c)
|
|
9
9
|
return [];
|
|
10
10
|
for (; e.charAt(c - 1) === "\0"; )
|
|
11
11
|
c--;
|
|
12
|
-
return e.slice(
|
|
12
|
+
return e.slice(r, c).split(/\0/g);
|
|
13
13
|
}
|
|
14
|
-
function
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
e.splice(c, 1, a.slice(0, s), a.slice(s));
|
|
14
|
+
function x(t) {
|
|
15
|
+
const e = o(t);
|
|
16
|
+
for (let r = 0; r < e.length; r++) {
|
|
17
|
+
const c = e[r], l = E.exec(c);
|
|
18
|
+
if (l) {
|
|
19
|
+
const s = l.index + (l[1] ?? l[2]).length;
|
|
20
|
+
e.splice(r, 1, c.slice(0, s), c.slice(s));
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
return e;
|
|
25
24
|
}
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
return l + c.map(C(e == null ? void 0 : e.locale)).join((t = e == null ? void 0 : e.delimiter) != null ? t : " ") + a;
|
|
25
|
+
function P(t, e) {
|
|
26
|
+
const [r, c, l] = p(t, e);
|
|
27
|
+
return r + c.map(_(e?.locale)).join(e?.delimiter ?? " ") + l;
|
|
30
28
|
}
|
|
31
|
-
function
|
|
32
|
-
return
|
|
29
|
+
function R(t, e) {
|
|
30
|
+
return P(t, { delimiter: "-", ...e });
|
|
33
31
|
}
|
|
34
|
-
function
|
|
35
|
-
return
|
|
32
|
+
function _(t) {
|
|
33
|
+
return t === !1 ? (e) => e.toLowerCase() : (e) => e.toLocaleLowerCase(t);
|
|
36
34
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
if (!c.includes(n))
|
|
35
|
+
function p(t, e = {}) {
|
|
36
|
+
const r = e.split ?? (e.separateNumbers ? x : o), c = e.prefixCharacters ?? f, l = e.suffixCharacters ?? f;
|
|
37
|
+
let s = 0, n = t.length;
|
|
38
|
+
for (; s < t.length; ) {
|
|
39
|
+
const i = t.charAt(s);
|
|
40
|
+
if (!c.includes(i))
|
|
44
41
|
break;
|
|
45
|
-
|
|
42
|
+
s++;
|
|
46
43
|
}
|
|
47
|
-
for (;
|
|
48
|
-
const
|
|
49
|
-
if (!
|
|
44
|
+
for (; n > s; ) {
|
|
45
|
+
const i = n - 1, u = t.charAt(i);
|
|
46
|
+
if (!l.includes(u))
|
|
50
47
|
break;
|
|
51
|
-
|
|
48
|
+
n = i;
|
|
52
49
|
}
|
|
53
50
|
return [
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
51
|
+
t.slice(0, s),
|
|
52
|
+
r(t.slice(s, n)),
|
|
53
|
+
t.slice(n)
|
|
57
54
|
];
|
|
58
55
|
}
|
|
59
56
|
export {
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
57
|
+
R as kebabCase,
|
|
58
|
+
P as noCase,
|
|
59
|
+
o as split,
|
|
60
|
+
x as splitSeparateNumbers
|
|
64
61
|
};
|