@wix/editor-react-components 1.2310.0 → 1.2312.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/site/components/AudioPlayer/component.js +3 -4
- package/dist/site/components/Breadcrumbs/component.js +1 -1
- package/dist/site/components/Button/component.js +1 -1
- package/dist/site/components/CollapsibleText/component.js +1 -1
- package/dist/site/components/DatePicker/component.js +8 -965
- package/dist/site/components/Lottie/component.js +1 -1
- package/dist/site/components/Menu/component.js +1 -1
- package/dist/site/components/Slideshow/component.js +1 -1
- package/dist/site/components/TextInput/component.js +2 -3
- package/dist/site/components/TextMarquee/component.js +6 -6
- package/dist/site/components/TimePicker/TimePicker.types.d.ts +31 -0
- package/dist/site/components/TimePicker/component.js +119 -17
- package/dist/site/components/TimePicker/constants.d.ts +63 -1
- package/dist/site/components/TimePicker/css.css +126 -0
- package/dist/site/components/TimePicker/hooks/useTimeConstraints.d.ts +8 -0
- package/dist/site/components/TimePicker/hooks/useTimePickerValue.d.ts +2 -1
- package/dist/site/components/TimePicker/manifest.js +142 -3
- package/dist/site/components/TimePicker/timePickerUtils.d.ts +2 -0
- package/dist/site/components/chunks/Button.js +1057 -347
- package/dist/site/components/chunks/Button2.js +351 -285
- package/dist/site/components/chunks/Group.js +160 -47
- package/dist/site/components/chunks/Input.js +14 -14
- package/dist/site/components/chunks/{DateField.js → Tooltip.js} +1017 -52
- package/dist/site/components/chunks/VisuallyHidden.js +47 -0
- package/dist/site/components/chunks/constants2.js +62 -4
- package/dist/site/components/chunks/filterDOMProps.js +3 -3
- package/package.json +6 -3
- package/dist/site/components/chunks/useFocusable.js +0 -118
- package/dist/site/components/chunks/usePress.js +0 -825
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import { jsxs, Fragment, jsx } from "react/jsx-runtime";
|
|
2
2
|
import * as React from "react";
|
|
3
|
-
import React__default, { createContext, useEffect,
|
|
3
|
+
import React__default, { createContext, useEffect, useMemo, useRef, useState, useContext, forwardRef, useCallback } from "react";
|
|
4
4
|
import { c as clsx } from "../chunks/clsx.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { b as $d27d541f9569d26d$export$45712eceda6fad21, d as $24f9a20f226ad820$export$5165eccb35aaadb5, e as $2b2d34ff061957fb$export$2b85b721e524d74b, f as $d2b4bc8c273e7be6$export$24d547caef80ccd1, $ as $d2b4bc8c273e7be6$export$353f5b6fc5456de1 } from "../chunks/Button.js";
|
|
6
|
+
import { $ as $8e9d2fae0ecb9001$export$457c3d6518dd4c6f, j as $c7eafbbe1ea5834e$export$535bd6ca7f90a273, b as $64fa3d84918910a7$export$29f1550f4b0d4415, f as $64fa3d84918910a7$export$4d86445c2cf5e3, g as $65484d02dcb7eb3e$export$457c3d6518dd4c6f, h as $64fa3d84918910a7$export$2881499e37b75b9a, c as $64fa3d84918910a7$export$fabf2dc03a41866e, m as $f39a9eba43920ace$export$b5d7cc18bb8d2b59, i as $f0a04ccd8dbdd83b$export$e5c5a5f917a5871c, n as $3ef42575df84b30b$export$9d1611c77c2fe928, o as $64fa3d84918910a7$export$c62b8e45d58ddad9, d as $64fa3d84918910a7$export$9d4c57ee4c6ffdd8, e as $64fa3d84918910a7$export$ef03459518577ad4 } from "../chunks/filterDOMProps.js";
|
|
7
|
+
import { b as $191c9b6d48a0a4e2$export$294aa081a6c6f55d, k as $fd2148440a13ec26$export$a763b9476acd3eb, l as $fd2148440a13ec26$export$dad6ae84456c676a, i as $fd2148440a13ec26$export$75ee7c75d68f5b0e, a as $fd2148440a13ec26$export$fc1a364ae1f3ff10, f as $514c0188e459b4c0$export$9afb8bc826b033ea, d as $d3e0e05bdfcf66bd$export$c24727297075ec6a, g as $ee014567cb39d3f0$export$ff05c3ac10437e03, $ as $514c0188e459b4c0$export$5f1af8db9871e1d6 } from "../chunks/Input.js";
|
|
8
|
+
import { f as $60f33508b4cd9d3b$export$85fd5fdf27bacc79, g as $ad063034c8620db8$export$ea39ec197993aef0, h as $ad063034c8620db8$export$a5a3b454ada2268e, i as $ad063034c8620db8$export$a2258d9c4118825c, j as $a46cf152bb926da5$export$a9b970dcc4ae71a9, k as $9c268ab73a5d55e5$export$722debc0e56fea39, l as $ad063034c8620db8$export$91b62ebf2ba703ee, m as $ad063034c8620db8$export$629b0a497aa65267, n as $121970af65029459$export$f8aeda7b10753fa1, o as $51a3e22a5186a962$export$c826860796309d1b, p as $3578607fe3d4b096$export$cfa2225e87938781, q as $ad063034c8620db8$export$42c81a444fbfb5d4, r as $ad063034c8620db8$export$d0bdf45af03a6ea3, s as $ad063034c8620db8$export$ccc1b2479e7dd654, t as $600b3cf69ae46262$export$90fc3a17d93f704c, u as $654b97e09f2a30c1$export$4d0f8be8b12a7ef6, v as $6a440d0e2d99dd46$export$4a931266a3838b86, w as $535772f9d2c1f38d$export$c5251b9e124bf29, x as $7541913c0284d84b$export$300019f83c56d282, y as $0014db39426443c5$exports, z as $7541913c0284d84b$export$7b3062cd49e80452, A as $72abaeab4d80592f$export$9fc1347d4195ccb3, B as $535772f9d2c1f38d$export$20e40289641fbbb6, C as $535772f9d2c1f38d$export$1258395f99bf9cbf, D as $901761b40e390936$export$2bb74740c4e19def, E as $b3526bc71400be8d$export$d39e1813b3bdd0e1, F as $ad063034c8620db8$export$a75f2bff57811055, G as $d07e34cce18680fd$export$93522d1a439f3617, H as $ad063034c8620db8$export$5c333a116e949cdd, I as $ad063034c8620db8$export$f91e89d3d0406102, J as $12a3c853105e5a70$export$ad991b66133851cf, K as $d07e34cce18680fd$export$b4a036af3fc0b032, L as $ad063034c8620db8$export$dbc69fd56b53d5e, M as $ad063034c8620db8$export$2061056d06d7cdf7, N as $ad063034c8620db8$export$ef8b6d9133084f4e, O as $93635573935797de$export$80ee6245ec4f29ec, P as $f11fb0bcf1b2687a$export$61c6a8c84e605fb6, Q as $8b141f2f71e88f85$export$2440da353cedad43, R as $8b141f2f71e88f85$export$f18627323ab57ac0, S as $8b141f2f71e88f85$export$7e319ea407e63bc0, T as $8b141f2f71e88f85$export$c5221a78ef73c5e9, U as $d07e34cce18680fd$export$b21e0b124e224484, V as $8b141f2f71e88f85$export$80ff8fc0ae339c13, W as $84102b64e5ca022f$export$dd0bbc9b26defe37, X as $ad063034c8620db8$export$a18c89cbd24170ff, Y as $d3f049242431219c$export$45fda7c47f93fd48, Z as $d3f049242431219c$export$6d3443f2c48bfc20, _ as $44f671af83e7d9e0$export$2de4954e8ae13b9f, a0 as $58246871e4652552$export$588937bcd60ade55, a1 as $58246871e4652552$export$6b862160d295c8e, a2 as $40825cdb76e74f70$export$7b3e670c86da5fe8, a3 as $ad063034c8620db8$export$aa8b41735afcabd2, a4 as $2aaf608024c21ca1$export$680ea196effce5f, a as $40825cdb76e74f70$export$7edc06cf1783b30f, b as $40825cdb76e74f70$export$336ab7fa954c4b5f, d as $4e3b923658d69c60$export$8c610744efcf8a1d, e as $4e3b923658d69c60$export$28c660c63b792dea } from "../chunks/Tooltip.js";
|
|
9
9
|
import { $ as $cf2482eff2eeeec2$export$f12b703ca79dfbb1 } from "../chunks/useLocalizedStringFormatter.js";
|
|
10
|
-
import {
|
|
11
|
-
import { a as $d27d541f9569d26d$export$45712eceda6fad21, b as $24f9a20f226ad820$export$5165eccb35aaadb5, c as $2b2d34ff061957fb$export$2b85b721e524d74b } from "../chunks/usePress.js";
|
|
10
|
+
import { n as $fe16bffc7a557bf0$export$7f54fc3180508a52, T as $390e54f620492c70$export$b4cc09c592e8fdb8, M as $e8ac3c3f5d4bae7f$export$d6875122194c7b44, e as $bbaa08b3cd72f041$export$9d1611c77c2fe928, t as $1969ac565cfec8d0$export$de79e2c695e052f3, K as $8f5a2122b0992be3$export$630ff653c5ada6a9, D as $23f2114a1b82827e$export$cd4e5573fbe2b576, f as $23f2114a1b82827e$export$e58f029f0fbfdb29, q as $23f2114a1b82827e$export$4282f70798064fe0, O as $23f2114a1b82827e$export$b4f377a2b6254582, l as $d447af545b77c9f1$export$f21a1ffae260145a, C as $6a20a7989e6c817a$export$98658e8c59125e6a, j as $d447af545b77c9f1$export$b204af158042fbac, B as $390e54f620492c70$export$f680877a34711e37, L as $2c9edc598a03d523$export$420e68273165f4ec, H as $c4867b2f328c2698$export$e5c5a5f917a5871c, G as $f192c2f16961cbe0$export$80f3e147d781571c, i as $2add3ce32c6007eb$export$fedb369cb70207f1, x as $a4e76a5424781910$export$e08e3b67e392101e, b as $3e6197669829fe11$export$40bfa8c7b0832715, A as $e969f22b6713ca4a$export$ae780daf29e6d456, z as $0c4a58759813079a$export$4e328f61c538687f, h as $a049562f99e7db0e$export$f9c6924e160136d1, g as $01b77f81d0f07f68$export$75b6ee27786ba447, $ as $a049562f99e7db0e$export$eb2fcfdbd7ba97d4, a as $01b77f81d0f07f68$export$b04be29aa201d4f5 } from "../chunks/Group.js";
|
|
12
11
|
import { a as $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7, $ as $2eb8e6d23f3d0cb0$export$a54013f0d02a8f82 } from "../chunks/I18nProvider.js";
|
|
13
|
-
import
|
|
12
|
+
import { $ as $ea3928288112382f$export$439d29a4e110a164, a as $ea3928288112382f$export$a966af930f325cab } from "../chunks/VisuallyHidden.js";
|
|
13
|
+
import __rspack_external_react_dom_7136dc57__default from "react-dom";
|
|
14
14
|
import { useService } from "@wix/services-manager-react";
|
|
15
15
|
import { E as EnvironmentDefinition } from "../chunks/index2.js";
|
|
16
16
|
import { T as TranslationsDefinition } from "../chunks/index5.js";
|
|
@@ -18,7 +18,6 @@ import { a as getDataAttributes } from "../chunks/dataUtils.js";
|
|
|
18
18
|
import { d as directionStyles } from "../chunks/direction.module.js";
|
|
19
19
|
import { p as presetWrapperStyles } from "../chunks/presetWrapper.module.js";
|
|
20
20
|
import { E as EMPTY_VALUE, T as TestIds, s as selectors, D as DesignStates, A as ARIA_LABEL_NAMESPACE, d as defaultValues, S as SelectionModeValues, G as GranularityValues, a as AriaLabels } from "../chunks/constants33.js";
|
|
21
|
-
import { $ as $d1116acdf220c2da$export$4c014de7c8940b4c, a as $d1116acdf220c2da$export$13f3202a3e5ddd5 } from "../chunks/useFocusable.js";
|
|
22
21
|
import { I as InfoCircleSmall_default } from "../chunks/InfoCircleSmall.js";
|
|
23
22
|
import { D as DismissSmall_default } from "../chunks/DismissSmall.js";
|
|
24
23
|
createContext(null);
|
|
@@ -232,66 +231,6 @@ function $6a7db85432448f7f$export$60278871457622de(event) {
|
|
|
232
231
|
if ($c87311424ea30a05$export$a11b0059900ceec8() && event.pointerType) return event.type === "click" && event.buttons === 1;
|
|
233
232
|
return event.detail === 0 && !event.pointerType;
|
|
234
233
|
}
|
|
235
|
-
function $d3f049242431219c$export$6d3443f2c48bfc20(ref, isReady = true) {
|
|
236
|
-
let [isEntering, setEntering] = useState(true);
|
|
237
|
-
let isAnimationReady = isEntering && isReady;
|
|
238
|
-
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
239
|
-
if (isAnimationReady && ref.current && "getAnimations" in ref.current) {
|
|
240
|
-
for (let animation of ref.current.getAnimations()) if (animation instanceof CSSTransition) animation.cancel();
|
|
241
|
-
}
|
|
242
|
-
}, [
|
|
243
|
-
ref,
|
|
244
|
-
isAnimationReady
|
|
245
|
-
]);
|
|
246
|
-
$d3f049242431219c$var$useAnimation(ref, isAnimationReady, useCallback(() => setEntering(false), []));
|
|
247
|
-
return isAnimationReady;
|
|
248
|
-
}
|
|
249
|
-
function $d3f049242431219c$export$45fda7c47f93fd48(ref, isOpen) {
|
|
250
|
-
let [exitState, setExitState] = useState(isOpen ? "open" : "closed");
|
|
251
|
-
switch (exitState) {
|
|
252
|
-
case "open":
|
|
253
|
-
if (!isOpen) setExitState("exiting");
|
|
254
|
-
break;
|
|
255
|
-
case "closed":
|
|
256
|
-
case "exiting":
|
|
257
|
-
if (isOpen) setExitState("open");
|
|
258
|
-
break;
|
|
259
|
-
}
|
|
260
|
-
let isExiting = exitState === "exiting";
|
|
261
|
-
$d3f049242431219c$var$useAnimation(ref, isExiting, useCallback(() => {
|
|
262
|
-
setExitState((state) => state === "exiting" ? "closed" : state);
|
|
263
|
-
}, []));
|
|
264
|
-
return isExiting;
|
|
265
|
-
}
|
|
266
|
-
function $d3f049242431219c$var$useAnimation(ref, isActive, onEnd) {
|
|
267
|
-
$f0a04ccd8dbdd83b$export$e5c5a5f917a5871c(() => {
|
|
268
|
-
if (isActive && ref.current) {
|
|
269
|
-
if (!("getAnimations" in ref.current)) {
|
|
270
|
-
onEnd();
|
|
271
|
-
return;
|
|
272
|
-
}
|
|
273
|
-
let animations = ref.current.getAnimations();
|
|
274
|
-
if (animations.length === 0) {
|
|
275
|
-
onEnd();
|
|
276
|
-
return;
|
|
277
|
-
}
|
|
278
|
-
let canceled = false;
|
|
279
|
-
Promise.all(animations.map((a) => a.finished)).then(() => {
|
|
280
|
-
if (!canceled) flushSync(() => {
|
|
281
|
-
onEnd();
|
|
282
|
-
});
|
|
283
|
-
}).catch(() => {
|
|
284
|
-
});
|
|
285
|
-
return () => {
|
|
286
|
-
canceled = true;
|
|
287
|
-
};
|
|
288
|
-
}
|
|
289
|
-
}, [
|
|
290
|
-
ref,
|
|
291
|
-
isActive,
|
|
292
|
-
onEnd
|
|
293
|
-
]);
|
|
294
|
-
}
|
|
295
234
|
let $8a9cb279dc87e130$export$fda7da73ab5d4c48 = false;
|
|
296
235
|
let $507fabe10e71c6fb$var$currentModality = null;
|
|
297
236
|
let $507fabe10e71c6fb$var$changeHandlers = /* @__PURE__ */ new Set();
|
|
@@ -1698,28 +1637,6 @@ function $58196c8d6a1f38fc$export$1020fa7f77e17884(element) {
|
|
|
1698
1637
|
};
|
|
1699
1638
|
}
|
|
1700
1639
|
}
|
|
1701
|
-
const $22e2f5f6490788e8$export$f6211563215e3b37 = /* @__PURE__ */ new WeakMap();
|
|
1702
|
-
function $22e2f5f6490788e8$export$18fc8428861184da(opts) {
|
|
1703
|
-
let { triggerRef, isOpen, onClose } = opts;
|
|
1704
|
-
useEffect(() => {
|
|
1705
|
-
if (!isOpen || onClose === null) return;
|
|
1706
|
-
let onScroll = (e) => {
|
|
1707
|
-
let target = $23f2114a1b82827e$export$e58f029f0fbfdb29(e);
|
|
1708
|
-
if (!triggerRef.current || target instanceof Node && !$23f2114a1b82827e$export$4282f70798064fe0(target, triggerRef.current)) return;
|
|
1709
|
-
if (target instanceof HTMLInputElement || target instanceof HTMLTextAreaElement) return;
|
|
1710
|
-
let onCloseHandler = onClose || $22e2f5f6490788e8$export$f6211563215e3b37.get(triggerRef.current);
|
|
1711
|
-
if (onCloseHandler) onCloseHandler();
|
|
1712
|
-
};
|
|
1713
|
-
window.addEventListener("scroll", onScroll, true);
|
|
1714
|
-
return () => {
|
|
1715
|
-
window.removeEventListener("scroll", onScroll, true);
|
|
1716
|
-
};
|
|
1717
|
-
}, [
|
|
1718
|
-
isOpen,
|
|
1719
|
-
onClose,
|
|
1720
|
-
triggerRef
|
|
1721
|
-
]);
|
|
1722
|
-
}
|
|
1723
1640
|
function $parcel$interopDefault$2(a) {
|
|
1724
1641
|
return a && a.__esModule ? a.default : a;
|
|
1725
1642
|
}
|
|
@@ -2046,10 +1963,6 @@ function $0d47b37c475c5231$export$cf75428e0b9ed1ea({ children }) {
|
|
|
2046
1963
|
value: context
|
|
2047
1964
|
}, children);
|
|
2048
1965
|
}
|
|
2049
|
-
const $72abaeab4d80592f$export$60d741e20e0aa309 = /* @__PURE__ */ createContext({});
|
|
2050
|
-
function $72abaeab4d80592f$export$9fc1347d4195ccb3() {
|
|
2051
|
-
return useContext($72abaeab4d80592f$export$60d741e20e0aa309) ?? {};
|
|
2052
|
-
}
|
|
2053
1966
|
const $d7a937236970dc7f$export$a2200b96afd16271 = /* @__PURE__ */ React__default.createContext(null);
|
|
2054
1967
|
function $d7a937236970dc7f$export$c6fdb837b070b4ff(props) {
|
|
2055
1968
|
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
@@ -2211,37 +2124,6 @@ function $e260d131964da0f9$var$isValidEvent(event, ref) {
|
|
|
2211
2124
|
if (!ref.current) return false;
|
|
2212
2125
|
return !event.composedPath().includes(ref.current);
|
|
2213
2126
|
}
|
|
2214
|
-
function $970072cf4b13fde3$var$hasResizeObserver() {
|
|
2215
|
-
return typeof window.ResizeObserver !== "undefined";
|
|
2216
|
-
}
|
|
2217
|
-
function $970072cf4b13fde3$export$683480f191c0e3ea(options) {
|
|
2218
|
-
const { ref, box, onResize } = options;
|
|
2219
|
-
let onResizeEvent = $fe16bffc7a557bf0$export$7f54fc3180508a52(onResize);
|
|
2220
|
-
useEffect(() => {
|
|
2221
|
-
let element = ref == null ? void 0 : ref.current;
|
|
2222
|
-
if (!element) return;
|
|
2223
|
-
if (!$970072cf4b13fde3$var$hasResizeObserver()) {
|
|
2224
|
-
window.addEventListener("resize", onResizeEvent, false);
|
|
2225
|
-
return () => {
|
|
2226
|
-
window.removeEventListener("resize", onResizeEvent, false);
|
|
2227
|
-
};
|
|
2228
|
-
} else {
|
|
2229
|
-
const resizeObserverInstance = new window.ResizeObserver((entries) => {
|
|
2230
|
-
if (!entries.length) return;
|
|
2231
|
-
onResizeEvent();
|
|
2232
|
-
});
|
|
2233
|
-
resizeObserverInstance.observe(element, {
|
|
2234
|
-
box
|
|
2235
|
-
});
|
|
2236
|
-
return () => {
|
|
2237
|
-
if (element) resizeObserverInstance.unobserve(element);
|
|
2238
|
-
};
|
|
2239
|
-
}
|
|
2240
|
-
}, [
|
|
2241
|
-
ref,
|
|
2242
|
-
box
|
|
2243
|
-
]);
|
|
2244
|
-
}
|
|
2245
2127
|
var $e5024b484f7c3e21$exports = {};
|
|
2246
2128
|
$e5024b484f7c3e21$exports = {
|
|
2247
2129
|
"dismiss": `تجاهل`
|
|
@@ -2435,63 +2317,6 @@ function $081058010ef8962e$export$2317d149ed6f78c4(props) {
|
|
|
2435
2317
|
}
|
|
2436
2318
|
}));
|
|
2437
2319
|
}
|
|
2438
|
-
const $c07df45195231803$var$Context = /* @__PURE__ */ React__default.createContext(null);
|
|
2439
|
-
function $c07df45195231803$export$178405afcd8c5eb(props) {
|
|
2440
|
-
let { children } = props;
|
|
2441
|
-
let parent = useContext($c07df45195231803$var$Context);
|
|
2442
|
-
let [modalCount, setModalCount] = useState(0);
|
|
2443
|
-
let context = useMemo(() => ({
|
|
2444
|
-
parent,
|
|
2445
|
-
modalCount,
|
|
2446
|
-
addModal() {
|
|
2447
|
-
setModalCount((count) => count + 1);
|
|
2448
|
-
if (parent) parent.addModal();
|
|
2449
|
-
},
|
|
2450
|
-
removeModal() {
|
|
2451
|
-
setModalCount((count) => count - 1);
|
|
2452
|
-
if (parent) parent.removeModal();
|
|
2453
|
-
}
|
|
2454
|
-
}), [
|
|
2455
|
-
parent,
|
|
2456
|
-
modalCount
|
|
2457
|
-
]);
|
|
2458
|
-
return /* @__PURE__ */ React__default.createElement($c07df45195231803$var$Context.Provider, {
|
|
2459
|
-
value: context
|
|
2460
|
-
}, children);
|
|
2461
|
-
}
|
|
2462
|
-
function $c07df45195231803$export$d9aaed4c3ece1bc0() {
|
|
2463
|
-
let context = useContext($c07df45195231803$var$Context);
|
|
2464
|
-
return {
|
|
2465
|
-
modalProviderProps: {
|
|
2466
|
-
"aria-hidden": context && context.modalCount > 0 ? true : void 0
|
|
2467
|
-
}
|
|
2468
|
-
};
|
|
2469
|
-
}
|
|
2470
|
-
function $c07df45195231803$var$OverlayContainerDOM(props) {
|
|
2471
|
-
let { modalProviderProps } = $c07df45195231803$export$d9aaed4c3ece1bc0();
|
|
2472
|
-
return /* @__PURE__ */ React__default.createElement("div", {
|
|
2473
|
-
"data-overlay-container": true,
|
|
2474
|
-
...props,
|
|
2475
|
-
...modalProviderProps
|
|
2476
|
-
});
|
|
2477
|
-
}
|
|
2478
|
-
function $c07df45195231803$export$bf688221f59024e5(props) {
|
|
2479
|
-
return /* @__PURE__ */ React__default.createElement($c07df45195231803$export$178405afcd8c5eb, null, /* @__PURE__ */ React__default.createElement($c07df45195231803$var$OverlayContainerDOM, props));
|
|
2480
|
-
}
|
|
2481
|
-
function $c07df45195231803$export$b47c3594eab58386(props) {
|
|
2482
|
-
let isSSR = $c7eafbbe1ea5834e$export$535bd6ca7f90a273();
|
|
2483
|
-
let { portalContainer = isSSR ? null : document.body, ...rest } = props;
|
|
2484
|
-
let { getContainer } = $72abaeab4d80592f$export$9fc1347d4195ccb3();
|
|
2485
|
-
if (!props.portalContainer && getContainer) portalContainer = getContainer();
|
|
2486
|
-
React__default.useEffect(() => {
|
|
2487
|
-
if (portalContainer == null ? void 0 : portalContainer.closest("[data-overlay-container]")) throw new Error("An OverlayContainer must not be inside another container. Please change the portalContainer prop.");
|
|
2488
|
-
}, [
|
|
2489
|
-
portalContainer
|
|
2490
|
-
]);
|
|
2491
|
-
if (!portalContainer) return null;
|
|
2492
|
-
let contents = /* @__PURE__ */ React__default.createElement($c07df45195231803$export$bf688221f59024e5, rest);
|
|
2493
|
-
return /* @__PURE__ */ __rspack_external_react_dom_7136dc57__default.createPortal(contents, portalContainer);
|
|
2494
|
-
}
|
|
2495
2320
|
const $77844860df94ba23$var$visibleOverlays = [];
|
|
2496
2321
|
function $77844860df94ba23$export$ea8f71083e90600f(props, ref) {
|
|
2497
2322
|
let { onClose, shouldCloseOnBlur, isOpen, isDismissable = false, isKeyboardDismissDisabled = false, shouldCloseOnInteractOutside } = props;
|
|
@@ -2691,475 +2516,6 @@ function $0644e3663365bfe5$var$scrollIntoView(target) {
|
|
|
2691
2516
|
nextTarget = scrollable.parentElement;
|
|
2692
2517
|
}
|
|
2693
2518
|
}
|
|
2694
|
-
const $954926fb6168ae2a$var$AXIS = {
|
|
2695
|
-
top: "top",
|
|
2696
|
-
bottom: "top",
|
|
2697
|
-
left: "left",
|
|
2698
|
-
right: "left"
|
|
2699
|
-
};
|
|
2700
|
-
const $954926fb6168ae2a$var$FLIPPED_DIRECTION = {
|
|
2701
|
-
top: "bottom",
|
|
2702
|
-
bottom: "top",
|
|
2703
|
-
left: "right",
|
|
2704
|
-
right: "left"
|
|
2705
|
-
};
|
|
2706
|
-
const $954926fb6168ae2a$var$CROSS_AXIS = {
|
|
2707
|
-
top: "left",
|
|
2708
|
-
left: "top"
|
|
2709
|
-
};
|
|
2710
|
-
const $954926fb6168ae2a$var$AXIS_SIZE = {
|
|
2711
|
-
top: "height",
|
|
2712
|
-
left: "width"
|
|
2713
|
-
};
|
|
2714
|
-
const $954926fb6168ae2a$var$TOTAL_SIZE = {
|
|
2715
|
-
width: "totalWidth",
|
|
2716
|
-
height: "totalHeight"
|
|
2717
|
-
};
|
|
2718
|
-
const $954926fb6168ae2a$var$PARSED_PLACEMENT_CACHE = {};
|
|
2719
|
-
let $954926fb6168ae2a$var$getVisualViewport = () => typeof document !== "undefined" ? window.visualViewport : null;
|
|
2720
|
-
function $954926fb6168ae2a$var$getContainerDimensions(containerNode, visualViewport) {
|
|
2721
|
-
let width = 0, height = 0, totalWidth = 0, totalHeight = 0, top = 0, left = 0;
|
|
2722
|
-
let scroll = {};
|
|
2723
|
-
let isPinchZoomedIn = ((visualViewport == null ? void 0 : visualViewport.scale) ?? 1) > 1;
|
|
2724
|
-
if (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") {
|
|
2725
|
-
let documentElement = document.documentElement;
|
|
2726
|
-
totalWidth = documentElement.clientWidth;
|
|
2727
|
-
totalHeight = documentElement.clientHeight;
|
|
2728
|
-
width = (visualViewport == null ? void 0 : visualViewport.width) ?? totalWidth;
|
|
2729
|
-
height = (visualViewport == null ? void 0 : visualViewport.height) ?? totalHeight;
|
|
2730
|
-
scroll.top = documentElement.scrollTop || containerNode.scrollTop;
|
|
2731
|
-
scroll.left = documentElement.scrollLeft || containerNode.scrollLeft;
|
|
2732
|
-
if (visualViewport) {
|
|
2733
|
-
top = visualViewport.offsetTop;
|
|
2734
|
-
left = visualViewport.offsetLeft;
|
|
2735
|
-
}
|
|
2736
|
-
} else {
|
|
2737
|
-
({ width, height, top, left } = $954926fb6168ae2a$var$getOffset(containerNode, false));
|
|
2738
|
-
scroll.top = containerNode.scrollTop;
|
|
2739
|
-
scroll.left = containerNode.scrollLeft;
|
|
2740
|
-
totalWidth = width;
|
|
2741
|
-
totalHeight = height;
|
|
2742
|
-
}
|
|
2743
|
-
if ($2add3ce32c6007eb$export$78551043582a6a98() && (containerNode.tagName === "BODY" || containerNode.tagName === "HTML") && isPinchZoomedIn) {
|
|
2744
|
-
scroll.top = 0;
|
|
2745
|
-
scroll.left = 0;
|
|
2746
|
-
top = (visualViewport == null ? void 0 : visualViewport.pageTop) ?? 0;
|
|
2747
|
-
left = (visualViewport == null ? void 0 : visualViewport.pageLeft) ?? 0;
|
|
2748
|
-
}
|
|
2749
|
-
return {
|
|
2750
|
-
width,
|
|
2751
|
-
height,
|
|
2752
|
-
totalWidth,
|
|
2753
|
-
totalHeight,
|
|
2754
|
-
scroll,
|
|
2755
|
-
top,
|
|
2756
|
-
left
|
|
2757
|
-
};
|
|
2758
|
-
}
|
|
2759
|
-
function $954926fb6168ae2a$var$getScroll(node) {
|
|
2760
|
-
return {
|
|
2761
|
-
top: node.scrollTop,
|
|
2762
|
-
left: node.scrollLeft,
|
|
2763
|
-
width: node.scrollWidth,
|
|
2764
|
-
height: node.scrollHeight
|
|
2765
|
-
};
|
|
2766
|
-
}
|
|
2767
|
-
function $954926fb6168ae2a$var$getDelta(axis, offset, size, boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary) {
|
|
2768
|
-
let containerScroll = containerDimensions.scroll[axis] ?? 0;
|
|
2769
|
-
let boundarySize = boundaryDimensions[$954926fb6168ae2a$var$AXIS_SIZE[axis]];
|
|
2770
|
-
let boundaryStartEdge = containerOffsetWithBoundary[axis] + boundaryDimensions.scroll[$954926fb6168ae2a$var$AXIS[axis]] + padding;
|
|
2771
|
-
let boundaryEndEdge = containerOffsetWithBoundary[axis] + boundaryDimensions.scroll[$954926fb6168ae2a$var$AXIS[axis]] + boundarySize - padding;
|
|
2772
|
-
let startEdgeOffset = offset - containerScroll + boundaryDimensions.scroll[$954926fb6168ae2a$var$AXIS[axis]] + containerOffsetWithBoundary[axis] - boundaryDimensions[$954926fb6168ae2a$var$AXIS[axis]];
|
|
2773
|
-
let endEdgeOffset = offset - containerScroll + size + boundaryDimensions.scroll[$954926fb6168ae2a$var$AXIS[axis]] + containerOffsetWithBoundary[axis] - boundaryDimensions[$954926fb6168ae2a$var$AXIS[axis]];
|
|
2774
|
-
if (startEdgeOffset < boundaryStartEdge) return boundaryStartEdge - startEdgeOffset;
|
|
2775
|
-
else if (endEdgeOffset > boundaryEndEdge) return Math.max(boundaryEndEdge - endEdgeOffset, boundaryStartEdge - startEdgeOffset);
|
|
2776
|
-
else return 0;
|
|
2777
|
-
}
|
|
2778
|
-
function $954926fb6168ae2a$var$getMargins(node) {
|
|
2779
|
-
let style = window.getComputedStyle(node);
|
|
2780
|
-
return {
|
|
2781
|
-
top: parseInt(style.marginTop, 10) || 0,
|
|
2782
|
-
bottom: parseInt(style.marginBottom, 10) || 0,
|
|
2783
|
-
left: parseInt(style.marginLeft, 10) || 0,
|
|
2784
|
-
right: parseInt(style.marginRight, 10) || 0
|
|
2785
|
-
};
|
|
2786
|
-
}
|
|
2787
|
-
function $954926fb6168ae2a$var$parsePlacement(input) {
|
|
2788
|
-
if ($954926fb6168ae2a$var$PARSED_PLACEMENT_CACHE[input]) return $954926fb6168ae2a$var$PARSED_PLACEMENT_CACHE[input];
|
|
2789
|
-
let [placement, crossPlacement] = input.split(" ");
|
|
2790
|
-
let axis = $954926fb6168ae2a$var$AXIS[placement] || "right";
|
|
2791
|
-
let crossAxis = $954926fb6168ae2a$var$CROSS_AXIS[axis];
|
|
2792
|
-
if (!$954926fb6168ae2a$var$AXIS[crossPlacement]) crossPlacement = "center";
|
|
2793
|
-
let size = $954926fb6168ae2a$var$AXIS_SIZE[axis];
|
|
2794
|
-
let crossSize = $954926fb6168ae2a$var$AXIS_SIZE[crossAxis];
|
|
2795
|
-
$954926fb6168ae2a$var$PARSED_PLACEMENT_CACHE[input] = {
|
|
2796
|
-
placement,
|
|
2797
|
-
crossPlacement,
|
|
2798
|
-
axis,
|
|
2799
|
-
crossAxis,
|
|
2800
|
-
size,
|
|
2801
|
-
crossSize
|
|
2802
|
-
};
|
|
2803
|
-
return $954926fb6168ae2a$var$PARSED_PLACEMENT_CACHE[input];
|
|
2804
|
-
}
|
|
2805
|
-
function $954926fb6168ae2a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions) {
|
|
2806
|
-
let { placement, crossPlacement, axis, crossAxis, size, crossSize } = placementInfo;
|
|
2807
|
-
let position = {};
|
|
2808
|
-
position[crossAxis] = childOffset[crossAxis] ?? 0;
|
|
2809
|
-
if (crossPlacement === "center")
|
|
2810
|
-
position[crossAxis] += ((childOffset[crossSize] ?? 0) - (overlaySize[crossSize] ?? 0)) / 2;
|
|
2811
|
-
else if (crossPlacement !== crossAxis)
|
|
2812
|
-
position[crossAxis] += (childOffset[crossSize] ?? 0) - (overlaySize[crossSize] ?? 0);
|
|
2813
|
-
position[crossAxis] += crossOffset;
|
|
2814
|
-
const minPosition = childOffset[crossAxis] - overlaySize[crossSize] + arrowSize + arrowBoundaryOffset;
|
|
2815
|
-
const maxPosition = childOffset[crossAxis] + childOffset[crossSize] - arrowSize - arrowBoundaryOffset;
|
|
2816
|
-
position[crossAxis] = $240e9101ba2842f5$export$7d15b64cf5a3a4c4(position[crossAxis], minPosition, maxPosition);
|
|
2817
|
-
if (placement === axis) {
|
|
2818
|
-
let containerHeight = isContainerPositioned ? containerDimensions[size] : containerDimensions[$954926fb6168ae2a$var$TOTAL_SIZE[size]];
|
|
2819
|
-
position[$954926fb6168ae2a$var$FLIPPED_DIRECTION[axis]] = Math.floor(containerHeight - childOffset[axis] + offset);
|
|
2820
|
-
} else position[axis] = Math.floor(childOffset[axis] + childOffset[size] + offset);
|
|
2821
|
-
return position;
|
|
2822
|
-
}
|
|
2823
|
-
function $954926fb6168ae2a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlayHeight, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport) {
|
|
2824
|
-
let overlayTop = (position.top != null ? position.top : containerDimensions[$954926fb6168ae2a$var$TOTAL_SIZE.height] - (position.bottom ?? 0) - overlayHeight) - (containerDimensions.scroll.top ?? 0);
|
|
2825
|
-
let boundaryToContainerTransformOffset = isContainerDescendentOfBoundary ? containerOffsetWithBoundary.top : 0;
|
|
2826
|
-
let boundingRect = {
|
|
2827
|
-
// This should be boundary top in container coord system vs viewport top in container coord system
|
|
2828
|
-
// For the viewport top, there are several cases
|
|
2829
|
-
// 1. pinchzoom case where we want the viewports offset top as top here
|
|
2830
|
-
// 2. case where container is offset from the boundary and is contained by the boundary. In this case the top we want here is NOT 0, we want to take boundary's top even though is is a negative number OR the visual viewport, whichever is more restrictive
|
|
2831
|
-
top: Math.max(boundaryDimensions.top + boundaryToContainerTransformOffset, ((visualViewport == null ? void 0 : visualViewport.offsetTop) ?? boundaryDimensions.top) + boundaryToContainerTransformOffset),
|
|
2832
|
-
bottom: Math.min(boundaryDimensions.top + boundaryDimensions.height + boundaryToContainerTransformOffset, ((visualViewport == null ? void 0 : visualViewport.offsetTop) ?? 0) + ((visualViewport == null ? void 0 : visualViewport.height) ?? 0))
|
|
2833
|
-
};
|
|
2834
|
-
let maxHeight = heightGrowthDirection !== "top" ? (
|
|
2835
|
-
// We want the distance between the top of the overlay to the bottom of the boundary
|
|
2836
|
-
Math.max(0, boundingRect.bottom - overlayTop - ((margins.top ?? 0) + (margins.bottom ?? 0) + padding))
|
|
2837
|
-
) : Math.max(0, overlayTop + overlayHeight - boundingRect.top - ((margins.top ?? 0) + (margins.bottom ?? 0) + padding));
|
|
2838
|
-
return maxHeight;
|
|
2839
|
-
}
|
|
2840
|
-
function $954926fb6168ae2a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding, placementInfo, containerDimensions, isContainerDescendentOfBoundary) {
|
|
2841
|
-
let { placement, axis, size } = placementInfo;
|
|
2842
|
-
if (placement === axis) return Math.max(0, childOffset[axis] - (containerDimensions.scroll[axis] ?? 0) - (boundaryDimensions[axis] + (isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0)) - (margins[axis] ?? 0) - margins[$954926fb6168ae2a$var$FLIPPED_DIRECTION[axis]] - padding);
|
|
2843
|
-
return Math.max(0, boundaryDimensions[size] + boundaryDimensions[axis] + (isContainerDescendentOfBoundary ? containerOffsetWithBoundary[axis] : 0) - childOffset[axis] - childOffset[size] + (containerDimensions.scroll[axis] ?? 0) - (margins[axis] ?? 0) - margins[$954926fb6168ae2a$var$FLIPPED_DIRECTION[axis]] - padding);
|
|
2844
|
-
}
|
|
2845
|
-
function $954926fb6168ae2a$export$6839422d1f33cee9(placementInput, childOffset, overlaySize, scrollSize, margins, padding, flip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, userSetMaxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport) {
|
|
2846
|
-
let placementInfo = $954926fb6168ae2a$var$parsePlacement(placementInput);
|
|
2847
|
-
let { size, crossAxis, crossSize, placement, crossPlacement } = placementInfo;
|
|
2848
|
-
let position = $954926fb6168ae2a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
|
|
2849
|
-
let normalizedOffset = offset;
|
|
2850
|
-
let space = $954926fb6168ae2a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, placementInfo, containerDimensions, isContainerDescendentOfBoundary);
|
|
2851
|
-
if (flip && overlaySize[size] > space) {
|
|
2852
|
-
let flippedPlacementInfo = $954926fb6168ae2a$var$parsePlacement(`${$954926fb6168ae2a$var$FLIPPED_DIRECTION[placement]} ${crossPlacement}`);
|
|
2853
|
-
let flippedPosition = $954926fb6168ae2a$var$computePosition(childOffset, boundaryDimensions, overlaySize, flippedPlacementInfo, offset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
|
|
2854
|
-
let flippedSpace = $954926fb6168ae2a$var$getAvailableSpace(boundaryDimensions, containerOffsetWithBoundary, childOffset, margins, padding + offset, flippedPlacementInfo, containerDimensions, isContainerDescendentOfBoundary);
|
|
2855
|
-
if (flippedSpace > space) {
|
|
2856
|
-
placementInfo = flippedPlacementInfo;
|
|
2857
|
-
position = flippedPosition;
|
|
2858
|
-
normalizedOffset = offset;
|
|
2859
|
-
}
|
|
2860
|
-
}
|
|
2861
|
-
let heightGrowthDirection = "bottom";
|
|
2862
|
-
if (placementInfo.axis === "top") {
|
|
2863
|
-
if (placementInfo.placement === "top") heightGrowthDirection = "top";
|
|
2864
|
-
else if (placementInfo.placement === "bottom") heightGrowthDirection = "bottom";
|
|
2865
|
-
} else if (placementInfo.crossAxis === "top") {
|
|
2866
|
-
if (placementInfo.crossPlacement === "top") heightGrowthDirection = "bottom";
|
|
2867
|
-
else if (placementInfo.crossPlacement === "bottom") heightGrowthDirection = "top";
|
|
2868
|
-
}
|
|
2869
|
-
let delta = $954926fb6168ae2a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
|
|
2870
|
-
position[crossAxis] += delta;
|
|
2871
|
-
let maxHeight = $954926fb6168ae2a$var$getMaxHeight(position, boundaryDimensions, containerOffsetWithBoundary, isContainerPositioned, margins, padding, overlaySize.height, heightGrowthDirection, containerDimensions, isContainerDescendentOfBoundary, visualViewport);
|
|
2872
|
-
if (userSetMaxHeight && userSetMaxHeight < maxHeight) maxHeight = userSetMaxHeight;
|
|
2873
|
-
overlaySize.height = Math.min(overlaySize.height, maxHeight);
|
|
2874
|
-
position = $954926fb6168ae2a$var$computePosition(childOffset, boundaryDimensions, overlaySize, placementInfo, normalizedOffset, crossOffset, containerOffsetWithBoundary, isContainerPositioned, arrowSize, arrowBoundaryOffset, containerDimensions);
|
|
2875
|
-
delta = $954926fb6168ae2a$var$getDelta(crossAxis, position[crossAxis], overlaySize[crossSize], boundaryDimensions, containerDimensions, padding, containerOffsetWithBoundary);
|
|
2876
|
-
position[crossAxis] += delta;
|
|
2877
|
-
let arrowPosition = {};
|
|
2878
|
-
let origin = childOffset[crossAxis] - position[crossAxis] - margins[$954926fb6168ae2a$var$AXIS[crossAxis]];
|
|
2879
|
-
let preferredArrowPosition = origin + 0.5 * childOffset[crossSize];
|
|
2880
|
-
const arrowMinPosition = arrowSize / 2 + arrowBoundaryOffset;
|
|
2881
|
-
const overlayMargin = $954926fb6168ae2a$var$AXIS[crossAxis] === "left" ? (margins.left ?? 0) + (margins.right ?? 0) : (margins.top ?? 0) + (margins.bottom ?? 0);
|
|
2882
|
-
const arrowMaxPosition = overlaySize[crossSize] - overlayMargin - arrowSize / 2 - arrowBoundaryOffset;
|
|
2883
|
-
const arrowOverlappingChildMinEdge = childOffset[crossAxis] + arrowSize / 2 - (position[crossAxis] + margins[$954926fb6168ae2a$var$AXIS[crossAxis]]);
|
|
2884
|
-
const arrowOverlappingChildMaxEdge = childOffset[crossAxis] + childOffset[crossSize] - arrowSize / 2 - (position[crossAxis] + margins[$954926fb6168ae2a$var$AXIS[crossAxis]]);
|
|
2885
|
-
const arrowPositionOverlappingChild = $240e9101ba2842f5$export$7d15b64cf5a3a4c4(preferredArrowPosition, arrowOverlappingChildMinEdge, arrowOverlappingChildMaxEdge);
|
|
2886
|
-
arrowPosition[crossAxis] = $240e9101ba2842f5$export$7d15b64cf5a3a4c4(arrowPositionOverlappingChild, arrowMinPosition, arrowMaxPosition);
|
|
2887
|
-
({ placement, crossPlacement } = placementInfo);
|
|
2888
|
-
if (arrowSize) origin = arrowPosition[crossAxis];
|
|
2889
|
-
else if (crossPlacement === "right") origin += childOffset[crossSize];
|
|
2890
|
-
else if (crossPlacement === "center") origin += childOffset[crossSize] / 2;
|
|
2891
|
-
let crossOrigin = placement === "left" || placement === "top" ? overlaySize[size] : 0;
|
|
2892
|
-
let triggerAnchorPoint = {
|
|
2893
|
-
x: placement === "top" || placement === "bottom" ? origin : crossOrigin,
|
|
2894
|
-
y: placement === "left" || placement === "right" ? origin : crossOrigin
|
|
2895
|
-
};
|
|
2896
|
-
return {
|
|
2897
|
-
position,
|
|
2898
|
-
maxHeight,
|
|
2899
|
-
arrowOffsetLeft: arrowPosition.left,
|
|
2900
|
-
arrowOffsetTop: arrowPosition.top,
|
|
2901
|
-
placement,
|
|
2902
|
-
triggerAnchorPoint
|
|
2903
|
-
};
|
|
2904
|
-
}
|
|
2905
|
-
function $954926fb6168ae2a$export$b3ceb0cbf1056d98(opts) {
|
|
2906
|
-
let { placement, targetNode, overlayNode, scrollNode, padding, shouldFlip, boundaryElement, offset, crossOffset, maxHeight, arrowSize = 0, arrowBoundaryOffset = 0 } = opts;
|
|
2907
|
-
let visualViewport = $954926fb6168ae2a$var$getVisualViewport();
|
|
2908
|
-
let container = overlayNode instanceof HTMLElement ? $954926fb6168ae2a$var$getContainingBlock(overlayNode) : document.documentElement;
|
|
2909
|
-
let isViewportContainer = container === document.documentElement;
|
|
2910
|
-
const containerPositionStyle = window.getComputedStyle(container).position;
|
|
2911
|
-
let isContainerPositioned = !!containerPositionStyle && containerPositionStyle !== "static";
|
|
2912
|
-
let childOffset = isViewportContainer ? $954926fb6168ae2a$var$getOffset(targetNode, false) : $954926fb6168ae2a$var$getPosition(targetNode, container, false);
|
|
2913
|
-
if (!isViewportContainer) {
|
|
2914
|
-
let { marginTop, marginLeft } = window.getComputedStyle(targetNode);
|
|
2915
|
-
childOffset.top += parseInt(marginTop, 10) || 0;
|
|
2916
|
-
childOffset.left += parseInt(marginLeft, 10) || 0;
|
|
2917
|
-
}
|
|
2918
|
-
let overlaySize = $954926fb6168ae2a$var$getOffset(overlayNode, true);
|
|
2919
|
-
let margins = $954926fb6168ae2a$var$getMargins(overlayNode);
|
|
2920
|
-
overlaySize.width += (margins.left ?? 0) + (margins.right ?? 0);
|
|
2921
|
-
overlaySize.height += (margins.top ?? 0) + (margins.bottom ?? 0);
|
|
2922
|
-
let scrollSize = $954926fb6168ae2a$var$getScroll(scrollNode);
|
|
2923
|
-
let boundaryDimensions = $954926fb6168ae2a$var$getContainerDimensions(boundaryElement, visualViewport);
|
|
2924
|
-
let containerDimensions = $954926fb6168ae2a$var$getContainerDimensions(container, visualViewport);
|
|
2925
|
-
let containerOffsetWithBoundary;
|
|
2926
|
-
if ((boundaryElement.tagName === "BODY" || boundaryElement.tagName === "HTML") && !isViewportContainer) {
|
|
2927
|
-
let containerRect = $954926fb6168ae2a$export$4b834cebd9e5cebe(container, false);
|
|
2928
|
-
containerOffsetWithBoundary = {
|
|
2929
|
-
top: -(containerRect.top - boundaryDimensions.top),
|
|
2930
|
-
left: -(containerRect.left - boundaryDimensions.left),
|
|
2931
|
-
width: 0,
|
|
2932
|
-
height: 0
|
|
2933
|
-
};
|
|
2934
|
-
} else if ((boundaryElement.tagName === "BODY" || boundaryElement.tagName === "HTML") && isViewportContainer)
|
|
2935
|
-
containerOffsetWithBoundary = {
|
|
2936
|
-
top: 0,
|
|
2937
|
-
left: 0,
|
|
2938
|
-
width: 0,
|
|
2939
|
-
height: 0
|
|
2940
|
-
};
|
|
2941
|
-
else
|
|
2942
|
-
containerOffsetWithBoundary = $954926fb6168ae2a$var$getPosition(boundaryElement, container, false);
|
|
2943
|
-
let isContainerDescendentOfBoundary = $23f2114a1b82827e$export$4282f70798064fe0(boundaryElement, container);
|
|
2944
|
-
return $954926fb6168ae2a$export$6839422d1f33cee9(placement, childOffset, overlaySize, scrollSize, margins, padding, shouldFlip, boundaryDimensions, containerDimensions, containerOffsetWithBoundary, offset, crossOffset, isContainerPositioned, maxHeight, arrowSize, arrowBoundaryOffset, isContainerDescendentOfBoundary, visualViewport);
|
|
2945
|
-
}
|
|
2946
|
-
function $954926fb6168ae2a$export$4b834cebd9e5cebe(node, ignoreScale) {
|
|
2947
|
-
let { top, left, width, height } = node.getBoundingClientRect();
|
|
2948
|
-
if (ignoreScale && node instanceof node.ownerDocument.defaultView.HTMLElement) {
|
|
2949
|
-
width = node.offsetWidth;
|
|
2950
|
-
height = node.offsetHeight;
|
|
2951
|
-
}
|
|
2952
|
-
return {
|
|
2953
|
-
top,
|
|
2954
|
-
left,
|
|
2955
|
-
width,
|
|
2956
|
-
height
|
|
2957
|
-
};
|
|
2958
|
-
}
|
|
2959
|
-
function $954926fb6168ae2a$var$getOffset(node, ignoreScale) {
|
|
2960
|
-
let { top, left, width, height } = $954926fb6168ae2a$export$4b834cebd9e5cebe(node, ignoreScale);
|
|
2961
|
-
let { scrollTop, scrollLeft, clientTop, clientLeft } = document.documentElement;
|
|
2962
|
-
return {
|
|
2963
|
-
top: top + scrollTop - clientTop,
|
|
2964
|
-
left: left + scrollLeft - clientLeft,
|
|
2965
|
-
width,
|
|
2966
|
-
height
|
|
2967
|
-
};
|
|
2968
|
-
}
|
|
2969
|
-
function $954926fb6168ae2a$var$getPosition(node, parent, ignoreScale) {
|
|
2970
|
-
let style = window.getComputedStyle(node);
|
|
2971
|
-
let offset;
|
|
2972
|
-
if (style.position === "fixed") offset = $954926fb6168ae2a$export$4b834cebd9e5cebe(node, ignoreScale);
|
|
2973
|
-
else {
|
|
2974
|
-
offset = $954926fb6168ae2a$var$getOffset(node, ignoreScale);
|
|
2975
|
-
let parentOffset = $954926fb6168ae2a$var$getOffset(parent, ignoreScale);
|
|
2976
|
-
let parentStyle = window.getComputedStyle(parent);
|
|
2977
|
-
parentOffset.top += (parseInt(parentStyle.borderTopWidth, 10) || 0) - parent.scrollTop;
|
|
2978
|
-
parentOffset.left += (parseInt(parentStyle.borderLeftWidth, 10) || 0) - parent.scrollLeft;
|
|
2979
|
-
offset.top -= parentOffset.top;
|
|
2980
|
-
offset.left -= parentOffset.left;
|
|
2981
|
-
}
|
|
2982
|
-
offset.top -= parseInt(style.marginTop, 10) || 0;
|
|
2983
|
-
offset.left -= parseInt(style.marginLeft, 10) || 0;
|
|
2984
|
-
return offset;
|
|
2985
|
-
}
|
|
2986
|
-
function $954926fb6168ae2a$var$getContainingBlock(node) {
|
|
2987
|
-
let offsetParent = node.offsetParent;
|
|
2988
|
-
if (offsetParent && offsetParent === document.body && window.getComputedStyle(offsetParent).position === "static" && !$954926fb6168ae2a$var$isContainingBlock(offsetParent)) offsetParent = document.documentElement;
|
|
2989
|
-
if (offsetParent == null) {
|
|
2990
|
-
offsetParent = node.parentElement;
|
|
2991
|
-
while (offsetParent && !$954926fb6168ae2a$var$isContainingBlock(offsetParent)) offsetParent = offsetParent.parentElement;
|
|
2992
|
-
}
|
|
2993
|
-
return offsetParent || document.documentElement;
|
|
2994
|
-
}
|
|
2995
|
-
function $954926fb6168ae2a$var$isContainingBlock(node) {
|
|
2996
|
-
let style = window.getComputedStyle(node);
|
|
2997
|
-
return style.transform !== "none" || /transform|perspective/.test(style.willChange) || style.filter !== "none" || style.contain === "paint" || "backdropFilter" in style && style.backdropFilter !== "none" || "WebkitBackdropFilter" in style && style.WebkitBackdropFilter !== "none";
|
|
2998
|
-
}
|
|
2999
|
-
let $b3526bc71400be8d$var$visualViewport = typeof document !== "undefined" ? window.visualViewport : null;
|
|
3000
|
-
function $b3526bc71400be8d$export$d39e1813b3bdd0e1(props) {
|
|
3001
|
-
let { direction } = $2eb8e6d23f3d0cb0$export$43bb16f9c6d9e3f7();
|
|
3002
|
-
let { arrowSize, targetRef, overlayRef, arrowRef, scrollRef = overlayRef, placement = "bottom", containerPadding = 12, shouldFlip = true, boundaryElement = typeof document !== "undefined" ? document.body : null, offset = 0, crossOffset = 0, shouldUpdatePosition = true, isOpen = true, onClose, maxHeight, arrowBoundaryOffset = 0 } = props;
|
|
3003
|
-
let [position, setPosition] = useState(null);
|
|
3004
|
-
let deps = [
|
|
3005
|
-
shouldUpdatePosition,
|
|
3006
|
-
placement,
|
|
3007
|
-
overlayRef.current,
|
|
3008
|
-
targetRef.current,
|
|
3009
|
-
arrowRef == null ? void 0 : arrowRef.current,
|
|
3010
|
-
scrollRef.current,
|
|
3011
|
-
containerPadding,
|
|
3012
|
-
shouldFlip,
|
|
3013
|
-
boundaryElement,
|
|
3014
|
-
offset,
|
|
3015
|
-
crossOffset,
|
|
3016
|
-
isOpen,
|
|
3017
|
-
direction,
|
|
3018
|
-
maxHeight,
|
|
3019
|
-
arrowBoundaryOffset,
|
|
3020
|
-
arrowSize
|
|
3021
|
-
];
|
|
3022
|
-
let lastScale = useRef($b3526bc71400be8d$var$visualViewport == null ? void 0 : $b3526bc71400be8d$var$visualViewport.scale);
|
|
3023
|
-
useEffect(() => {
|
|
3024
|
-
if (isOpen) lastScale.current = $b3526bc71400be8d$var$visualViewport == null ? void 0 : $b3526bc71400be8d$var$visualViewport.scale;
|
|
3025
|
-
}, [
|
|
3026
|
-
isOpen
|
|
3027
|
-
]);
|
|
3028
|
-
let updatePosition = useCallback(() => {
|
|
3029
|
-
var _a, _b;
|
|
3030
|
-
if (shouldUpdatePosition === false || !isOpen || !overlayRef.current || !targetRef.current || !boundaryElement) return;
|
|
3031
|
-
if (($b3526bc71400be8d$var$visualViewport == null ? void 0 : $b3526bc71400be8d$var$visualViewport.scale) !== lastScale.current) return;
|
|
3032
|
-
let anchor = null;
|
|
3033
|
-
if (scrollRef.current && $23f2114a1b82827e$export$b4f377a2b6254582(scrollRef.current)) {
|
|
3034
|
-
let anchorRect = (_a = $23f2114a1b82827e$export$cd4e5573fbe2b576()) == null ? void 0 : _a.getBoundingClientRect();
|
|
3035
|
-
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
3036
|
-
anchor = {
|
|
3037
|
-
type: "top",
|
|
3038
|
-
offset: ((anchorRect == null ? void 0 : anchorRect.top) ?? 0) - scrollRect.top
|
|
3039
|
-
};
|
|
3040
|
-
if (anchor.offset > scrollRect.height / 2) {
|
|
3041
|
-
anchor.type = "bottom";
|
|
3042
|
-
anchor.offset = ((anchorRect == null ? void 0 : anchorRect.bottom) ?? 0) - scrollRect.bottom;
|
|
3043
|
-
}
|
|
3044
|
-
}
|
|
3045
|
-
let overlay = overlayRef.current;
|
|
3046
|
-
if (!maxHeight && overlayRef.current) {
|
|
3047
|
-
overlay.style.top = "0px";
|
|
3048
|
-
overlay.style.bottom = "";
|
|
3049
|
-
overlay.style.maxHeight = (((_b = window.visualViewport) == null ? void 0 : _b.height) ?? window.innerHeight) + "px";
|
|
3050
|
-
}
|
|
3051
|
-
let position2 = $954926fb6168ae2a$export$b3ceb0cbf1056d98({
|
|
3052
|
-
placement: $b3526bc71400be8d$var$translateRTL(placement, direction),
|
|
3053
|
-
overlayNode: overlayRef.current,
|
|
3054
|
-
targetNode: targetRef.current,
|
|
3055
|
-
scrollNode: scrollRef.current || overlayRef.current,
|
|
3056
|
-
padding: containerPadding,
|
|
3057
|
-
shouldFlip,
|
|
3058
|
-
boundaryElement,
|
|
3059
|
-
offset,
|
|
3060
|
-
crossOffset,
|
|
3061
|
-
maxHeight,
|
|
3062
|
-
arrowSize: arrowSize ?? ((arrowRef == null ? void 0 : arrowRef.current) ? $954926fb6168ae2a$export$4b834cebd9e5cebe(arrowRef.current, true).width : 0),
|
|
3063
|
-
arrowBoundaryOffset
|
|
3064
|
-
});
|
|
3065
|
-
if (!position2.position) return;
|
|
3066
|
-
overlay.style.top = "";
|
|
3067
|
-
overlay.style.bottom = "";
|
|
3068
|
-
overlay.style.left = "";
|
|
3069
|
-
overlay.style.right = "";
|
|
3070
|
-
Object.keys(position2.position).forEach((key) => overlay.style[key] = position2.position[key] + "px");
|
|
3071
|
-
overlay.style.maxHeight = position2.maxHeight != null ? position2.maxHeight + "px" : "";
|
|
3072
|
-
let activeElement = $23f2114a1b82827e$export$cd4e5573fbe2b576();
|
|
3073
|
-
if (anchor && activeElement && scrollRef.current) {
|
|
3074
|
-
let anchorRect = activeElement.getBoundingClientRect();
|
|
3075
|
-
let scrollRect = scrollRef.current.getBoundingClientRect();
|
|
3076
|
-
let newOffset = anchorRect[anchor.type] - scrollRect[anchor.type];
|
|
3077
|
-
scrollRef.current.scrollTop += newOffset - anchor.offset;
|
|
3078
|
-
}
|
|
3079
|
-
setPosition(position2);
|
|
3080
|
-
}, deps);
|
|
3081
|
-
$c4867b2f328c2698$export$e5c5a5f917a5871c(updatePosition, deps);
|
|
3082
|
-
$b3526bc71400be8d$var$useResize(updatePosition);
|
|
3083
|
-
$970072cf4b13fde3$export$683480f191c0e3ea({
|
|
3084
|
-
ref: overlayRef,
|
|
3085
|
-
onResize: updatePosition
|
|
3086
|
-
});
|
|
3087
|
-
$970072cf4b13fde3$export$683480f191c0e3ea({
|
|
3088
|
-
ref: targetRef,
|
|
3089
|
-
onResize: updatePosition
|
|
3090
|
-
});
|
|
3091
|
-
let isResizing = useRef(false);
|
|
3092
|
-
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
3093
|
-
let timeout;
|
|
3094
|
-
let onResize = () => {
|
|
3095
|
-
isResizing.current = true;
|
|
3096
|
-
clearTimeout(timeout);
|
|
3097
|
-
timeout = setTimeout(() => {
|
|
3098
|
-
isResizing.current = false;
|
|
3099
|
-
}, 500);
|
|
3100
|
-
updatePosition();
|
|
3101
|
-
};
|
|
3102
|
-
let onScroll = () => {
|
|
3103
|
-
if (isResizing.current) onResize();
|
|
3104
|
-
};
|
|
3105
|
-
$b3526bc71400be8d$var$visualViewport == null ? void 0 : $b3526bc71400be8d$var$visualViewport.addEventListener("resize", onResize);
|
|
3106
|
-
$b3526bc71400be8d$var$visualViewport == null ? void 0 : $b3526bc71400be8d$var$visualViewport.addEventListener("scroll", onScroll);
|
|
3107
|
-
return () => {
|
|
3108
|
-
$b3526bc71400be8d$var$visualViewport == null ? void 0 : $b3526bc71400be8d$var$visualViewport.removeEventListener("resize", onResize);
|
|
3109
|
-
$b3526bc71400be8d$var$visualViewport == null ? void 0 : $b3526bc71400be8d$var$visualViewport.removeEventListener("scroll", onScroll);
|
|
3110
|
-
};
|
|
3111
|
-
}, [
|
|
3112
|
-
updatePosition
|
|
3113
|
-
]);
|
|
3114
|
-
let close = useCallback(() => {
|
|
3115
|
-
if (!isResizing.current) onClose == null ? void 0 : onClose();
|
|
3116
|
-
}, [
|
|
3117
|
-
onClose,
|
|
3118
|
-
isResizing
|
|
3119
|
-
]);
|
|
3120
|
-
$22e2f5f6490788e8$export$18fc8428861184da({
|
|
3121
|
-
triggerRef: targetRef,
|
|
3122
|
-
isOpen,
|
|
3123
|
-
onClose: onClose && close
|
|
3124
|
-
});
|
|
3125
|
-
return {
|
|
3126
|
-
overlayProps: {
|
|
3127
|
-
style: {
|
|
3128
|
-
position: position ? "absolute" : "fixed",
|
|
3129
|
-
top: !position ? 0 : void 0,
|
|
3130
|
-
left: !position ? 0 : void 0,
|
|
3131
|
-
zIndex: 1e5,
|
|
3132
|
-
...position == null ? void 0 : position.position,
|
|
3133
|
-
maxHeight: (position == null ? void 0 : position.maxHeight) ?? "100vh"
|
|
3134
|
-
}
|
|
3135
|
-
},
|
|
3136
|
-
placement: (position == null ? void 0 : position.placement) ?? null,
|
|
3137
|
-
triggerAnchorPoint: (position == null ? void 0 : position.triggerAnchorPoint) ?? null,
|
|
3138
|
-
arrowProps: {
|
|
3139
|
-
"aria-hidden": "true",
|
|
3140
|
-
role: "presentation",
|
|
3141
|
-
style: {
|
|
3142
|
-
left: position == null ? void 0 : position.arrowOffsetLeft,
|
|
3143
|
-
top: position == null ? void 0 : position.arrowOffsetTop
|
|
3144
|
-
}
|
|
3145
|
-
},
|
|
3146
|
-
updatePosition
|
|
3147
|
-
};
|
|
3148
|
-
}
|
|
3149
|
-
function $b3526bc71400be8d$var$useResize(onResize) {
|
|
3150
|
-
$c4867b2f328c2698$export$e5c5a5f917a5871c(() => {
|
|
3151
|
-
window.addEventListener("resize", onResize, false);
|
|
3152
|
-
return () => {
|
|
3153
|
-
window.removeEventListener("resize", onResize, false);
|
|
3154
|
-
};
|
|
3155
|
-
}, [
|
|
3156
|
-
onResize
|
|
3157
|
-
]);
|
|
3158
|
-
}
|
|
3159
|
-
function $b3526bc71400be8d$var$translateRTL(position, direction) {
|
|
3160
|
-
if (direction === "rtl") return position.replace("start", "right").replace("end", "left");
|
|
3161
|
-
return position.replace("start", "left").replace("end", "right");
|
|
3162
|
-
}
|
|
3163
2519
|
function $f8a024fbad3a5a2e$export$542a6fd13ac93354(props, state) {
|
|
3164
2520
|
let { triggerRef, popoverRef, groupRef, isNonModal, isKeyboardDismissDisabled, shouldCloseOnInteractOutside, ...otherProps } = props;
|
|
3165
2521
|
let isSubmenu = otherProps["trigger"] === "SubmenuTrigger";
|
|
@@ -3204,104 +2560,6 @@ function $f8a024fbad3a5a2e$export$542a6fd13ac93354(props, state) {
|
|
|
3204
2560
|
triggerAnchorPoint: origin
|
|
3205
2561
|
};
|
|
3206
2562
|
}
|
|
3207
|
-
function $8c383cffc84c9982$export$1c4b08e0eca38426(props, state) {
|
|
3208
|
-
let domProps = $8e9d2fae0ecb9001$export$457c3d6518dd4c6f(props, {
|
|
3209
|
-
labelable: true
|
|
3210
|
-
});
|
|
3211
|
-
let { hoverProps } = $e969f22b6713ca4a$export$ae780daf29e6d456({
|
|
3212
|
-
onHoverStart: () => state == null ? void 0 : state.open(true),
|
|
3213
|
-
onHoverEnd: () => state == null ? void 0 : state.close()
|
|
3214
|
-
});
|
|
3215
|
-
return {
|
|
3216
|
-
tooltipProps: $bbaa08b3cd72f041$export$9d1611c77c2fe928(domProps, hoverProps, {
|
|
3217
|
-
role: "tooltip"
|
|
3218
|
-
})
|
|
3219
|
-
};
|
|
3220
|
-
}
|
|
3221
|
-
function $85908aa8a35f0fac$export$a6da6c504e4bba8b(props, state, ref) {
|
|
3222
|
-
let { isDisabled, trigger, shouldCloseOnPress = true } = props;
|
|
3223
|
-
let tooltipId = $390e54f620492c70$export$f680877a34711e37();
|
|
3224
|
-
let isHovered = useRef(false);
|
|
3225
|
-
let isFocused = useRef(false);
|
|
3226
|
-
let handleShow = () => {
|
|
3227
|
-
if (isHovered.current || isFocused.current) state.open(isFocused.current);
|
|
3228
|
-
};
|
|
3229
|
-
let handleHide = (immediate) => {
|
|
3230
|
-
if (!isHovered.current && !isFocused.current) state.close(immediate);
|
|
3231
|
-
};
|
|
3232
|
-
useEffect(() => {
|
|
3233
|
-
let onKeyDown = (e) => {
|
|
3234
|
-
if (ref && ref.current) {
|
|
3235
|
-
if (e.key === "Escape") {
|
|
3236
|
-
e.stopPropagation();
|
|
3237
|
-
state.close(true);
|
|
3238
|
-
}
|
|
3239
|
-
}
|
|
3240
|
-
};
|
|
3241
|
-
if (state.isOpen) {
|
|
3242
|
-
document.addEventListener("keydown", onKeyDown, true);
|
|
3243
|
-
return () => {
|
|
3244
|
-
document.removeEventListener("keydown", onKeyDown, true);
|
|
3245
|
-
};
|
|
3246
|
-
}
|
|
3247
|
-
}, [
|
|
3248
|
-
ref,
|
|
3249
|
-
state
|
|
3250
|
-
]);
|
|
3251
|
-
let onHoverStart = () => {
|
|
3252
|
-
if (trigger === "focus") return;
|
|
3253
|
-
if ($8f5a2122b0992be3$export$630ff653c5ada6a9() === "pointer") isHovered.current = true;
|
|
3254
|
-
else isHovered.current = false;
|
|
3255
|
-
handleShow();
|
|
3256
|
-
};
|
|
3257
|
-
let onHoverEnd = () => {
|
|
3258
|
-
if (trigger === "focus") return;
|
|
3259
|
-
isFocused.current = false;
|
|
3260
|
-
isHovered.current = false;
|
|
3261
|
-
handleHide();
|
|
3262
|
-
};
|
|
3263
|
-
let onPressStart = () => {
|
|
3264
|
-
if (!shouldCloseOnPress) return;
|
|
3265
|
-
isFocused.current = false;
|
|
3266
|
-
isHovered.current = false;
|
|
3267
|
-
handleHide(true);
|
|
3268
|
-
};
|
|
3269
|
-
let onFocus = () => {
|
|
3270
|
-
let isVisible = $8f5a2122b0992be3$export$b9b3dfddab17db27();
|
|
3271
|
-
if (isVisible) {
|
|
3272
|
-
isFocused.current = true;
|
|
3273
|
-
handleShow();
|
|
3274
|
-
}
|
|
3275
|
-
};
|
|
3276
|
-
let onBlur = () => {
|
|
3277
|
-
isFocused.current = false;
|
|
3278
|
-
isHovered.current = false;
|
|
3279
|
-
handleHide(true);
|
|
3280
|
-
};
|
|
3281
|
-
let { hoverProps } = $e969f22b6713ca4a$export$ae780daf29e6d456({
|
|
3282
|
-
isDisabled,
|
|
3283
|
-
onHoverStart,
|
|
3284
|
-
onHoverEnd
|
|
3285
|
-
});
|
|
3286
|
-
let { focusableProps } = $d1116acdf220c2da$export$4c014de7c8940b4c({
|
|
3287
|
-
isDisabled,
|
|
3288
|
-
onFocus,
|
|
3289
|
-
onBlur
|
|
3290
|
-
}, ref);
|
|
3291
|
-
return {
|
|
3292
|
-
triggerProps: {
|
|
3293
|
-
"aria-describedby": state.isOpen ? tooltipId : void 0,
|
|
3294
|
-
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(focusableProps, hoverProps, {
|
|
3295
|
-
onPointerDown: onPressStart,
|
|
3296
|
-
onKeyDown: onPressStart
|
|
3297
|
-
}),
|
|
3298
|
-
tabIndex: void 0
|
|
3299
|
-
},
|
|
3300
|
-
tooltipProps: {
|
|
3301
|
-
id: tooltipId
|
|
3302
|
-
}
|
|
3303
|
-
};
|
|
3304
|
-
}
|
|
3305
2563
|
function $dd602d3c757202f2$export$eac50920cf2fd59a(date, minValue, maxValue) {
|
|
3306
2564
|
return minValue != null && date.compare(minValue) < 0 || maxValue != null && date.compare(maxValue) > 0;
|
|
3307
2565
|
}
|
|
@@ -3772,32 +3030,6 @@ function $a0a87fb6fcfb22ec$var$nextUnavailableDate(anchorDate, state, dir) {
|
|
|
3772
3030
|
days: -dir
|
|
3773
3031
|
});
|
|
3774
3032
|
}
|
|
3775
|
-
function $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props) {
|
|
3776
|
-
let [isOpen, setOpen] = $3e6197669829fe11$export$40bfa8c7b0832715(props.isOpen, props.defaultOpen || false, props.onOpenChange);
|
|
3777
|
-
const open = useCallback(() => {
|
|
3778
|
-
setOpen(true);
|
|
3779
|
-
}, [
|
|
3780
|
-
setOpen
|
|
3781
|
-
]);
|
|
3782
|
-
const close = useCallback(() => {
|
|
3783
|
-
setOpen(false);
|
|
3784
|
-
}, [
|
|
3785
|
-
setOpen
|
|
3786
|
-
]);
|
|
3787
|
-
const toggle = useCallback(() => {
|
|
3788
|
-
setOpen(!isOpen);
|
|
3789
|
-
}, [
|
|
3790
|
-
setOpen,
|
|
3791
|
-
isOpen
|
|
3792
|
-
]);
|
|
3793
|
-
return {
|
|
3794
|
-
isOpen,
|
|
3795
|
-
setOpen,
|
|
3796
|
-
open,
|
|
3797
|
-
close,
|
|
3798
|
-
toggle
|
|
3799
|
-
};
|
|
3800
|
-
}
|
|
3801
3033
|
function $28aae683a942e141$export$87194bb378cc3ac2(props) {
|
|
3802
3034
|
let overlayState = $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props);
|
|
3803
3035
|
let [value, setValue] = $3e6197669829fe11$export$40bfa8c7b0832715(props.value, props.defaultValue || null, props.onChange);
|
|
@@ -4118,101 +3350,6 @@ function $6de3e3f1a7663217$export$e50a61c1de9f574(props) {
|
|
|
4118
3350
|
function $6de3e3f1a7663217$var$isCompleteRange(value) {
|
|
4119
3351
|
return (value == null ? void 0 : value.start) != null && value.end != null;
|
|
4120
3352
|
}
|
|
4121
|
-
const $3834487504f4fc00$var$TOOLTIP_DELAY = 1500;
|
|
4122
|
-
const $3834487504f4fc00$var$TOOLTIP_COOLDOWN = 500;
|
|
4123
|
-
let $3834487504f4fc00$var$tooltips = {};
|
|
4124
|
-
let $3834487504f4fc00$var$tooltipId = 0;
|
|
4125
|
-
let $3834487504f4fc00$var$globalWarmedUp = false;
|
|
4126
|
-
let $3834487504f4fc00$var$globalWarmUpTimeout = null;
|
|
4127
|
-
let $3834487504f4fc00$var$globalCooldownTimeout = null;
|
|
4128
|
-
function $3834487504f4fc00$export$4d40659c25ecb50b(props = {}) {
|
|
4129
|
-
let { delay = $3834487504f4fc00$var$TOOLTIP_DELAY, closeDelay = $3834487504f4fc00$var$TOOLTIP_COOLDOWN } = props;
|
|
4130
|
-
let { isOpen, open, close } = $f11fb0bcf1b2687a$export$61c6a8c84e605fb6(props);
|
|
4131
|
-
let id = useMemo(() => `${++$3834487504f4fc00$var$tooltipId}`, []);
|
|
4132
|
-
let closeTimeout = useRef(null);
|
|
4133
|
-
let closeCallback = useRef(close);
|
|
4134
|
-
let ensureTooltipEntry = () => {
|
|
4135
|
-
$3834487504f4fc00$var$tooltips[id] = hideTooltip;
|
|
4136
|
-
};
|
|
4137
|
-
let closeOpenTooltips = () => {
|
|
4138
|
-
for (let hideTooltipId in $3834487504f4fc00$var$tooltips) if (hideTooltipId !== id) {
|
|
4139
|
-
$3834487504f4fc00$var$tooltips[hideTooltipId](true);
|
|
4140
|
-
delete $3834487504f4fc00$var$tooltips[hideTooltipId];
|
|
4141
|
-
}
|
|
4142
|
-
};
|
|
4143
|
-
let showTooltip = () => {
|
|
4144
|
-
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
4145
|
-
closeTimeout.current = null;
|
|
4146
|
-
closeOpenTooltips();
|
|
4147
|
-
ensureTooltipEntry();
|
|
4148
|
-
$3834487504f4fc00$var$globalWarmedUp = true;
|
|
4149
|
-
open();
|
|
4150
|
-
if ($3834487504f4fc00$var$globalWarmUpTimeout) {
|
|
4151
|
-
clearTimeout($3834487504f4fc00$var$globalWarmUpTimeout);
|
|
4152
|
-
$3834487504f4fc00$var$globalWarmUpTimeout = null;
|
|
4153
|
-
}
|
|
4154
|
-
if ($3834487504f4fc00$var$globalCooldownTimeout) {
|
|
4155
|
-
clearTimeout($3834487504f4fc00$var$globalCooldownTimeout);
|
|
4156
|
-
$3834487504f4fc00$var$globalCooldownTimeout = null;
|
|
4157
|
-
}
|
|
4158
|
-
};
|
|
4159
|
-
let hideTooltip = (immediate) => {
|
|
4160
|
-
if (immediate || closeDelay <= 0) {
|
|
4161
|
-
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
4162
|
-
closeTimeout.current = null;
|
|
4163
|
-
closeCallback.current();
|
|
4164
|
-
} else if (!closeTimeout.current) closeTimeout.current = setTimeout(() => {
|
|
4165
|
-
closeTimeout.current = null;
|
|
4166
|
-
closeCallback.current();
|
|
4167
|
-
}, closeDelay);
|
|
4168
|
-
if ($3834487504f4fc00$var$globalWarmUpTimeout) {
|
|
4169
|
-
clearTimeout($3834487504f4fc00$var$globalWarmUpTimeout);
|
|
4170
|
-
$3834487504f4fc00$var$globalWarmUpTimeout = null;
|
|
4171
|
-
}
|
|
4172
|
-
if ($3834487504f4fc00$var$globalWarmedUp) {
|
|
4173
|
-
if ($3834487504f4fc00$var$globalCooldownTimeout) clearTimeout($3834487504f4fc00$var$globalCooldownTimeout);
|
|
4174
|
-
$3834487504f4fc00$var$globalCooldownTimeout = setTimeout(() => {
|
|
4175
|
-
delete $3834487504f4fc00$var$tooltips[id];
|
|
4176
|
-
$3834487504f4fc00$var$globalCooldownTimeout = null;
|
|
4177
|
-
$3834487504f4fc00$var$globalWarmedUp = false;
|
|
4178
|
-
}, Math.max($3834487504f4fc00$var$TOOLTIP_COOLDOWN, closeDelay));
|
|
4179
|
-
}
|
|
4180
|
-
};
|
|
4181
|
-
let warmupTooltip = () => {
|
|
4182
|
-
closeOpenTooltips();
|
|
4183
|
-
ensureTooltipEntry();
|
|
4184
|
-
if (!isOpen && !$3834487504f4fc00$var$globalWarmedUp) {
|
|
4185
|
-
if ($3834487504f4fc00$var$globalWarmUpTimeout) clearTimeout($3834487504f4fc00$var$globalWarmUpTimeout);
|
|
4186
|
-
$3834487504f4fc00$var$globalWarmUpTimeout = setTimeout(() => {
|
|
4187
|
-
$3834487504f4fc00$var$globalWarmUpTimeout = null;
|
|
4188
|
-
$3834487504f4fc00$var$globalWarmedUp = true;
|
|
4189
|
-
showTooltip();
|
|
4190
|
-
}, delay);
|
|
4191
|
-
} else if (!isOpen) showTooltip();
|
|
4192
|
-
};
|
|
4193
|
-
useEffect(() => {
|
|
4194
|
-
closeCallback.current = close;
|
|
4195
|
-
}, [
|
|
4196
|
-
close
|
|
4197
|
-
]);
|
|
4198
|
-
useEffect(() => {
|
|
4199
|
-
return () => {
|
|
4200
|
-
if (closeTimeout.current) clearTimeout(closeTimeout.current);
|
|
4201
|
-
let tooltip2 = $3834487504f4fc00$var$tooltips[id];
|
|
4202
|
-
if (tooltip2) delete $3834487504f4fc00$var$tooltips[id];
|
|
4203
|
-
};
|
|
4204
|
-
}, [
|
|
4205
|
-
id
|
|
4206
|
-
]);
|
|
4207
|
-
return {
|
|
4208
|
-
isOpen,
|
|
4209
|
-
open: (immediate) => {
|
|
4210
|
-
if (!immediate && delay > 0 && !closeTimeout.current) warmupTooltip();
|
|
4211
|
-
else showTooltip();
|
|
4212
|
-
},
|
|
4213
|
-
close: hideTooltip
|
|
4214
|
-
};
|
|
4215
|
-
}
|
|
4216
3353
|
const $dfd62f934fc76fed$export$3b805cea1f178355 = /* @__PURE__ */ createContext(null);
|
|
4217
3354
|
const $dfd62f934fc76fed$export$233dd9682e1ad64b = /* @__PURE__ */ createContext(null);
|
|
4218
3355
|
const $dfd62f934fc76fed$export$9e31dcedda1dadc7 = /* @__PURE__ */ createContext(null);
|
|
@@ -4515,9 +3652,6 @@ const $dfd62f934fc76fed$export$5d847498420df57b = /* @__PURE__ */ forwardRef(fun
|
|
|
4515
3652
|
ref: buttonRef
|
|
4516
3653
|
}));
|
|
4517
3654
|
});
|
|
4518
|
-
const $44f671af83e7d9e0$export$2de4954e8ae13b9f = /* @__PURE__ */ createContext({
|
|
4519
|
-
placement: "bottom"
|
|
4520
|
-
});
|
|
4521
3655
|
const $07b14b47974efb58$export$9b9a0cd73afb7ca4 = /* @__PURE__ */ createContext(null);
|
|
4522
3656
|
const $07b14b47974efb58$var$PopoverGroupContext = /* @__PURE__ */ createContext(null);
|
|
4523
3657
|
const $07b14b47974efb58$export$5b6b19405a83ff9d = /* @__PURE__ */ forwardRef(function Popover(props, ref) {
|
|
@@ -5082,97 +4216,6 @@ const $5cb03073d3f54797$export$a8a3e93435678ff9 = /* @__PURE__ */ forwardRef(fun
|
|
|
5082
4216
|
className: className !== null && className !== void 0 ? className : "react-aria-Heading"
|
|
5083
4217
|
}, children);
|
|
5084
4218
|
});
|
|
5085
|
-
const $4e3b923658d69c60$export$7a7623236eec67fa = /* @__PURE__ */ createContext(null);
|
|
5086
|
-
const $4e3b923658d69c60$export$39ae08fa83328b12 = /* @__PURE__ */ createContext(null);
|
|
5087
|
-
function $4e3b923658d69c60$export$8c610744efcf8a1d(props) {
|
|
5088
|
-
let state = $3834487504f4fc00$export$4d40659c25ecb50b(props);
|
|
5089
|
-
let ref = useRef(null);
|
|
5090
|
-
let { triggerProps, tooltipProps } = $85908aa8a35f0fac$export$a6da6c504e4bba8b(props, state, ref);
|
|
5091
|
-
return /* @__PURE__ */ React__default.createElement($64fa3d84918910a7$export$2881499e37b75b9a, {
|
|
5092
|
-
values: [
|
|
5093
|
-
[
|
|
5094
|
-
$4e3b923658d69c60$export$7a7623236eec67fa,
|
|
5095
|
-
state
|
|
5096
|
-
],
|
|
5097
|
-
[
|
|
5098
|
-
$4e3b923658d69c60$export$39ae08fa83328b12,
|
|
5099
|
-
{
|
|
5100
|
-
...tooltipProps,
|
|
5101
|
-
triggerRef: ref
|
|
5102
|
-
}
|
|
5103
|
-
]
|
|
5104
|
-
]
|
|
5105
|
-
}, /* @__PURE__ */ React__default.createElement($d1116acdf220c2da$export$13f3202a3e5ddd5, {
|
|
5106
|
-
...triggerProps,
|
|
5107
|
-
ref
|
|
5108
|
-
}, props.children));
|
|
5109
|
-
}
|
|
5110
|
-
const $4e3b923658d69c60$export$28c660c63b792dea = /* @__PURE__ */ forwardRef(function Tooltip({ UNSTABLE_portalContainer, ...props }, ref) {
|
|
5111
|
-
[props, ref] = $64fa3d84918910a7$export$29f1550f4b0d4415(props, ref, $4e3b923658d69c60$export$39ae08fa83328b12);
|
|
5112
|
-
let contextState = useContext($4e3b923658d69c60$export$7a7623236eec67fa);
|
|
5113
|
-
let localState = $3834487504f4fc00$export$4d40659c25ecb50b(props);
|
|
5114
|
-
let state = props.isOpen != null || props.defaultOpen != null || !contextState ? localState : contextState;
|
|
5115
|
-
let isExiting = $d3f049242431219c$export$45fda7c47f93fd48(ref, state.isOpen) || props.isExiting || false;
|
|
5116
|
-
if (!state.isOpen && !isExiting) return null;
|
|
5117
|
-
return /* @__PURE__ */ React__default.createElement($c07df45195231803$export$b47c3594eab58386, {
|
|
5118
|
-
portalContainer: UNSTABLE_portalContainer
|
|
5119
|
-
}, /* @__PURE__ */ React__default.createElement($4e3b923658d69c60$var$TooltipInner, {
|
|
5120
|
-
...props,
|
|
5121
|
-
tooltipRef: ref,
|
|
5122
|
-
isExiting
|
|
5123
|
-
}));
|
|
5124
|
-
});
|
|
5125
|
-
function $4e3b923658d69c60$var$TooltipInner(props) {
|
|
5126
|
-
let state = useContext($4e3b923658d69c60$export$7a7623236eec67fa);
|
|
5127
|
-
let arrowRef = useRef(null);
|
|
5128
|
-
let { overlayProps, arrowProps, placement, triggerAnchorPoint } = $b3526bc71400be8d$export$d39e1813b3bdd0e1({
|
|
5129
|
-
placement: props.placement || "top",
|
|
5130
|
-
targetRef: props.triggerRef,
|
|
5131
|
-
overlayRef: props.tooltipRef,
|
|
5132
|
-
arrowRef,
|
|
5133
|
-
offset: props.offset,
|
|
5134
|
-
crossOffset: props.crossOffset,
|
|
5135
|
-
isOpen: state.isOpen,
|
|
5136
|
-
arrowBoundaryOffset: props.arrowBoundaryOffset,
|
|
5137
|
-
shouldFlip: props.shouldFlip,
|
|
5138
|
-
containerPadding: props.containerPadding,
|
|
5139
|
-
onClose: () => state.close(true)
|
|
5140
|
-
});
|
|
5141
|
-
let isEntering = $d3f049242431219c$export$6d3443f2c48bfc20(props.tooltipRef, !!placement) || props.isEntering || false;
|
|
5142
|
-
let renderProps = $64fa3d84918910a7$export$4d86445c2cf5e3({
|
|
5143
|
-
...props,
|
|
5144
|
-
defaultClassName: "react-aria-Tooltip",
|
|
5145
|
-
values: {
|
|
5146
|
-
placement,
|
|
5147
|
-
isEntering,
|
|
5148
|
-
isExiting: props.isExiting,
|
|
5149
|
-
state
|
|
5150
|
-
}
|
|
5151
|
-
});
|
|
5152
|
-
props = $bbaa08b3cd72f041$export$9d1611c77c2fe928(props, overlayProps);
|
|
5153
|
-
let { tooltipProps } = $8c383cffc84c9982$export$1c4b08e0eca38426(props, state);
|
|
5154
|
-
let DOMProps = $65484d02dcb7eb3e$export$457c3d6518dd4c6f(props, {
|
|
5155
|
-
global: true
|
|
5156
|
-
});
|
|
5157
|
-
return /* @__PURE__ */ React__default.createElement("div", {
|
|
5158
|
-
...$bbaa08b3cd72f041$export$9d1611c77c2fe928(DOMProps, renderProps, tooltipProps),
|
|
5159
|
-
ref: props.tooltipRef,
|
|
5160
|
-
style: {
|
|
5161
|
-
...overlayProps.style,
|
|
5162
|
-
"--trigger-anchor-point": triggerAnchorPoint ? `${triggerAnchorPoint.x}px ${triggerAnchorPoint.y}px` : void 0,
|
|
5163
|
-
...renderProps.style
|
|
5164
|
-
},
|
|
5165
|
-
"data-placement": placement !== null && placement !== void 0 ? placement : void 0,
|
|
5166
|
-
"data-entering": isEntering || void 0,
|
|
5167
|
-
"data-exiting": props.isExiting || void 0
|
|
5168
|
-
}, /* @__PURE__ */ React__default.createElement($44f671af83e7d9e0$export$2de4954e8ae13b9f.Provider, {
|
|
5169
|
-
value: {
|
|
5170
|
-
...arrowProps,
|
|
5171
|
-
placement,
|
|
5172
|
-
ref: arrowRef
|
|
5173
|
-
}
|
|
5174
|
-
}, renderProps.children));
|
|
5175
|
-
}
|
|
5176
4219
|
const ChevronLeft = ({ size, ...props }) => /* @__PURE__ */ React.createElement("svg", { viewBox: "0 0 24 24", fill: "currentColor", width: size || "24", height: size || "24", ...props }, /* @__PURE__ */ React.createElement("path", { d: "M14.8597212,8.14512634 C15.0549834,8.34038849 15.0549834,8.65697098 14.8597212,8.85223312 L11.2137854,12.5 L14.8597212,16.1465919 C15.0549834,16.3418541 15.0549834,16.6584366 14.8597212,16.8536987 C14.6644591,17.0489609 14.3478766,17.0489609 14.1526144,16.8536987 L9.79957183,12.5 L14.1526144,8.14512634 C14.3478766,7.9498642 14.6644591,7.9498642 14.8597212,8.14512634 Z" }));
|
|
5177
4220
|
ChevronLeft.displayName = "ChevronLeft";
|
|
5178
4221
|
var ChevronLeft_default = ChevronLeft;
|