@phillips/seldon 1.119.0 → 1.121.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 +48 -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 +94 -98
- 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 +79 -83
- 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 +422 -439
- package/dist/node_modules/@radix-ui/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 +1 -1
- 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/aggresiveCapture.js +1 -1
- package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +1 -1
- 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.d.ts +4 -0
- package/dist/patterns/ObjectTile/ObjectTile.js +50 -48
- package/dist/patterns/ObjectTile/ObjectTile.stories.d.ts +2 -0
- 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/patterns/ObjectTile/_objectTile.scss +17 -1
- package/dist/site-furniture/Header/Header.js +32 -32
- package/package.json +2 -1
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as u from "react";
|
|
2
2
|
import { jsx as _ } from "react/jsx-runtime";
|
|
3
|
-
function P(
|
|
4
|
-
let
|
|
5
|
-
function
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
function
|
|
9
|
-
const { scope:
|
|
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
|
+
function a(i) {
|
|
9
|
+
const { scope: f, children: C, ...x } = i, d = f?.[e][c] || o, v = u.useMemo(() => x, Object.values(x));
|
|
10
10
|
return /* @__PURE__ */ _(d.Provider, { value: v, children: C });
|
|
11
11
|
}
|
|
12
|
-
function S(
|
|
13
|
-
const C =
|
|
14
|
-
if (
|
|
15
|
-
if (
|
|
16
|
-
throw new Error(`\`${
|
|
12
|
+
function S(i, f) {
|
|
13
|
+
const C = f?.[e][c] || o, x = u.useContext(C);
|
|
14
|
+
if (x) return x;
|
|
15
|
+
if (t !== void 0) return t;
|
|
16
|
+
throw new Error(`\`${i}\` must be used within \`${s}\``);
|
|
17
17
|
}
|
|
18
|
-
return
|
|
18
|
+
return a.displayName = s + "Provider", [a, S];
|
|
19
19
|
}
|
|
20
|
-
const
|
|
21
|
-
const
|
|
22
|
-
return function(
|
|
23
|
-
const
|
|
24
|
-
return
|
|
25
|
-
() => ({ [`__scope${
|
|
26
|
-
[
|
|
20
|
+
const r = () => {
|
|
21
|
+
const s = n.map((t) => u.createContext(t));
|
|
22
|
+
return function(o) {
|
|
23
|
+
const c = o?.[e] || s;
|
|
24
|
+
return u.useMemo(
|
|
25
|
+
() => ({ [`__scope${e}`]: { ...o, [e]: c } }),
|
|
26
|
+
[o, c]
|
|
27
27
|
);
|
|
28
28
|
};
|
|
29
29
|
};
|
|
30
|
-
return
|
|
30
|
+
return r.scopeName = e, [m, h(r, ...p)];
|
|
31
31
|
}
|
|
32
|
-
function h(...
|
|
33
|
-
const
|
|
34
|
-
if (
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
useScope:
|
|
38
|
-
scopeName:
|
|
32
|
+
function h(...e) {
|
|
33
|
+
const p = e[0];
|
|
34
|
+
if (e.length === 1) return p;
|
|
35
|
+
const n = () => {
|
|
36
|
+
const m = e.map((r) => ({
|
|
37
|
+
useScope: r(),
|
|
38
|
+
scopeName: r.scopeName
|
|
39
39
|
}));
|
|
40
|
-
return function(
|
|
41
|
-
const
|
|
42
|
-
const
|
|
43
|
-
return { ...
|
|
40
|
+
return function(s) {
|
|
41
|
+
const t = m.reduce((o, { useScope: c, scopeName: a }) => {
|
|
42
|
+
const i = c(s)[`__scope${a}`];
|
|
43
|
+
return { ...o, ...i };
|
|
44
44
|
}, {});
|
|
45
|
-
return
|
|
45
|
+
return u.useMemo(() => ({ [`__scope${p.scopeName}`]: t }), [t]);
|
|
46
46
|
};
|
|
47
47
|
};
|
|
48
|
-
return
|
|
48
|
+
return n.scopeName = p.scopeName, n;
|
|
49
49
|
}
|
|
50
50
|
export {
|
|
51
51
|
P as createContextScope
|
|
@@ -8,7 +8,7 @@ import { DismissableLayer as K } from "../node_modules/@radix-ui/react-dismissab
|
|
|
8
8
|
import { FocusScope as U } from "../node_modules/@radix-ui/react-focus-scope/dist/index.js";
|
|
9
9
|
import { Portal as Y } from "../node_modules/@radix-ui/react-portal/dist/index.js";
|
|
10
10
|
import { Presence as _ } from "../node_modules/@radix-ui/react-presence/dist/index.js";
|
|
11
|
-
import { Primitive as
|
|
11
|
+
import { Primitive as g } from "../node_modules/@radix-ui/react-primitive/dist/index.js";
|
|
12
12
|
import { useFocusGuards as Z } from "../node_modules/@radix-ui/react-focus-guards/dist/index.js";
|
|
13
13
|
import z from "../../../react-remove-scroll/dist/es2015/Combination.js";
|
|
14
14
|
import { hideOthers as J } from "../../../aria-hidden/dist/es2015/index.js";
|
|
@@ -16,40 +16,40 @@ import { Slot as Q } from "../node_modules/@radix-ui/react-slot/dist/index.js";
|
|
|
16
16
|
import { jsx as i, jsxs as y, Fragment as I } from "react/jsx-runtime";
|
|
17
17
|
var h = "Dialog", [O, Ne] = H(h), [X, u] = O(h), x = (e) => {
|
|
18
18
|
const {
|
|
19
|
-
__scopeDialog:
|
|
19
|
+
__scopeDialog: t,
|
|
20
20
|
children: n,
|
|
21
21
|
open: a,
|
|
22
22
|
defaultOpen: r,
|
|
23
|
-
onOpenChange:
|
|
24
|
-
modal:
|
|
25
|
-
} = e,
|
|
23
|
+
onOpenChange: o,
|
|
24
|
+
modal: l = !0
|
|
25
|
+
} = e, c = s.useRef(null), f = s.useRef(null), [D = !1, v] = q({
|
|
26
26
|
prop: a,
|
|
27
27
|
defaultProp: r,
|
|
28
|
-
onChange:
|
|
28
|
+
onChange: o
|
|
29
29
|
});
|
|
30
30
|
return /* @__PURE__ */ i(
|
|
31
31
|
X,
|
|
32
32
|
{
|
|
33
|
-
scope:
|
|
34
|
-
triggerRef:
|
|
35
|
-
contentRef:
|
|
33
|
+
scope: t,
|
|
34
|
+
triggerRef: c,
|
|
35
|
+
contentRef: f,
|
|
36
36
|
contentId: C(),
|
|
37
37
|
titleId: C(),
|
|
38
38
|
descriptionId: C(),
|
|
39
|
-
open:
|
|
39
|
+
open: D,
|
|
40
40
|
onOpenChange: v,
|
|
41
41
|
onOpenToggle: s.useCallback(() => v((j) => !j), [v]),
|
|
42
|
-
modal:
|
|
42
|
+
modal: l,
|
|
43
43
|
children: n
|
|
44
44
|
}
|
|
45
45
|
);
|
|
46
46
|
};
|
|
47
47
|
x.displayName = h;
|
|
48
48
|
var A = "DialogTrigger", ee = s.forwardRef(
|
|
49
|
-
(e,
|
|
50
|
-
const { __scopeDialog: n, ...a } = e, r = u(A, n),
|
|
49
|
+
(e, t) => {
|
|
50
|
+
const { __scopeDialog: n, ...a } = e, r = u(A, n), o = R(t, r.triggerRef);
|
|
51
51
|
return /* @__PURE__ */ i(
|
|
52
|
-
|
|
52
|
+
g.button,
|
|
53
53
|
{
|
|
54
54
|
type: "button",
|
|
55
55
|
"aria-haspopup": "dialog",
|
|
@@ -57,57 +57,57 @@ var A = "DialogTrigger", ee = s.forwardRef(
|
|
|
57
57
|
"aria-controls": r.contentId,
|
|
58
58
|
"data-state": P(r.open),
|
|
59
59
|
...a,
|
|
60
|
-
ref:
|
|
60
|
+
ref: o,
|
|
61
61
|
onClick: p(e.onClick, r.onOpenToggle)
|
|
62
62
|
}
|
|
63
63
|
);
|
|
64
64
|
}
|
|
65
65
|
);
|
|
66
66
|
ee.displayName = A;
|
|
67
|
-
var E = "DialogPortal", [
|
|
67
|
+
var E = "DialogPortal", [oe, T] = O(E, {
|
|
68
68
|
forceMount: void 0
|
|
69
69
|
}), b = (e) => {
|
|
70
|
-
const { __scopeDialog:
|
|
71
|
-
return /* @__PURE__ */ i(
|
|
70
|
+
const { __scopeDialog: t, forceMount: n, children: a, container: r } = e, o = u(E, t);
|
|
71
|
+
return /* @__PURE__ */ i(oe, { scope: t, forceMount: n, children: s.Children.map(a, (l) => /* @__PURE__ */ i(_, { present: n || o.open, children: /* @__PURE__ */ i(Y, { asChild: !0, container: r, children: l }) })) });
|
|
72
72
|
};
|
|
73
73
|
b.displayName = E;
|
|
74
|
-
var
|
|
75
|
-
(e,
|
|
76
|
-
const n = T(
|
|
77
|
-
return
|
|
74
|
+
var m = "DialogOverlay", M = s.forwardRef(
|
|
75
|
+
(e, t) => {
|
|
76
|
+
const n = T(m, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(m, e.__scopeDialog);
|
|
77
|
+
return o.modal ? /* @__PURE__ */ i(_, { present: a || o.open, children: /* @__PURE__ */ i(te, { ...r, ref: t }) }) : null;
|
|
78
78
|
}
|
|
79
79
|
);
|
|
80
|
-
M.displayName =
|
|
81
|
-
var
|
|
82
|
-
(e,
|
|
83
|
-
const { __scopeDialog: n, ...a } = e, r = u(
|
|
80
|
+
M.displayName = m;
|
|
81
|
+
var te = s.forwardRef(
|
|
82
|
+
(e, t) => {
|
|
83
|
+
const { __scopeDialog: n, ...a } = e, r = u(m, n);
|
|
84
84
|
return (
|
|
85
85
|
// Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
|
|
86
86
|
// ie. when `Overlay` and `Content` are siblings
|
|
87
87
|
/* @__PURE__ */ i(z, { as: Q, allowPinchZoom: !0, shards: [r.contentRef], children: /* @__PURE__ */ i(
|
|
88
|
-
|
|
88
|
+
g.div,
|
|
89
89
|
{
|
|
90
90
|
"data-state": P(r.open),
|
|
91
91
|
...a,
|
|
92
|
-
ref:
|
|
92
|
+
ref: t,
|
|
93
93
|
style: { pointerEvents: "auto", ...a.style }
|
|
94
94
|
}
|
|
95
95
|
) })
|
|
96
96
|
);
|
|
97
97
|
}
|
|
98
|
-
),
|
|
99
|
-
(e,
|
|
100
|
-
const n = T(
|
|
101
|
-
return /* @__PURE__ */ i(_, { present: a ||
|
|
98
|
+
), d = "DialogContent", w = s.forwardRef(
|
|
99
|
+
(e, t) => {
|
|
100
|
+
const n = T(d, e.__scopeDialog), { forceMount: a = n.forceMount, ...r } = e, o = u(d, e.__scopeDialog);
|
|
101
|
+
return /* @__PURE__ */ i(_, { present: a || o.open, children: o.modal ? /* @__PURE__ */ i(re, { ...r, ref: t }) : /* @__PURE__ */ i(ne, { ...r, ref: t }) });
|
|
102
102
|
}
|
|
103
103
|
);
|
|
104
|
-
w.displayName =
|
|
104
|
+
w.displayName = d;
|
|
105
105
|
var re = s.forwardRef(
|
|
106
|
-
(e,
|
|
107
|
-
const n = u(
|
|
106
|
+
(e, t) => {
|
|
107
|
+
const n = u(d, e.__scopeDialog), a = s.useRef(null), r = R(t, n.contentRef, a);
|
|
108
108
|
return s.useEffect(() => {
|
|
109
|
-
const
|
|
110
|
-
if (
|
|
109
|
+
const o = a.current;
|
|
110
|
+
if (o) return J(o);
|
|
111
111
|
}, []), /* @__PURE__ */ i(
|
|
112
112
|
F,
|
|
113
113
|
{
|
|
@@ -115,47 +115,44 @@ var re = s.forwardRef(
|
|
|
115
115
|
ref: r,
|
|
116
116
|
trapFocus: n.open,
|
|
117
117
|
disableOutsidePointerEvents: !0,
|
|
118
|
-
onCloseAutoFocus: p(e.onCloseAutoFocus, (
|
|
119
|
-
|
|
120
|
-
t.preventDefault(), (c = n.triggerRef.current) == null || c.focus();
|
|
118
|
+
onCloseAutoFocus: p(e.onCloseAutoFocus, (o) => {
|
|
119
|
+
o.preventDefault(), n.triggerRef.current?.focus();
|
|
121
120
|
}),
|
|
122
|
-
onPointerDownOutside: p(e.onPointerDownOutside, (
|
|
123
|
-
const
|
|
124
|
-
(
|
|
121
|
+
onPointerDownOutside: p(e.onPointerDownOutside, (o) => {
|
|
122
|
+
const l = o.detail.originalEvent, c = l.button === 0 && l.ctrlKey === !0;
|
|
123
|
+
(l.button === 2 || c) && o.preventDefault();
|
|
125
124
|
}),
|
|
126
125
|
onFocusOutside: p(
|
|
127
126
|
e.onFocusOutside,
|
|
128
|
-
(
|
|
127
|
+
(o) => o.preventDefault()
|
|
129
128
|
)
|
|
130
129
|
}
|
|
131
130
|
);
|
|
132
131
|
}
|
|
133
132
|
), ne = s.forwardRef(
|
|
134
|
-
(e,
|
|
135
|
-
const n = u(
|
|
133
|
+
(e, t) => {
|
|
134
|
+
const n = u(d, e.__scopeDialog), a = s.useRef(!1), r = s.useRef(!1);
|
|
136
135
|
return /* @__PURE__ */ i(
|
|
137
136
|
F,
|
|
138
137
|
{
|
|
139
138
|
...e,
|
|
140
|
-
ref:
|
|
139
|
+
ref: t,
|
|
141
140
|
trapFocus: !1,
|
|
142
141
|
disableOutsidePointerEvents: !1,
|
|
143
|
-
onCloseAutoFocus: (
|
|
144
|
-
|
|
145
|
-
(c = e.onCloseAutoFocus) == null || c.call(e, t), t.defaultPrevented || (a.current || (l = n.triggerRef.current) == null || l.focus(), t.preventDefault()), a.current = !1, r.current = !1;
|
|
142
|
+
onCloseAutoFocus: (o) => {
|
|
143
|
+
e.onCloseAutoFocus?.(o), o.defaultPrevented || (a.current || n.triggerRef.current?.focus(), o.preventDefault()), a.current = !1, r.current = !1;
|
|
146
144
|
},
|
|
147
|
-
onInteractOutside: (
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
((g = n.triggerRef.current) == null ? void 0 : g.contains(c)) && t.preventDefault(), t.detail.originalEvent.type === "focusin" && r.current && t.preventDefault();
|
|
145
|
+
onInteractOutside: (o) => {
|
|
146
|
+
e.onInteractOutside?.(o), o.defaultPrevented || (a.current = !0, o.detail.originalEvent.type === "pointerdown" && (r.current = !0));
|
|
147
|
+
const l = o.target;
|
|
148
|
+
n.triggerRef.current?.contains(l) && o.preventDefault(), o.detail.originalEvent.type === "focusin" && r.current && o.preventDefault();
|
|
152
149
|
}
|
|
153
150
|
}
|
|
154
151
|
);
|
|
155
152
|
}
|
|
156
153
|
), F = s.forwardRef(
|
|
157
|
-
(e,
|
|
158
|
-
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus:
|
|
154
|
+
(e, t) => {
|
|
155
|
+
const { __scopeDialog: n, trapFocus: a, onOpenAutoFocus: r, onCloseAutoFocus: o, ...l } = e, c = u(d, n), f = s.useRef(null), D = R(t, f);
|
|
159
156
|
return Z(), /* @__PURE__ */ y(I, { children: [
|
|
160
157
|
/* @__PURE__ */ i(
|
|
161
158
|
U,
|
|
@@ -164,51 +161,51 @@ var re = s.forwardRef(
|
|
|
164
161
|
loop: !0,
|
|
165
162
|
trapped: a,
|
|
166
163
|
onMountAutoFocus: r,
|
|
167
|
-
onUnmountAutoFocus:
|
|
164
|
+
onUnmountAutoFocus: o,
|
|
168
165
|
children: /* @__PURE__ */ i(
|
|
169
166
|
K,
|
|
170
167
|
{
|
|
171
168
|
role: "dialog",
|
|
172
|
-
id:
|
|
173
|
-
"aria-describedby":
|
|
174
|
-
"aria-labelledby":
|
|
175
|
-
"data-state": P(
|
|
176
|
-
...
|
|
177
|
-
ref:
|
|
178
|
-
onDismiss: () =>
|
|
169
|
+
id: c.contentId,
|
|
170
|
+
"aria-describedby": c.descriptionId,
|
|
171
|
+
"aria-labelledby": c.titleId,
|
|
172
|
+
"data-state": P(c.open),
|
|
173
|
+
...l,
|
|
174
|
+
ref: D,
|
|
175
|
+
onDismiss: () => c.onOpenChange(!1)
|
|
179
176
|
}
|
|
180
177
|
)
|
|
181
178
|
}
|
|
182
179
|
),
|
|
183
180
|
/* @__PURE__ */ y(I, { children: [
|
|
184
|
-
/* @__PURE__ */ i(ae, { titleId:
|
|
185
|
-
/* @__PURE__ */ i(se, { contentRef:
|
|
181
|
+
/* @__PURE__ */ i(ae, { titleId: c.titleId }),
|
|
182
|
+
/* @__PURE__ */ i(se, { contentRef: f, descriptionId: c.descriptionId })
|
|
186
183
|
] })
|
|
187
184
|
] });
|
|
188
185
|
}
|
|
189
186
|
), N = "DialogTitle", S = s.forwardRef(
|
|
190
|
-
(e,
|
|
187
|
+
(e, t) => {
|
|
191
188
|
const { __scopeDialog: n, ...a } = e, r = u(N, n);
|
|
192
|
-
return /* @__PURE__ */ i(
|
|
189
|
+
return /* @__PURE__ */ i(g.h2, { id: r.titleId, ...a, ref: t });
|
|
193
190
|
}
|
|
194
191
|
);
|
|
195
192
|
S.displayName = N;
|
|
196
193
|
var W = "DialogDescription", k = s.forwardRef(
|
|
197
|
-
(e,
|
|
194
|
+
(e, t) => {
|
|
198
195
|
const { __scopeDialog: n, ...a } = e, r = u(W, n);
|
|
199
|
-
return /* @__PURE__ */ i(
|
|
196
|
+
return /* @__PURE__ */ i(g.p, { id: r.descriptionId, ...a, ref: t });
|
|
200
197
|
}
|
|
201
198
|
);
|
|
202
199
|
k.displayName = W;
|
|
203
200
|
var G = "DialogClose", L = s.forwardRef(
|
|
204
|
-
(e,
|
|
201
|
+
(e, t) => {
|
|
205
202
|
const { __scopeDialog: n, ...a } = e, r = u(G, n);
|
|
206
203
|
return /* @__PURE__ */ i(
|
|
207
|
-
|
|
204
|
+
g.button,
|
|
208
205
|
{
|
|
209
206
|
type: "button",
|
|
210
207
|
...a,
|
|
211
|
-
ref:
|
|
208
|
+
ref: t,
|
|
212
209
|
onClick: p(e.onClick, () => r.onOpenChange(!1))
|
|
213
210
|
}
|
|
214
211
|
);
|
|
@@ -219,25 +216,24 @@ function P(e) {
|
|
|
219
216
|
return e ? "open" : "closed";
|
|
220
217
|
}
|
|
221
218
|
var $ = "DialogTitleWarning", [Pe, B] = V($, {
|
|
222
|
-
contentName:
|
|
219
|
+
contentName: d,
|
|
223
220
|
titleName: N,
|
|
224
221
|
docsSlug: "dialog"
|
|
225
222
|
}), ae = ({ titleId: e }) => {
|
|
226
|
-
const
|
|
223
|
+
const t = B($), n = `\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
227
224
|
|
|
228
|
-
If you want to hide the \`${
|
|
225
|
+
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
229
226
|
|
|
230
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${
|
|
227
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;
|
|
231
228
|
return s.useEffect(() => {
|
|
232
229
|
e && (document.getElementById(e) || console.error(n));
|
|
233
230
|
}, [n, e]), null;
|
|
234
|
-
}, ie = "DialogDescriptionWarning", se = ({ contentRef: e, descriptionId:
|
|
231
|
+
}, ie = "DialogDescriptionWarning", se = ({ contentRef: e, descriptionId: t }) => {
|
|
235
232
|
const a = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${B(ie).contentName}}.`;
|
|
236
233
|
return s.useEffect(() => {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
}, [a, e, o]), null;
|
|
234
|
+
const r = e.current?.getAttribute("aria-describedby");
|
|
235
|
+
t && r && (document.getElementById(t) || console.warn(a));
|
|
236
|
+
}, [a, e, t]), null;
|
|
241
237
|
}, ye = x, Ie = b, Oe = M, xe = w, Ae = S, Te = k, be = L;
|
|
242
238
|
export {
|
|
243
239
|
be as Close,
|
package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/primitive/dist/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
function
|
|
2
|
-
return function(
|
|
3
|
-
if (
|
|
4
|
-
return
|
|
1
|
+
function f(n, r, { checkForDefaultPrevented: t = !0 } = {}) {
|
|
2
|
+
return function(e) {
|
|
3
|
+
if (n?.(e), t === !1 || !e.defaultPrevented)
|
|
4
|
+
return r?.(e);
|
|
5
5
|
};
|
|
6
6
|
}
|
|
7
7
|
export {
|
|
8
|
-
|
|
8
|
+
f as composeEventHandlers
|
|
9
9
|
};
|
package/dist/node_modules/@radix-ui/react-dialog/node_modules/@radix-ui/react-context/dist/index.js
CHANGED
|
@@ -1,70 +1,68 @@
|
|
|
1
1
|
import * as u from "react";
|
|
2
|
-
import { jsx as
|
|
3
|
-
function
|
|
4
|
-
const
|
|
5
|
-
const { children:
|
|
6
|
-
return /* @__PURE__ */
|
|
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
7
|
};
|
|
8
|
-
|
|
8
|
+
p.displayName = t + "Provider";
|
|
9
9
|
function i(r) {
|
|
10
|
-
const
|
|
11
|
-
if (
|
|
10
|
+
const e = u.useContext(n);
|
|
11
|
+
if (e) return e;
|
|
12
12
|
if (c !== void 0) return c;
|
|
13
|
-
throw new Error(`\`${r}\` must be used within \`${
|
|
13
|
+
throw new Error(`\`${r}\` must be used within \`${t}\``);
|
|
14
14
|
}
|
|
15
|
-
return [
|
|
15
|
+
return [p, i];
|
|
16
16
|
}
|
|
17
|
-
function
|
|
18
|
-
let
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
const
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return /* @__PURE__ */ h(v.Provider, { value: P, children: C });
|
|
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 });
|
|
26
25
|
};
|
|
27
|
-
|
|
28
|
-
function
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
throw new Error(`\`${d}\` must be used within \`${r}\``);
|
|
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}\``);
|
|
34
32
|
}
|
|
35
|
-
return [
|
|
33
|
+
return [d, C];
|
|
36
34
|
}
|
|
37
35
|
const i = () => {
|
|
38
|
-
const r =
|
|
39
|
-
return function(
|
|
40
|
-
const s =
|
|
36
|
+
const r = n.map((e) => u.createContext(e));
|
|
37
|
+
return function(o) {
|
|
38
|
+
const s = o?.[t] || r;
|
|
41
39
|
return u.useMemo(
|
|
42
|
-
() => ({ [`__scope${
|
|
43
|
-
[
|
|
40
|
+
() => ({ [`__scope${t}`]: { ...o, [t]: s } }),
|
|
41
|
+
[o, s]
|
|
44
42
|
);
|
|
45
43
|
};
|
|
46
44
|
};
|
|
47
|
-
return i.scopeName =
|
|
45
|
+
return i.scopeName = t, [p, P(i, ...c)];
|
|
48
46
|
}
|
|
49
|
-
function
|
|
50
|
-
const c =
|
|
51
|
-
if (
|
|
52
|
-
const
|
|
53
|
-
const
|
|
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) => ({
|
|
54
52
|
useScope: i(),
|
|
55
53
|
scopeName: i.scopeName
|
|
56
54
|
}));
|
|
57
55
|
return function(r) {
|
|
58
|
-
const
|
|
59
|
-
const
|
|
60
|
-
return { ...
|
|
56
|
+
const e = p.reduce((o, { useScope: s, scopeName: d }) => {
|
|
57
|
+
const x = s(r)[`__scope${d}`];
|
|
58
|
+
return { ...o, ...x };
|
|
61
59
|
}, {});
|
|
62
|
-
return u.useMemo(() => ({ [`__scope${c.scopeName}`]:
|
|
60
|
+
return u.useMemo(() => ({ [`__scope${c.scopeName}`]: e }), [e]);
|
|
63
61
|
};
|
|
64
62
|
};
|
|
65
|
-
return
|
|
63
|
+
return n.scopeName = c.scopeName, n;
|
|
66
64
|
}
|
|
67
65
|
export {
|
|
68
|
-
|
|
69
|
-
|
|
66
|
+
$ as createContext,
|
|
67
|
+
w as createContextScope
|
|
70
68
|
};
|