@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,133 +1,132 @@
|
|
|
1
1
|
import * as s from "react";
|
|
2
|
-
import { useFloating as
|
|
3
|
-
import { Root as
|
|
4
|
-
import { useComposedRefs as
|
|
5
|
-
import { createContextScope as
|
|
6
|
-
import { Primitive as
|
|
7
|
-
import { useCallbackRef as
|
|
8
|
-
import { useLayoutEffect as
|
|
9
|
-
import { useSize as
|
|
2
|
+
import { useFloating as fe, offset as me, shift as he, flip as ge, size as ue, arrow as we, hide as Pe, limitShift as xe } from "../../../@floating-ui/react-dom/dist/floating-ui.react-dom.js";
|
|
3
|
+
import { Root as ye } from "../../react-arrow/dist/index.js";
|
|
4
|
+
import { useComposedRefs as I } from "../../react-compose-refs/dist/index.js";
|
|
5
|
+
import { createContextScope as Ae } from "../../react-context/dist/index.js";
|
|
6
|
+
import { Primitive as Y } from "../../react-primitive/dist/index.js";
|
|
7
|
+
import { useCallbackRef as ve } from "../../react-use-callback-ref/dist/index.js";
|
|
8
|
+
import { useLayoutEffect as z } from "../../react-use-layout-effect/dist/index.js";
|
|
9
|
+
import { useSize as Ce } from "../../react-use-size/dist/index.js";
|
|
10
10
|
import { jsx as f } from "react/jsx-runtime";
|
|
11
|
-
import { autoUpdate as
|
|
12
|
-
var
|
|
13
|
-
const { __scopePopper:
|
|
14
|
-
return /* @__PURE__ */ f(
|
|
11
|
+
import { autoUpdate as Se } from "../../../@floating-ui/dom/dist/floating-ui.dom.js";
|
|
12
|
+
var b = "Popper", [M, ke] = Ae(b), [be, X] = M(b), D = (e) => {
|
|
13
|
+
const { __scopePopper: a, children: o } = e, [i, n] = s.useState(null);
|
|
14
|
+
return /* @__PURE__ */ f(be, { scope: a, anchor: i, onAnchorChange: n, children: o });
|
|
15
15
|
};
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
(e,
|
|
19
|
-
const { __scopePopper:
|
|
16
|
+
D.displayName = b;
|
|
17
|
+
var F = "PopperAnchor", k = s.forwardRef(
|
|
18
|
+
(e, a) => {
|
|
19
|
+
const { __scopePopper: o, virtualRef: i, ...n } = e, t = X(F, o), r = s.useRef(null), g = I(a, r);
|
|
20
20
|
return s.useEffect(() => {
|
|
21
|
-
|
|
22
|
-
}),
|
|
21
|
+
t.onAnchorChange(i?.current || r.current);
|
|
22
|
+
}), i ? null : /* @__PURE__ */ f(Y.div, { ...n, ref: g });
|
|
23
23
|
}
|
|
24
24
|
);
|
|
25
|
-
|
|
26
|
-
var
|
|
27
|
-
(e,
|
|
28
|
-
var M, X, D, F, k, B, T, j;
|
|
25
|
+
k.displayName = F;
|
|
26
|
+
var O = "PopperContent", [Oe, Re] = M(O), B = s.forwardRef(
|
|
27
|
+
(e, a) => {
|
|
29
28
|
const {
|
|
30
|
-
__scopePopper:
|
|
31
|
-
side:
|
|
32
|
-
sideOffset:
|
|
33
|
-
align:
|
|
34
|
-
alignOffset:
|
|
35
|
-
arrowPadding:
|
|
29
|
+
__scopePopper: o,
|
|
30
|
+
side: i = "bottom",
|
|
31
|
+
sideOffset: n = 0,
|
|
32
|
+
align: t = "center",
|
|
33
|
+
alignOffset: r = 0,
|
|
34
|
+
arrowPadding: g = 0,
|
|
36
35
|
avoidCollisions: p = !0,
|
|
37
36
|
collisionBoundary: c = [],
|
|
38
|
-
collisionPadding:
|
|
37
|
+
collisionPadding: u = 0,
|
|
39
38
|
sticky: m = "partial",
|
|
40
|
-
hideWhenDetached:
|
|
41
|
-
updatePositionStrategy:
|
|
39
|
+
hideWhenDetached: P = !1,
|
|
40
|
+
updatePositionStrategy: x = "optimized",
|
|
42
41
|
onPlaced: l,
|
|
43
42
|
...d
|
|
44
|
-
} = e,
|
|
45
|
-
padding:
|
|
46
|
-
boundary:
|
|
43
|
+
} = e, Z = X(O, o), [C, U] = s.useState(null), q = I(a, (w) => U(w)), [S, G] = s.useState(null), R = Ce(S), J = R?.width ?? 0, E = R?.height ?? 0, K = i + (t !== "center" ? "-" + t : ""), Q = typeof u == "number" ? u : { top: 0, right: 0, bottom: 0, left: 0, ...u }, N = Array.isArray(c) ? c : [c], V = N.length > 0, y = {
|
|
44
|
+
padding: Q,
|
|
45
|
+
boundary: N.filter(Ne),
|
|
47
46
|
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
48
|
-
altBoundary:
|
|
49
|
-
}, { refs:
|
|
47
|
+
altBoundary: V
|
|
48
|
+
}, { refs: ee, floatingStyles: _, placement: te, isPositioned: A, middlewareData: h } = fe({
|
|
50
49
|
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
51
50
|
strategy: "fixed",
|
|
52
|
-
placement:
|
|
53
|
-
whileElementsMounted: (...
|
|
54
|
-
animationFrame:
|
|
51
|
+
placement: K,
|
|
52
|
+
whileElementsMounted: (...w) => Se(...w, {
|
|
53
|
+
animationFrame: x === "always"
|
|
55
54
|
}),
|
|
56
55
|
elements: {
|
|
57
|
-
reference:
|
|
56
|
+
reference: Z.anchor
|
|
58
57
|
},
|
|
59
58
|
middleware: [
|
|
60
|
-
|
|
61
|
-
p &&
|
|
59
|
+
me({ mainAxis: n + E, alignmentAxis: r }),
|
|
60
|
+
p && he({
|
|
62
61
|
mainAxis: !0,
|
|
63
62
|
crossAxis: !1,
|
|
64
|
-
limiter: m === "partial" ?
|
|
65
|
-
...
|
|
63
|
+
limiter: m === "partial" ? xe() : void 0,
|
|
64
|
+
...y
|
|
66
65
|
}),
|
|
67
|
-
p &&
|
|
68
|
-
|
|
69
|
-
...
|
|
70
|
-
apply: ({ elements:
|
|
71
|
-
const { width:
|
|
72
|
-
|
|
66
|
+
p && ge({ ...y }),
|
|
67
|
+
ue({
|
|
68
|
+
...y,
|
|
69
|
+
apply: ({ elements: w, rects: W, availableWidth: pe, availableHeight: ce }) => {
|
|
70
|
+
const { width: de, height: le } = W.reference, v = w.floating.style;
|
|
71
|
+
v.setProperty("--radix-popper-available-width", `${pe}px`), v.setProperty("--radix-popper-available-height", `${ce}px`), v.setProperty("--radix-popper-anchor-width", `${de}px`), v.setProperty("--radix-popper-anchor-height", `${le}px`);
|
|
73
72
|
}
|
|
74
73
|
}),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
S && we({ element: S, padding: g }),
|
|
75
|
+
_e({ arrowWidth: J, arrowHeight: E }),
|
|
76
|
+
P && Pe({ strategy: "referenceHidden", ...y })
|
|
78
77
|
]
|
|
79
|
-
}), [
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
}, [
|
|
83
|
-
const
|
|
84
|
-
return
|
|
85
|
-
|
|
86
|
-
}, [
|
|
78
|
+
}), [$, re] = L(te), H = ve(l);
|
|
79
|
+
z(() => {
|
|
80
|
+
A && H?.();
|
|
81
|
+
}, [A, H]);
|
|
82
|
+
const oe = h.arrow?.x, ne = h.arrow?.y, ae = h.arrow?.centerOffset !== 0, [ie, se] = s.useState();
|
|
83
|
+
return z(() => {
|
|
84
|
+
C && se(window.getComputedStyle(C).zIndex);
|
|
85
|
+
}, [C]), /* @__PURE__ */ f(
|
|
87
86
|
"div",
|
|
88
87
|
{
|
|
89
|
-
ref:
|
|
88
|
+
ref: ee.setFloating,
|
|
90
89
|
"data-radix-popper-content-wrapper": "",
|
|
91
90
|
style: {
|
|
92
|
-
...
|
|
93
|
-
transform:
|
|
91
|
+
..._,
|
|
92
|
+
transform: A ? _.transform : "translate(0, -200%)",
|
|
94
93
|
// keep off the page when measuring
|
|
95
94
|
minWidth: "max-content",
|
|
96
|
-
zIndex:
|
|
95
|
+
zIndex: ie,
|
|
97
96
|
"--radix-popper-transform-origin": [
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
h.transformOrigin?.x,
|
|
98
|
+
h.transformOrigin?.y
|
|
100
99
|
].join(" "),
|
|
101
100
|
// hide the content if using the hide middleware and should be hidden
|
|
102
101
|
// set visibility to hidden and disable pointer events so the UI behaves
|
|
103
102
|
// as if the PopperContent isn't there at all
|
|
104
|
-
...
|
|
103
|
+
...h.hide?.referenceHidden && {
|
|
105
104
|
visibility: "hidden",
|
|
106
105
|
pointerEvents: "none"
|
|
107
106
|
}
|
|
108
107
|
},
|
|
109
108
|
dir: e.dir,
|
|
110
109
|
children: /* @__PURE__ */ f(
|
|
111
|
-
|
|
110
|
+
Oe,
|
|
112
111
|
{
|
|
113
|
-
scope:
|
|
114
|
-
placedSide:
|
|
115
|
-
onArrowChange:
|
|
116
|
-
arrowX:
|
|
117
|
-
arrowY:
|
|
118
|
-
shouldHideArrow:
|
|
112
|
+
scope: o,
|
|
113
|
+
placedSide: $,
|
|
114
|
+
onArrowChange: G,
|
|
115
|
+
arrowX: oe,
|
|
116
|
+
arrowY: ne,
|
|
117
|
+
shouldHideArrow: ae,
|
|
119
118
|
children: /* @__PURE__ */ f(
|
|
120
|
-
|
|
119
|
+
Y.div,
|
|
121
120
|
{
|
|
122
|
-
"data-side":
|
|
123
|
-
"data-align":
|
|
121
|
+
"data-side": $,
|
|
122
|
+
"data-align": re,
|
|
124
123
|
...d,
|
|
125
|
-
ref:
|
|
124
|
+
ref: q,
|
|
126
125
|
style: {
|
|
127
126
|
...d.style,
|
|
128
127
|
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
129
128
|
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
130
|
-
animation:
|
|
129
|
+
animation: A ? void 0 : "none"
|
|
131
130
|
}
|
|
132
131
|
}
|
|
133
132
|
)
|
|
@@ -137,14 +136,14 @@ var $ = "PopperContent", [Ie, Ye] = q($), V = s.forwardRef(
|
|
|
137
136
|
);
|
|
138
137
|
}
|
|
139
138
|
);
|
|
140
|
-
|
|
141
|
-
var
|
|
139
|
+
B.displayName = O;
|
|
140
|
+
var T = "PopperArrow", Ee = {
|
|
142
141
|
top: "bottom",
|
|
143
142
|
right: "left",
|
|
144
143
|
bottom: "top",
|
|
145
144
|
left: "right"
|
|
146
|
-
},
|
|
147
|
-
const { __scopePopper:
|
|
145
|
+
}, j = s.forwardRef(function(a, o) {
|
|
146
|
+
const { __scopePopper: i, ...n } = a, t = Re(T, i), r = Ee[t.placedSide];
|
|
148
147
|
return (
|
|
149
148
|
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
150
149
|
// doesn't report size as we'd expect on SVG elements.
|
|
@@ -152,33 +151,33 @@ var ee = "PopperArrow", Me = {
|
|
|
152
151
|
/* @__PURE__ */ f(
|
|
153
152
|
"span",
|
|
154
153
|
{
|
|
155
|
-
ref:
|
|
154
|
+
ref: t.onArrowChange,
|
|
156
155
|
style: {
|
|
157
156
|
position: "absolute",
|
|
158
|
-
left:
|
|
159
|
-
top:
|
|
160
|
-
[
|
|
157
|
+
left: t.arrowX,
|
|
158
|
+
top: t.arrowY,
|
|
159
|
+
[r]: 0,
|
|
161
160
|
transformOrigin: {
|
|
162
161
|
top: "",
|
|
163
162
|
right: "0 0",
|
|
164
163
|
bottom: "center 0",
|
|
165
164
|
left: "100% 0"
|
|
166
|
-
}[
|
|
165
|
+
}[t.placedSide],
|
|
167
166
|
transform: {
|
|
168
167
|
top: "translateY(100%)",
|
|
169
168
|
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
170
169
|
bottom: "rotate(180deg)",
|
|
171
170
|
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
172
|
-
}[
|
|
173
|
-
visibility:
|
|
171
|
+
}[t.placedSide],
|
|
172
|
+
visibility: t.shouldHideArrow ? "hidden" : void 0
|
|
174
173
|
},
|
|
175
174
|
children: /* @__PURE__ */ f(
|
|
176
|
-
|
|
175
|
+
ye,
|
|
177
176
|
{
|
|
178
|
-
...
|
|
179
|
-
ref:
|
|
177
|
+
...n,
|
|
178
|
+
ref: o,
|
|
180
179
|
style: {
|
|
181
|
-
...
|
|
180
|
+
...n.style,
|
|
182
181
|
// ensures the element can be measured correctly (mostly for if SVG)
|
|
183
182
|
display: "block"
|
|
184
183
|
}
|
|
@@ -188,33 +187,32 @@ var ee = "PopperArrow", Me = {
|
|
|
188
187
|
)
|
|
189
188
|
);
|
|
190
189
|
});
|
|
191
|
-
|
|
192
|
-
function
|
|
190
|
+
j.displayName = T;
|
|
191
|
+
function Ne(e) {
|
|
193
192
|
return e !== null;
|
|
194
193
|
}
|
|
195
|
-
var
|
|
194
|
+
var _e = (e) => ({
|
|
196
195
|
name: "transformOrigin",
|
|
197
196
|
options: e,
|
|
198
|
-
fn(
|
|
199
|
-
|
|
200
|
-
const { placement: n, rects: t, middlewareData: a } = i, o = ((C = a.arrow) == null ? void 0 : C.centerOffset) !== 0, x = o ? 0 : e.arrowWidth, p = o ? 0 : e.arrowHeight, [c, P] = re(n), m = { start: "0%", center: "50%", end: "100%" }[P], A = ((b = (h = a.arrow) == null ? void 0 : h.x) != null ? b : 0) + x / 2, v = ((g = (S = a.arrow) == null ? void 0 : S.y) != null ? g : 0) + p / 2;
|
|
197
|
+
fn(a) {
|
|
198
|
+
const { placement: o, rects: i, middlewareData: n } = a, r = n.arrow?.centerOffset !== 0, g = r ? 0 : e.arrowWidth, p = r ? 0 : e.arrowHeight, [c, u] = L(o), m = { start: "0%", center: "50%", end: "100%" }[u], P = (n.arrow?.x ?? 0) + g / 2, x = (n.arrow?.y ?? 0) + p / 2;
|
|
201
199
|
let l = "", d = "";
|
|
202
|
-
return c === "bottom" ? (l =
|
|
200
|
+
return c === "bottom" ? (l = r ? m : `${P}px`, d = `${-p}px`) : c === "top" ? (l = r ? m : `${P}px`, d = `${i.floating.height + p}px`) : c === "right" ? (l = `${-p}px`, d = r ? m : `${x}px`) : c === "left" && (l = `${i.floating.width + p}px`, d = r ? m : `${x}px`), { data: { x: l, y: d } };
|
|
203
201
|
}
|
|
204
202
|
});
|
|
205
|
-
function
|
|
206
|
-
const [
|
|
207
|
-
return [
|
|
203
|
+
function L(e) {
|
|
204
|
+
const [a, o = "center"] = e.split("-");
|
|
205
|
+
return [a, o];
|
|
208
206
|
}
|
|
209
|
-
var
|
|
207
|
+
var Be = D, Te = k, je = B, Le = j;
|
|
210
208
|
export {
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
209
|
+
Te as Anchor,
|
|
210
|
+
Le as Arrow,
|
|
211
|
+
je as Content,
|
|
212
|
+
D as Popper,
|
|
213
|
+
k as PopperAnchor,
|
|
214
|
+
j as PopperArrow,
|
|
215
|
+
B as PopperContent,
|
|
216
|
+
Be as Root,
|
|
217
|
+
ke as createPopperScope
|
|
220
218
|
};
|
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { Primitive as
|
|
4
|
-
import { useLayoutEffect as
|
|
5
|
-
import { jsx as
|
|
6
|
-
var
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return t ? s.createPortal(/* @__PURE__ */ l(c.div, { ...i, ref: a }), t) : null;
|
|
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;
|
|
12
11
|
});
|
|
13
|
-
|
|
12
|
+
p.displayName = l;
|
|
14
13
|
export {
|
|
15
|
-
|
|
14
|
+
p as Portal
|
|
16
15
|
};
|
|
@@ -1,20 +1,17 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as i from "react";
|
|
2
2
|
import * as g from "react-dom";
|
|
3
3
|
import { useComposedRefs as O } from "../../react-compose-refs/dist/index.js";
|
|
4
|
-
import { useLayoutEffect as
|
|
5
|
-
function E(
|
|
6
|
-
return
|
|
7
|
-
const i = n[o][r];
|
|
8
|
-
return i != null ? i : o;
|
|
9
|
-
}, e);
|
|
4
|
+
import { useLayoutEffect as A } from "../../react-use-layout-effect/dist/index.js";
|
|
5
|
+
function E(n, e) {
|
|
6
|
+
return i.useReducer((t, o) => e[t][o] ?? t, n);
|
|
10
7
|
}
|
|
11
|
-
var M = (
|
|
12
|
-
const { present:
|
|
13
|
-
return typeof
|
|
8
|
+
var M = (n) => {
|
|
9
|
+
const { present: e, children: t } = n, o = R(e), a = typeof t == "function" ? t({ present: o.isPresent }) : i.Children.only(t), c = O(o.ref, y(a));
|
|
10
|
+
return typeof t == "function" || o.isPresent ? i.cloneElement(a, { ref: c }) : null;
|
|
14
11
|
};
|
|
15
12
|
M.displayName = "Presence";
|
|
16
|
-
function R(
|
|
17
|
-
const [
|
|
13
|
+
function R(n) {
|
|
14
|
+
const [e, t] = i.useState(), o = i.useRef({}), a = i.useRef(n), c = i.useRef("none"), l = n ? "mounted" : "unmounted", [N, s] = E(l, {
|
|
18
15
|
mounted: {
|
|
19
16
|
UNMOUNT: "unmounted",
|
|
20
17
|
ANIMATION_OUT: "unmountSuspended"
|
|
@@ -27,42 +24,41 @@ function R(e) {
|
|
|
27
24
|
MOUNT: "mounted"
|
|
28
25
|
}
|
|
29
26
|
});
|
|
30
|
-
return
|
|
31
|
-
const
|
|
32
|
-
c.current = N === "mounted" ?
|
|
33
|
-
}, [N]),
|
|
34
|
-
const
|
|
35
|
-
if (u !==
|
|
36
|
-
const
|
|
37
|
-
|
|
27
|
+
return i.useEffect(() => {
|
|
28
|
+
const r = d(o.current);
|
|
29
|
+
c.current = N === "mounted" ? r : "none";
|
|
30
|
+
}, [N]), A(() => {
|
|
31
|
+
const r = o.current, u = a.current;
|
|
32
|
+
if (u !== n) {
|
|
33
|
+
const p = c.current, f = d(r);
|
|
34
|
+
n ? s("MOUNT") : f === "none" || r?.display === "none" ? s("UNMOUNT") : s(u && p !== f ? "ANIMATION_OUT" : "UNMOUNT"), a.current = n;
|
|
38
35
|
}
|
|
39
|
-
}, [
|
|
40
|
-
if (
|
|
41
|
-
const
|
|
42
|
-
const f = d(
|
|
43
|
-
m.target ===
|
|
36
|
+
}, [n, s]), A(() => {
|
|
37
|
+
if (e) {
|
|
38
|
+
const r = (m) => {
|
|
39
|
+
const f = d(o.current).includes(m.animationName);
|
|
40
|
+
m.target === e && f && g.flushSync(() => s("ANIMATION_END"));
|
|
44
41
|
}, u = (m) => {
|
|
45
|
-
m.target ===
|
|
42
|
+
m.target === e && (c.current = d(o.current));
|
|
46
43
|
};
|
|
47
|
-
return
|
|
48
|
-
|
|
44
|
+
return e.addEventListener("animationstart", u), e.addEventListener("animationcancel", r), e.addEventListener("animationend", r), () => {
|
|
45
|
+
e.removeEventListener("animationstart", u), e.removeEventListener("animationcancel", r), e.removeEventListener("animationend", r);
|
|
49
46
|
};
|
|
50
47
|
} else
|
|
51
48
|
s("ANIMATION_END");
|
|
52
|
-
}, [
|
|
49
|
+
}, [e, s]), {
|
|
53
50
|
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
54
|
-
ref:
|
|
55
|
-
|
|
51
|
+
ref: i.useCallback((r) => {
|
|
52
|
+
r && (o.current = getComputedStyle(r)), t(r);
|
|
56
53
|
}, [])
|
|
57
54
|
};
|
|
58
55
|
}
|
|
59
|
-
function d(
|
|
60
|
-
return
|
|
56
|
+
function d(n) {
|
|
57
|
+
return n?.animationName || "none";
|
|
61
58
|
}
|
|
62
|
-
function
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return o ? e.ref : (n = (i = Object.getOwnPropertyDescriptor(e, "ref")) == null ? void 0 : i.get, o = n && "isReactWarning" in n && n.isReactWarning, o ? e.props.ref : e.props.ref || e.ref);
|
|
59
|
+
function y(n) {
|
|
60
|
+
let e = Object.getOwnPropertyDescriptor(n.props, "ref")?.get, t = e && "isReactWarning" in e && e.isReactWarning;
|
|
61
|
+
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);
|
|
66
62
|
}
|
|
67
63
|
export {
|
|
68
64
|
M as Presence
|
|
@@ -22,7 +22,7 @@ var c = [
|
|
|
22
22
|
], v = c.reduce((r, i) => {
|
|
23
23
|
const t = s.forwardRef((o, e) => {
|
|
24
24
|
const { asChild: m, ...a } = o, n = m ? p : i;
|
|
25
|
-
return typeof window
|
|
25
|
+
return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ u(n, { ...a, ref: e });
|
|
26
26
|
});
|
|
27
27
|
return t.displayName = `Primitive.${i}`, { ...r, [i]: t };
|
|
28
28
|
}, {});
|