@anoki/fse-ui 1.10.1-RC2 → 1.10.1-RC2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/EditorialWidget/EditorialWidget.css +1 -1
- package/dist/components/ui/Section/Description/description.css +1 -1
- package/dist/index.cjs149.js +1 -1
- package/dist/index.cjs149.js.map +1 -1
- package/dist/index.cjs179.js +1 -1
- package/dist/index.cjs179.js.map +1 -1
- package/dist/index.cjs207.js +1 -1
- package/dist/index.cjs207.js.map +1 -1
- package/dist/index.cjs229.js +1 -1
- package/dist/index.cjs236.js +1 -1
- package/dist/index.cjs275.js +1 -1
- package/dist/index.cjs288.js +1 -1
- package/dist/index.cjs29.js +1 -1
- package/dist/index.cjs29.js.map +1 -1
- package/dist/index.cjs299.js +1 -1
- package/dist/index.cjs306.js +1 -1
- package/dist/index.cjs313.js +1 -1
- package/dist/index.cjs314.js +1 -1
- package/dist/index.cjs318.js +1 -1
- package/dist/index.cjs327.js +1 -1
- package/dist/index.cjs329.js +1 -1
- package/dist/index.cjs337.js +1 -1
- package/dist/index.cjs378.js +1 -1
- package/dist/index.cjs384.js +1 -1
- package/dist/index.cjs419.js +1 -1
- package/dist/index.cjs437.js +1 -1
- package/dist/index.cjs438.js +1 -1
- package/dist/index.cjs439.js +27 -1
- package/dist/index.cjs439.js.map +1 -1
- package/dist/index.cjs440.js +1 -2
- package/dist/index.cjs440.js.map +1 -1
- package/dist/index.cjs441.js +1 -27
- package/dist/index.cjs441.js.map +1 -1
- package/dist/index.cjs442.js +1 -1
- package/dist/index.cjs443.js +1 -1
- package/dist/index.cjs444.js +1 -1
- package/dist/index.cjs444.js.map +1 -1
- package/dist/index.cjs445.js +2 -1
- package/dist/index.cjs445.js.map +1 -1
- package/dist/index.cjs453.js +1 -1
- package/dist/index.cjs453.js.map +1 -1
- package/dist/index.cjs454.js +1 -1
- package/dist/index.cjs454.js.map +1 -1
- package/dist/index.cjs455.js +1 -1
- package/dist/index.cjs455.js.map +1 -1
- package/dist/index.cjs457.js +1 -1
- package/dist/index.cjs457.js.map +1 -1
- package/dist/index.cjs458.js +1 -1
- package/dist/index.cjs458.js.map +1 -1
- package/dist/index.cjs459.js +1 -1
- package/dist/index.cjs459.js.map +1 -1
- package/dist/index.cjs460.js +1 -1
- package/dist/index.cjs460.js.map +1 -1
- package/dist/index.cjs461.js +1 -1
- package/dist/index.cjs461.js.map +1 -1
- package/dist/index.cjs462.js +1 -1
- package/dist/index.cjs462.js.map +1 -1
- package/dist/index.cjs464.js +1 -1
- package/dist/index.cjs465.js +1 -1
- package/dist/index.cjs465.js.map +1 -1
- package/dist/index.cjs466.js +1 -1
- package/dist/index.cjs466.js.map +1 -1
- package/dist/index.cjs467.js +1 -1
- package/dist/index.cjs467.js.map +1 -1
- package/dist/index.cjs468.js +1 -1
- package/dist/index.cjs468.js.map +1 -1
- package/dist/index.cjs469.js +1 -1
- package/dist/index.cjs469.js.map +1 -1
- package/dist/index.cjs470.js +1 -1
- package/dist/index.cjs470.js.map +1 -1
- package/dist/index.cjs471.js +1 -1
- package/dist/index.cjs471.js.map +1 -1
- package/dist/index.cjs472.js +1 -1
- package/dist/index.cjs472.js.map +1 -1
- package/dist/index.cjs473.js +1 -1
- package/dist/index.cjs473.js.map +1 -1
- package/dist/index.cjs474.js +1 -1
- package/dist/index.cjs474.js.map +1 -1
- package/dist/index.cjs475.js +1 -1
- package/dist/index.cjs475.js.map +1 -1
- package/dist/index.cjs476.js +2 -0
- package/dist/index.cjs476.js.map +1 -0
- package/dist/{index.cjs479.js → index.cjs483.js} +2 -2
- package/dist/{index.cjs479.js.map → index.cjs483.js.map} +1 -1
- package/dist/{index.cjs480.js → index.cjs484.js} +2 -2
- package/dist/{index.cjs480.js.map → index.cjs484.js.map} +1 -1
- package/dist/{index.cjs481.js → index.cjs485.js} +2 -2
- package/dist/{index.cjs481.js.map → index.cjs485.js.map} +1 -1
- package/dist/{index.cjs482.js → index.cjs486.js} +2 -2
- package/dist/{index.cjs482.js.map → index.cjs486.js.map} +1 -1
- package/dist/{index.cjs488.js → index.cjs493.js} +1 -1
- package/dist/{index.cjs488.js.map → index.cjs493.js.map} +1 -1
- package/dist/index.cjs494.js +1 -1
- package/dist/index.cjs494.js.map +1 -1
- package/dist/index.cjs495.js +1 -1
- package/dist/index.cjs495.js.map +1 -1
- package/dist/index.cjs502.js +1 -1
- package/dist/index.cjs502.js.map +1 -1
- package/dist/index.cjs503.js +1 -1
- package/dist/index.cjs503.js.map +1 -1
- package/dist/index.cjs504.js +1 -1
- package/dist/index.cjs504.js.map +1 -1
- package/dist/{index.cjs498.js → index.cjs505.js} +2 -2
- package/dist/{index.cjs498.js.map → index.cjs505.js.map} +1 -1
- package/dist/{index.cjs499.js → index.cjs506.js} +2 -2
- package/dist/{index.cjs499.js.map → index.cjs506.js.map} +1 -1
- package/dist/index.cjs507.js +2 -0
- package/dist/index.cjs507.js.map +1 -0
- package/dist/index.cjs508.js +2 -0
- package/dist/index.cjs508.js.map +1 -0
- package/dist/index.cjs509.js +1 -1
- package/dist/index.cjs509.js.map +1 -1
- package/dist/index.cjs510.js +1 -1
- package/dist/index.cjs514.js +2 -0
- package/dist/index.cjs514.js.map +1 -0
- package/dist/index.cjs521.js +1 -1
- package/dist/index.cjs522.js +1 -1
- package/dist/index.cjs525.js +1 -1
- package/dist/index.cjs530.js +1 -1
- package/dist/index.cjs531.js +1 -1
- package/dist/index.cjs532.js +1 -1
- package/dist/index.cjs539.js +1 -1
- package/dist/index.cjs544.js +1 -1
- package/dist/index.cjs546.js +1 -1
- package/dist/index.cjs550.js +1 -1
- package/dist/index.cjs550.js.map +1 -1
- package/dist/index.cjs551.js +1 -1
- package/dist/index.cjs551.js.map +1 -1
- package/dist/index.cjs552.js +1 -1
- package/dist/index.cjs552.js.map +1 -1
- package/dist/index.cjs553.js +1 -1
- package/dist/index.cjs553.js.map +1 -1
- package/dist/index.cjs554.js +1 -1
- package/dist/index.cjs554.js.map +1 -1
- package/dist/index.cjs560.js +1 -1
- package/dist/index.cjs560.js.map +1 -1
- package/dist/index.cjs561.js +1 -1
- package/dist/index.cjs561.js.map +1 -1
- package/dist/index.cjs562.js +1 -1
- package/dist/index.cjs562.js.map +1 -1
- package/dist/{index.cjs568.js → index.cjs564.js} +2 -2
- package/dist/{index.cjs568.js.map → index.cjs564.js.map} +1 -1
- package/dist/{index.cjs569.js → index.cjs565.js} +1 -1
- package/dist/index.cjs565.js.map +1 -0
- package/dist/index.cjs655.js +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.es149.js +38 -38
- package/dist/index.es149.js.map +1 -1
- package/dist/index.es179.js +6 -6
- package/dist/index.es179.js.map +1 -1
- package/dist/index.es207.js +6 -6
- package/dist/index.es207.js.map +1 -1
- package/dist/index.es229.js +1 -1
- package/dist/index.es236.js +2 -2
- package/dist/index.es275.js +6 -6
- package/dist/index.es288.js +7 -7
- package/dist/index.es29.js +12 -11
- package/dist/index.es29.js.map +1 -1
- package/dist/index.es299.js +1 -1
- package/dist/index.es306.js +12 -12
- package/dist/index.es313.js +1 -1
- package/dist/index.es314.js +1 -1
- package/dist/index.es318.js +1 -1
- package/dist/index.es327.js +1 -1
- package/dist/index.es329.js +1 -1
- package/dist/index.es337.js +6 -6
- package/dist/index.es378.js +3 -3
- package/dist/index.es384.js +1 -1
- package/dist/index.es419.js +1 -1
- package/dist/index.es437.js +1 -1
- package/dist/index.es438.js +1 -1
- package/dist/index.es439.js +3674 -5
- package/dist/index.es439.js.map +1 -1
- package/dist/index.es440.js +5 -528
- package/dist/index.es440.js.map +1 -1
- package/dist/index.es441.js +2 -3675
- package/dist/index.es441.js.map +1 -1
- package/dist/index.es442.js +2 -6
- package/dist/index.es442.js.map +1 -1
- package/dist/index.es443.js +2 -2
- package/dist/index.es444.js +6 -2
- package/dist/index.es444.js.map +1 -1
- package/dist/index.es445.js +529 -2
- package/dist/index.es445.js.map +1 -1
- package/dist/index.es453.js +25 -5
- package/dist/index.es453.js.map +1 -1
- package/dist/index.es454.js +64 -23
- package/dist/index.es454.js.map +1 -1
- package/dist/index.es455.js +5 -66
- package/dist/index.es455.js.map +1 -1
- package/dist/index.es457.js +5 -33
- package/dist/index.es457.js.map +1 -1
- package/dist/index.es458.js +24 -621
- package/dist/index.es458.js.map +1 -1
- package/dist/index.es459.js +68 -10
- package/dist/index.es459.js.map +1 -1
- package/dist/index.es460.js +33 -5
- package/dist/index.es460.js.map +1 -1
- package/dist/index.es461.js +621 -24
- package/dist/index.es461.js.map +1 -1
- package/dist/index.es462.js +10 -68
- package/dist/index.es462.js.map +1 -1
- package/dist/index.es464.js +1 -1
- package/dist/index.es465.js +13 -44
- package/dist/index.es465.js.map +1 -1
- package/dist/index.es466.js +45 -13
- package/dist/index.es466.js.map +1 -1
- package/dist/index.es467.js +13 -124
- package/dist/index.es467.js.map +1 -1
- package/dist/index.es468.js +122 -12
- package/dist/index.es468.js.map +1 -1
- package/dist/index.es469.js +14 -134
- package/dist/index.es469.js.map +1 -1
- package/dist/index.es470.js +127 -211
- package/dist/index.es470.js.map +1 -1
- package/dist/index.es471.js +218 -13
- package/dist/index.es471.js.map +1 -1
- package/dist/index.es472.js +14 -181
- package/dist/index.es472.js.map +1 -1
- package/dist/index.es473.js +180 -10
- package/dist/index.es473.js.map +1 -1
- package/dist/index.es474.js +11 -50
- package/dist/index.es474.js.map +1 -1
- package/dist/index.es475.js +50 -9
- package/dist/index.es475.js.map +1 -1
- package/dist/index.es476.js +12 -0
- package/dist/index.es476.js.map +1 -0
- package/dist/{index.es479.js → index.es483.js} +2 -2
- package/dist/{index.es479.js.map → index.es483.js.map} +1 -1
- package/dist/{index.es480.js → index.es484.js} +3 -3
- package/dist/{index.es480.js.map → index.es484.js.map} +1 -1
- package/dist/{index.es481.js → index.es485.js} +2 -2
- package/dist/{index.es481.js.map → index.es485.js.map} +1 -1
- package/dist/{index.es482.js → index.es486.js} +4 -4
- package/dist/{index.es482.js.map → index.es486.js.map} +1 -1
- package/dist/{index.es488.js → index.es493.js} +1 -1
- package/dist/{index.es488.js.map → index.es493.js.map} +1 -1
- package/dist/index.es494.js +29 -15
- package/dist/index.es494.js.map +1 -1
- package/dist/index.es495.js +5 -5
- package/dist/index.es495.js.map +1 -1
- package/dist/index.es502.js +5 -525
- package/dist/index.es502.js.map +1 -1
- package/dist/index.es503.js +3 -128
- package/dist/index.es503.js.map +1 -1
- package/dist/index.es504.js +22 -132
- package/dist/index.es504.js.map +1 -1
- package/dist/{index.es498.js → index.es505.js} +2 -2
- package/dist/{index.es498.js.map → index.es505.js.map} +1 -1
- package/dist/{index.es499.js → index.es506.js} +2 -2
- package/dist/{index.es499.js.map → index.es506.js.map} +1 -1
- package/dist/index.es507.js +528 -0
- package/dist/index.es507.js.map +1 -0
- package/dist/index.es508.js +131 -0
- package/dist/index.es508.js.map +1 -0
- package/dist/index.es509.js +130 -61
- package/dist/index.es509.js.map +1 -1
- package/dist/index.es510.js +1 -1
- package/dist/index.es514.js +68 -0
- package/dist/index.es514.js.map +1 -0
- package/dist/index.es521.js +1 -1
- package/dist/index.es522.js +2 -2
- package/dist/index.es525.js +3 -3
- package/dist/index.es530.js +2 -2
- package/dist/index.es531.js +1 -1
- package/dist/index.es532.js +13 -13
- package/dist/index.es539.js +8 -8
- package/dist/index.es544.js +7 -7
- package/dist/index.es546.js +1 -1
- package/dist/index.es550.js +6 -2
- package/dist/index.es550.js.map +1 -1
- package/dist/index.es551.js +16 -2
- package/dist/index.es551.js.map +1 -1
- package/dist/index.es552.js +2 -2
- package/dist/index.es552.js.map +1 -1
- package/dist/index.es553.js +2 -6
- package/dist/index.es553.js.map +1 -1
- package/dist/index.es554.js +2 -16
- package/dist/index.es554.js.map +1 -1
- package/dist/index.es560.js +4 -3
- package/dist/index.es560.js.map +1 -1
- package/dist/index.es561.js +3 -2
- package/dist/index.es561.js.map +1 -1
- package/dist/index.es562.js +2 -4
- package/dist/index.es562.js.map +1 -1
- package/dist/{index.es568.js → index.es564.js} +3 -3
- package/dist/{index.es568.js.map → index.es564.js.map} +1 -1
- package/dist/{index.es569.js → index.es565.js} +1 -1
- package/dist/index.es565.js.map +1 -0
- package/dist/index.es655.js +1 -1
- package/dist/sections/Slider/Slider.css +1 -1
- package/package.json +1 -1
- package/dist/index.cjs489.js +0 -2
- package/dist/index.cjs489.js.map +0 -1
- package/dist/index.cjs490.js +0 -2
- package/dist/index.cjs490.js.map +0 -1
- package/dist/index.cjs496.js +0 -2
- package/dist/index.cjs496.js.map +0 -1
- package/dist/index.cjs497.js +0 -2
- package/dist/index.cjs497.js.map +0 -1
- package/dist/index.cjs569.js.map +0 -1
- package/dist/index.es489.js +0 -32
- package/dist/index.es489.js.map +0 -1
- package/dist/index.es490.js +0 -8
- package/dist/index.es490.js.map +0 -1
- package/dist/index.es496.js +0 -6
- package/dist/index.es496.js.map +0 -1
- package/dist/index.es497.js +0 -27
- package/dist/index.es497.js.map +0 -1
- package/dist/index.es569.js.map +0 -1
- /package/dist/components/ui/{DoctorConfirmModal/DoctorConfirmModalContent/DoctorConfirmModalContent.css → ConsentModal/ConsentModalContent/ConsentModalContent.css} +0 -0
- /package/dist/components/ui/{DoctorConfirmModal/DoctorConfirmModalFooter/DoctorConfirmModalFooter.css → ConsentModal/ConsentModalFooter/ConsentModalFooter.css} +0 -0
package/dist/index.es473.js
CHANGED
@@ -1,14 +1,184 @@
|
|
1
|
-
import * as
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
1
|
+
import * as s from "react";
|
2
|
+
import { composeEventHandlers as p } from "./index.es455.js";
|
3
|
+
import { createCollection as H } from "./index.es466.js";
|
4
|
+
import { useComposedRefs as V } from "./index.es453.js";
|
5
|
+
import { createContextScope as z } from "./index.es454.js";
|
6
|
+
import { useId as q } from "./index.es462.js";
|
7
|
+
import { Primitive as G } from "./index.es460.js";
|
8
|
+
import { useCallbackRef as J } from "./index.es474.js";
|
9
|
+
import { useControllableState as Q } from "./index.es456.js";
|
10
|
+
import { useDirection as W } from "./index.es467.js";
|
11
|
+
import { j as d } from "./index.es225.js";
|
12
|
+
var _ = "rovingFocusGroup.onEntryFocus", X = { bubbles: !1, cancelable: !0 }, I = "RovingFocusGroup", [y, N, Z] = H(I), [$, Fe] = z(
|
13
|
+
I,
|
14
|
+
[Z]
|
15
|
+
), [ee, oe] = $(I), O = s.forwardRef(
|
16
|
+
(e, r) => /* @__PURE__ */ d.jsx(y.Provider, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(y.Slot, { scope: e.__scopeRovingFocusGroup, children: /* @__PURE__ */ d.jsx(te, { ...e, ref: r }) }) })
|
17
|
+
);
|
18
|
+
O.displayName = I;
|
19
|
+
var te = s.forwardRef((e, r) => {
|
20
|
+
const {
|
21
|
+
__scopeRovingFocusGroup: c,
|
22
|
+
orientation: o,
|
23
|
+
loop: T = !1,
|
24
|
+
dir: w,
|
25
|
+
currentTabStopId: v,
|
26
|
+
defaultCurrentTabStopId: C,
|
27
|
+
onCurrentTabStopIdChange: S,
|
28
|
+
onEntryFocus: m,
|
29
|
+
preventScrollOnEntryFocus: u = !1,
|
30
|
+
...b
|
31
|
+
} = e, F = s.useRef(null), g = V(r, F), R = W(w), [E, t] = Q({
|
32
|
+
prop: v,
|
33
|
+
defaultProp: C ?? null,
|
34
|
+
onChange: S,
|
35
|
+
caller: I
|
36
|
+
}), [i, h] = s.useState(!1), a = J(m), l = N(c), x = s.useRef(!1), [k, D] = s.useState(0);
|
37
|
+
return s.useEffect(() => {
|
38
|
+
const n = F.current;
|
39
|
+
if (n)
|
40
|
+
return n.addEventListener(_, a), () => n.removeEventListener(_, a);
|
41
|
+
}, [a]), /* @__PURE__ */ d.jsx(
|
42
|
+
ee,
|
43
|
+
{
|
44
|
+
scope: c,
|
45
|
+
orientation: o,
|
46
|
+
dir: R,
|
47
|
+
loop: T,
|
48
|
+
currentTabStopId: E,
|
49
|
+
onItemFocus: s.useCallback(
|
50
|
+
(n) => t(n),
|
51
|
+
[t]
|
52
|
+
),
|
53
|
+
onItemShiftTab: s.useCallback(() => h(!0), []),
|
54
|
+
onFocusableItemAdd: s.useCallback(
|
55
|
+
() => D((n) => n + 1),
|
56
|
+
[]
|
57
|
+
),
|
58
|
+
onFocusableItemRemove: s.useCallback(
|
59
|
+
() => D((n) => n - 1),
|
60
|
+
[]
|
61
|
+
),
|
62
|
+
children: /* @__PURE__ */ d.jsx(
|
63
|
+
G.div,
|
64
|
+
{
|
65
|
+
tabIndex: i || k === 0 ? -1 : 0,
|
66
|
+
"data-orientation": o,
|
67
|
+
...b,
|
68
|
+
ref: g,
|
69
|
+
style: { outline: "none", ...e.style },
|
70
|
+
onMouseDown: p(e.onMouseDown, () => {
|
71
|
+
x.current = !0;
|
72
|
+
}),
|
73
|
+
onFocus: p(e.onFocus, (n) => {
|
74
|
+
const L = !x.current;
|
75
|
+
if (n.target === n.currentTarget && L && !i) {
|
76
|
+
const P = new CustomEvent(_, X);
|
77
|
+
if (n.currentTarget.dispatchEvent(P), !P.defaultPrevented) {
|
78
|
+
const A = l().filter((f) => f.focusable), U = A.find((f) => f.active), B = A.find((f) => f.id === E), Y = [U, B, ...A].filter(
|
79
|
+
Boolean
|
80
|
+
).map((f) => f.ref.current);
|
81
|
+
M(Y, u);
|
82
|
+
}
|
83
|
+
}
|
84
|
+
x.current = !1;
|
85
|
+
}),
|
86
|
+
onBlur: p(e.onBlur, () => h(!1))
|
87
|
+
}
|
88
|
+
)
|
89
|
+
}
|
90
|
+
);
|
91
|
+
}), K = "RovingFocusGroupItem", j = s.forwardRef(
|
92
|
+
(e, r) => {
|
93
|
+
const {
|
94
|
+
__scopeRovingFocusGroup: c,
|
95
|
+
focusable: o = !0,
|
96
|
+
active: T = !1,
|
97
|
+
tabStopId: w,
|
98
|
+
children: v,
|
99
|
+
...C
|
100
|
+
} = e, S = q(), m = w || S, u = oe(K, c), b = u.currentTabStopId === m, F = N(c), { onFocusableItemAdd: g, onFocusableItemRemove: R, currentTabStopId: E } = u;
|
101
|
+
return s.useEffect(() => {
|
102
|
+
if (o)
|
103
|
+
return g(), () => R();
|
104
|
+
}, [o, g, R]), /* @__PURE__ */ d.jsx(
|
105
|
+
y.ItemSlot,
|
106
|
+
{
|
107
|
+
scope: c,
|
108
|
+
id: m,
|
109
|
+
focusable: o,
|
110
|
+
active: T,
|
111
|
+
children: /* @__PURE__ */ d.jsx(
|
112
|
+
G.span,
|
113
|
+
{
|
114
|
+
tabIndex: b ? 0 : -1,
|
115
|
+
"data-orientation": u.orientation,
|
116
|
+
...C,
|
117
|
+
ref: r,
|
118
|
+
onMouseDown: p(e.onMouseDown, (t) => {
|
119
|
+
o ? u.onItemFocus(m) : t.preventDefault();
|
120
|
+
}),
|
121
|
+
onFocus: p(e.onFocus, () => u.onItemFocus(m)),
|
122
|
+
onKeyDown: p(e.onKeyDown, (t) => {
|
123
|
+
if (t.key === "Tab" && t.shiftKey) {
|
124
|
+
u.onItemShiftTab();
|
125
|
+
return;
|
126
|
+
}
|
127
|
+
if (t.target !== t.currentTarget) return;
|
128
|
+
const i = se(t, u.orientation, u.dir);
|
129
|
+
if (i !== void 0) {
|
130
|
+
if (t.metaKey || t.ctrlKey || t.altKey || t.shiftKey) return;
|
131
|
+
t.preventDefault();
|
132
|
+
let a = F().filter((l) => l.focusable).map((l) => l.ref.current);
|
133
|
+
if (i === "last") a.reverse();
|
134
|
+
else if (i === "prev" || i === "next") {
|
135
|
+
i === "prev" && a.reverse();
|
136
|
+
const l = a.indexOf(t.currentTarget);
|
137
|
+
a = u.loop ? ce(a, l + 1) : a.slice(l + 1);
|
138
|
+
}
|
139
|
+
setTimeout(() => M(a));
|
140
|
+
}
|
141
|
+
}),
|
142
|
+
children: typeof v == "function" ? v({ isCurrentTabStop: b, hasTabStop: E != null }) : v
|
143
|
+
}
|
144
|
+
)
|
145
|
+
}
|
146
|
+
);
|
147
|
+
}
|
148
|
+
);
|
149
|
+
j.displayName = K;
|
150
|
+
var re = {
|
151
|
+
ArrowLeft: "prev",
|
152
|
+
ArrowUp: "prev",
|
153
|
+
ArrowRight: "next",
|
154
|
+
ArrowDown: "next",
|
155
|
+
PageUp: "first",
|
156
|
+
Home: "first",
|
157
|
+
PageDown: "last",
|
158
|
+
End: "last"
|
159
|
+
};
|
160
|
+
function ne(e, r) {
|
161
|
+
return r !== "rtl" ? e : e === "ArrowLeft" ? "ArrowRight" : e === "ArrowRight" ? "ArrowLeft" : e;
|
162
|
+
}
|
163
|
+
function se(e, r, c) {
|
164
|
+
const o = ne(e.key, c);
|
165
|
+
if (!(r === "vertical" && ["ArrowLeft", "ArrowRight"].includes(o)) && !(r === "horizontal" && ["ArrowUp", "ArrowDown"].includes(o)))
|
166
|
+
return re[o];
|
167
|
+
}
|
168
|
+
function M(e, r = !1) {
|
169
|
+
const c = document.activeElement;
|
170
|
+
for (const o of e)
|
171
|
+
if (o === c || (o.focus({ preventScroll: r }), document.activeElement !== c)) return;
|
172
|
+
}
|
173
|
+
function ce(e, r) {
|
174
|
+
return e.map((c, o) => e[(r + o) % e.length]);
|
10
175
|
}
|
176
|
+
var ge = O, Re = j;
|
11
177
|
export {
|
12
|
-
|
178
|
+
Re as Item,
|
179
|
+
ge as Root,
|
180
|
+
O as RovingFocusGroup,
|
181
|
+
j as RovingFocusGroupItem,
|
182
|
+
Fe as createRovingFocusGroupScope
|
13
183
|
};
|
14
184
|
//# sourceMappingURL=index.es473.js.map
|
package/dist/index.es473.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es473.js","sources":["../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args","_a"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EACxB,CAAC,GACME,EAAM,QAAQ,MAAM,IAAIC;;AAAS,YAAAC,IAAAH,EAAY,YAAZ,gBAAAG,EAAA,KAAAH,GAAsB,GAAGE;AAAA,KAAO,EAAE;AAC5E;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es473.js","sources":["../node_modules/@radix-ui/react-roving-focus/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// src/roving-focus-group.tsx\nimport * as React from \"react\";\nimport { composeEventHandlers } from \"@radix-ui/primitive\";\nimport { createCollection } from \"@radix-ui/react-collection\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useId } from \"@radix-ui/react-id\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useControllableState } from \"@radix-ui/react-use-controllable-state\";\nimport { useDirection } from \"@radix-ui/react-direction\";\nimport { jsx } from \"react/jsx-runtime\";\nvar ENTRY_FOCUS = \"rovingFocusGroup.onEntryFocus\";\nvar EVENT_OPTIONS = { bubbles: false, cancelable: true };\nvar GROUP_NAME = \"RovingFocusGroup\";\nvar [Collection, useCollection, createCollectionScope] = createCollection(GROUP_NAME);\nvar [createRovingFocusGroupContext, createRovingFocusGroupScope] = createContextScope(\n GROUP_NAME,\n [createCollectionScope]\n);\nvar [RovingFocusProvider, useRovingFocusContext] = createRovingFocusGroupContext(GROUP_NAME);\nvar RovingFocusGroup = React.forwardRef(\n (props, forwardedRef) => {\n return /* @__PURE__ */ jsx(Collection.Provider, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: props.__scopeRovingFocusGroup, children: /* @__PURE__ */ jsx(RovingFocusGroupImpl, { ...props, ref: forwardedRef }) }) });\n }\n);\nRovingFocusGroup.displayName = GROUP_NAME;\nvar RovingFocusGroupImpl = React.forwardRef((props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n orientation,\n loop = false,\n dir,\n currentTabStopId: currentTabStopIdProp,\n defaultCurrentTabStopId,\n onCurrentTabStopIdChange,\n onEntryFocus,\n preventScrollOnEntryFocus = false,\n ...groupProps\n } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const direction = useDirection(dir);\n const [currentTabStopId, setCurrentTabStopId] = useControllableState({\n prop: currentTabStopIdProp,\n defaultProp: defaultCurrentTabStopId ?? null,\n onChange: onCurrentTabStopIdChange,\n caller: GROUP_NAME\n });\n const [isTabbingBackOut, setIsTabbingBackOut] = React.useState(false);\n const handleEntryFocus = useCallbackRef(onEntryFocus);\n const getItems = useCollection(__scopeRovingFocusGroup);\n const isClickFocusRef = React.useRef(false);\n const [focusableItemsCount, setFocusableItemsCount] = React.useState(0);\n React.useEffect(() => {\n const node = ref.current;\n if (node) {\n node.addEventListener(ENTRY_FOCUS, handleEntryFocus);\n return () => node.removeEventListener(ENTRY_FOCUS, handleEntryFocus);\n }\n }, [handleEntryFocus]);\n return /* @__PURE__ */ jsx(\n RovingFocusProvider,\n {\n scope: __scopeRovingFocusGroup,\n orientation,\n dir: direction,\n loop,\n currentTabStopId,\n onItemFocus: React.useCallback(\n (tabStopId) => setCurrentTabStopId(tabStopId),\n [setCurrentTabStopId]\n ),\n onItemShiftTab: React.useCallback(() => setIsTabbingBackOut(true), []),\n onFocusableItemAdd: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount + 1),\n []\n ),\n onFocusableItemRemove: React.useCallback(\n () => setFocusableItemsCount((prevCount) => prevCount - 1),\n []\n ),\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n tabIndex: isTabbingBackOut || focusableItemsCount === 0 ? -1 : 0,\n \"data-orientation\": orientation,\n ...groupProps,\n ref: composedRefs,\n style: { outline: \"none\", ...props.style },\n onMouseDown: composeEventHandlers(props.onMouseDown, () => {\n isClickFocusRef.current = true;\n }),\n onFocus: composeEventHandlers(props.onFocus, (event) => {\n const isKeyboardFocus = !isClickFocusRef.current;\n if (event.target === event.currentTarget && isKeyboardFocus && !isTabbingBackOut) {\n const entryFocusEvent = new CustomEvent(ENTRY_FOCUS, EVENT_OPTIONS);\n event.currentTarget.dispatchEvent(entryFocusEvent);\n if (!entryFocusEvent.defaultPrevented) {\n const items = getItems().filter((item) => item.focusable);\n const activeItem = items.find((item) => item.active);\n const currentItem = items.find((item) => item.id === currentTabStopId);\n const candidateItems = [activeItem, currentItem, ...items].filter(\n Boolean\n );\n const candidateNodes = candidateItems.map((item) => item.ref.current);\n focusFirst(candidateNodes, preventScrollOnEntryFocus);\n }\n }\n isClickFocusRef.current = false;\n }),\n onBlur: composeEventHandlers(props.onBlur, () => setIsTabbingBackOut(false))\n }\n )\n }\n );\n});\nvar ITEM_NAME = \"RovingFocusGroupItem\";\nvar RovingFocusGroupItem = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopeRovingFocusGroup,\n focusable = true,\n active = false,\n tabStopId,\n children,\n ...itemProps\n } = props;\n const autoId = useId();\n const id = tabStopId || autoId;\n const context = useRovingFocusContext(ITEM_NAME, __scopeRovingFocusGroup);\n const isCurrentTabStop = context.currentTabStopId === id;\n const getItems = useCollection(__scopeRovingFocusGroup);\n const { onFocusableItemAdd, onFocusableItemRemove, currentTabStopId } = context;\n React.useEffect(() => {\n if (focusable) {\n onFocusableItemAdd();\n return () => onFocusableItemRemove();\n }\n }, [focusable, onFocusableItemAdd, onFocusableItemRemove]);\n return /* @__PURE__ */ jsx(\n Collection.ItemSlot,\n {\n scope: __scopeRovingFocusGroup,\n id,\n focusable,\n active,\n children: /* @__PURE__ */ jsx(\n Primitive.span,\n {\n tabIndex: isCurrentTabStop ? 0 : -1,\n \"data-orientation\": context.orientation,\n ...itemProps,\n ref: forwardedRef,\n onMouseDown: composeEventHandlers(props.onMouseDown, (event) => {\n if (!focusable) event.preventDefault();\n else context.onItemFocus(id);\n }),\n onFocus: composeEventHandlers(props.onFocus, () => context.onItemFocus(id)),\n onKeyDown: composeEventHandlers(props.onKeyDown, (event) => {\n if (event.key === \"Tab\" && event.shiftKey) {\n context.onItemShiftTab();\n return;\n }\n if (event.target !== event.currentTarget) return;\n const focusIntent = getFocusIntent(event, context.orientation, context.dir);\n if (focusIntent !== void 0) {\n if (event.metaKey || event.ctrlKey || event.altKey || event.shiftKey) return;\n event.preventDefault();\n const items = getItems().filter((item) => item.focusable);\n let candidateNodes = items.map((item) => item.ref.current);\n if (focusIntent === \"last\") candidateNodes.reverse();\n else if (focusIntent === \"prev\" || focusIntent === \"next\") {\n if (focusIntent === \"prev\") candidateNodes.reverse();\n const currentIndex = candidateNodes.indexOf(event.currentTarget);\n candidateNodes = context.loop ? wrapArray(candidateNodes, currentIndex + 1) : candidateNodes.slice(currentIndex + 1);\n }\n setTimeout(() => focusFirst(candidateNodes));\n }\n }),\n children: typeof children === \"function\" ? children({ isCurrentTabStop, hasTabStop: currentTabStopId != null }) : children\n }\n )\n }\n );\n }\n);\nRovingFocusGroupItem.displayName = ITEM_NAME;\nvar MAP_KEY_TO_FOCUS_INTENT = {\n ArrowLeft: \"prev\",\n ArrowUp: \"prev\",\n ArrowRight: \"next\",\n ArrowDown: \"next\",\n PageUp: \"first\",\n Home: \"first\",\n PageDown: \"last\",\n End: \"last\"\n};\nfunction getDirectionAwareKey(key, dir) {\n if (dir !== \"rtl\") return key;\n return key === \"ArrowLeft\" ? \"ArrowRight\" : key === \"ArrowRight\" ? \"ArrowLeft\" : key;\n}\nfunction getFocusIntent(event, orientation, dir) {\n const key = getDirectionAwareKey(event.key, dir);\n if (orientation === \"vertical\" && [\"ArrowLeft\", \"ArrowRight\"].includes(key)) return void 0;\n if (orientation === \"horizontal\" && [\"ArrowUp\", \"ArrowDown\"].includes(key)) return void 0;\n return MAP_KEY_TO_FOCUS_INTENT[key];\n}\nfunction focusFirst(candidates, preventScroll = false) {\n const PREVIOUSLY_FOCUSED_ELEMENT = document.activeElement;\n for (const candidate of candidates) {\n if (candidate === PREVIOUSLY_FOCUSED_ELEMENT) return;\n candidate.focus({ preventScroll });\n if (document.activeElement !== PREVIOUSLY_FOCUSED_ELEMENT) return;\n }\n}\nfunction wrapArray(array, startIndex) {\n return array.map((_, index) => array[(startIndex + index) % array.length]);\n}\nvar Root = RovingFocusGroup;\nvar Item = RovingFocusGroupItem;\nexport {\n Item,\n Root,\n RovingFocusGroup,\n RovingFocusGroupItem,\n createRovingFocusGroupScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["ENTRY_FOCUS","EVENT_OPTIONS","GROUP_NAME","Collection","useCollection","createCollectionScope","createCollection","createRovingFocusGroupContext","createRovingFocusGroupScope","createContextScope","RovingFocusProvider","useRovingFocusContext","RovingFocusGroup","React","props","forwardedRef","jsx","RovingFocusGroupImpl","__scopeRovingFocusGroup","orientation","loop","dir","currentTabStopIdProp","defaultCurrentTabStopId","onCurrentTabStopIdChange","onEntryFocus","preventScrollOnEntryFocus","groupProps","ref","composedRefs","useComposedRefs","direction","useDirection","currentTabStopId","setCurrentTabStopId","useControllableState","isTabbingBackOut","setIsTabbingBackOut","handleEntryFocus","useCallbackRef","getItems","isClickFocusRef","focusableItemsCount","setFocusableItemsCount","node","tabStopId","prevCount","Primitive","composeEventHandlers","event","isKeyboardFocus","entryFocusEvent","items","item","activeItem","currentItem","candidateNodes","focusFirst","ITEM_NAME","RovingFocusGroupItem","focusable","active","children","itemProps","autoId","useId","id","context","isCurrentTabStop","onFocusableItemAdd","onFocusableItemRemove","focusIntent","getFocusIntent","currentIndex","wrapArray","MAP_KEY_TO_FOCUS_INTENT","getDirectionAwareKey","key","candidates","preventScroll","PREVIOUSLY_FOCUSED_ELEMENT","candidate","array","startIndex","_","index","Root","Item"],"mappings":";;;;;;;;;;;AAcA,IA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AO5B;","x_google_ignoreList":[0]}
|
package/dist/index.es474.js
CHANGED
@@ -1,53 +1,14 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
},
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
return e;
|
12
|
-
var n = W(e);
|
13
|
-
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
14
|
-
}).filter(function(e) {
|
15
|
-
return !!e;
|
16
|
-
});
|
17
|
-
}, E = function(r, u, e, n) {
|
18
|
-
var i = D(u, Array.isArray(r) ? r : [r]);
|
19
|
-
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
20
|
-
var s = p[e], l = [], o = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
21
|
-
!t || o.has(t) || (o.add(t), y(t.parentNode));
|
22
|
-
};
|
23
|
-
i.forEach(y);
|
24
|
-
var A = function(t) {
|
25
|
-
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
26
|
-
if (o.has(a))
|
27
|
-
A(a);
|
28
|
-
else
|
29
|
-
try {
|
30
|
-
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (s.get(a) || 0) + 1;
|
31
|
-
f.set(a, d), s.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
32
|
-
} catch (k) {
|
33
|
-
console.error("aria-hidden: cannot operate on ", a, k);
|
34
|
-
}
|
35
|
-
});
|
36
|
-
};
|
37
|
-
return A(u), o.clear(), h++, function() {
|
38
|
-
l.forEach(function(t) {
|
39
|
-
var a = f.get(t) - 1, c = s.get(t) - 1;
|
40
|
-
f.set(t, a), s.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
41
|
-
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
42
|
-
};
|
43
|
-
}, C = function(r, u, e) {
|
44
|
-
e === void 0 && (e = "data-aria-hidden");
|
45
|
-
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
46
|
-
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live], script"))), E(n, i, e, "aria-hidden")) : function() {
|
47
|
-
return null;
|
48
|
-
};
|
49
|
-
};
|
1
|
+
import * as r from "react";
|
2
|
+
function o(t) {
|
3
|
+
const e = r.useRef(t);
|
4
|
+
return r.useEffect(() => {
|
5
|
+
e.current = t;
|
6
|
+
}), r.useMemo(() => (...n) => {
|
7
|
+
var u;
|
8
|
+
return (u = e.current) == null ? void 0 : u.call(e, ...n);
|
9
|
+
}, []);
|
10
|
+
}
|
50
11
|
export {
|
51
|
-
|
12
|
+
o as useCallbackRef
|
52
13
|
};
|
53
14
|
//# sourceMappingURL=index.es474.js.map
|
package/dist/index.es474.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es474.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n // and script elements, as they have no impact on accessibility.\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAIA;AACvE,SAAOC,EAAa,cAAc;AACtC,GACIC,IAAa,oBAAI,QAAO,GACxBC,IAAoB,oBAAI,QAAO,GAC/BC,IAAY,CAAA,GACZC,IAAY,GACZC,IAAa,SAAUC,GAAM;AAC7B,SAAOA,MAASA,EAAK,QAAQD,EAAWC,EAAK,UAAU;AAC3D,GACIC,IAAiB,SAAUC,GAAQC,GAAS;AAC5C,SAAOA,EACF,IAAI,SAAUC,GAAQ;AACvB,QAAIF,EAAO,SAASE,CAAM;AACtB,aAAOA;AAEX,QAAIC,IAAkBN,EAAWK,CAAM;AACvC,WAAIC,KAAmBH,EAAO,SAASG,CAAe,IAC3CA,KAEX,QAAQ,MAAM,eAAeD,GAAQ,2BAA2BF,GAAQ,iBAAiB,GAClF;AAAA,EACX,CAAC,EACI,OAAO,SAAUI,GAAG;AAAE,WAAO,EAAQA;AAAA,EAAI,CAAC;AACnD,GASIC,IAAyB,SAAUd,GAAgBe,GAAYC,GAAYC,GAAkB;AAC7F,MAAIP,IAAUF,EAAeO,GAAY,MAAM,QAAQf,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC;AAC1G,EAAKI,EAAUY,CAAU,MACrBZ,EAAUY,CAAU,IAAI,oBAAI,QAAO;AAEvC,MAAIE,IAAgBd,EAAUY,CAAU,GACpCG,IAAc,CAAA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AAIX,GAAMqB,CAAW,GAC9BD,MACIxB,EAAkB,IAAII,CAAI,KAC3BA,EAAK,gBAAgBU,CAAgB,GAEzCd,EAAkB,OAAOI,CAAI,IAE5BqB,KACDrB,EAAK,gBAAgBS,CAAU;AAAA,IAEvC,CAAC,GACDX,KACKA,MAEDH,IAAa,oBAAI,QAAO,GACxBA,IAAa,oBAAI,QAAO,GACxBC,IAAoB,oBAAI,QAAO,GAC/BC,IAAY,CAAA;AAAA,EAEpB;AACJ,GAQW0B,IAAa,SAAU9B,GAAgBe,GAAYC,GAAY;AACtE,EAAIA,MAAe,WAAUA,IAAa;AAC1C,MAAIN,IAAU,MAAM,KAAK,MAAM,QAAQV,CAAc,IAAIA,IAAiB,CAACA,CAAc,CAAC,GACtF+B,IAAiChC,EAAiBC,CAAc;AACpE,SAAK+B,KAKLrB,EAAQ,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,qBAAqB,CAAC,CAAC,GACzFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KALvE,WAAY;AAAE,WAAO;AAAA,EAAM;AAM1C;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es474.js","sources":["../node_modules/@radix-ui/react-use-callback-ref/dist/index.mjs"],"sourcesContent":["// packages/react/use-callback-ref/src/use-callback-ref.tsx\nimport * as React from \"react\";\nfunction useCallbackRef(callback) {\n const callbackRef = React.useRef(callback);\n React.useEffect(() => {\n callbackRef.current = callback;\n });\n return React.useMemo(() => (...args) => callbackRef.current?.(...args), []);\n}\nexport {\n useCallbackRef\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useCallbackRef","callback","callbackRef","React","args","_a"],"mappings":";AAEA,SAASA,EAAeC,GAAU;AAChC,QAAMC,IAAcC,EAAM,OAAOF,CAAQ;AACzC,SAAAE,EAAM,UAAU,MAAM;AACpB,IAAAD,EAAY,UAAUD;AAAA,EACxB,CAAC,GACME,EAAM,QAAQ,MAAM,IAAIC;;AAAS,YAAAC,IAAAH,EAAY,YAAZ,gBAAAG,EAAA,KAAAH,GAAsB,GAAGE;AAAA,KAAO,EAAE;AAC5E;","x_google_ignoreList":[0]}
|
package/dist/index.es475.js
CHANGED
@@ -1,12 +1,53 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
var S = function(r) {
|
2
|
+
if (typeof document > "u")
|
3
|
+
return null;
|
4
|
+
var u = Array.isArray(r) ? r[0] : r;
|
5
|
+
return u.ownerDocument.body;
|
6
|
+
}, f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {}, h = 0, W = function(r) {
|
7
|
+
return r && (r.host || W(r.parentNode));
|
8
|
+
}, D = function(r, u) {
|
9
|
+
return u.map(function(e) {
|
10
|
+
if (r.contains(e))
|
11
|
+
return e;
|
12
|
+
var n = W(e);
|
13
|
+
return n && r.contains(n) ? n : (console.error("aria-hidden", e, "in not contained inside", r, ". Doing nothing"), null);
|
14
|
+
}).filter(function(e) {
|
15
|
+
return !!e;
|
16
|
+
});
|
17
|
+
}, E = function(r, u, e, n) {
|
18
|
+
var i = D(u, Array.isArray(r) ? r : [r]);
|
19
|
+
p[e] || (p[e] = /* @__PURE__ */ new WeakMap());
|
20
|
+
var s = p[e], l = [], o = /* @__PURE__ */ new Set(), b = new Set(i), y = function(t) {
|
21
|
+
!t || o.has(t) || (o.add(t), y(t.parentNode));
|
22
|
+
};
|
23
|
+
i.forEach(y);
|
24
|
+
var A = function(t) {
|
25
|
+
!t || b.has(t) || Array.prototype.forEach.call(t.children, function(a) {
|
26
|
+
if (o.has(a))
|
27
|
+
A(a);
|
28
|
+
else
|
29
|
+
try {
|
30
|
+
var c = a.getAttribute(n), w = c !== null && c !== "false", d = (f.get(a) || 0) + 1, M = (s.get(a) || 0) + 1;
|
31
|
+
f.set(a, d), s.set(a, M), l.push(a), d === 1 && w && v.set(a, !0), M === 1 && a.setAttribute(e, "true"), w || a.setAttribute(n, "true");
|
32
|
+
} catch (k) {
|
33
|
+
console.error("aria-hidden: cannot operate on ", a, k);
|
34
|
+
}
|
35
|
+
});
|
36
|
+
};
|
37
|
+
return A(u), o.clear(), h++, function() {
|
38
|
+
l.forEach(function(t) {
|
39
|
+
var a = f.get(t) - 1, c = s.get(t) - 1;
|
40
|
+
f.set(t, a), s.set(t, c), a || (v.has(t) || t.removeAttribute(n), v.delete(t)), c || t.removeAttribute(e);
|
41
|
+
}), h--, h || (f = /* @__PURE__ */ new WeakMap(), f = /* @__PURE__ */ new WeakMap(), v = /* @__PURE__ */ new WeakMap(), p = {});
|
42
|
+
};
|
43
|
+
}, C = function(r, u, e) {
|
44
|
+
e === void 0 && (e = "data-aria-hidden");
|
45
|
+
var n = Array.from(Array.isArray(r) ? r : [r]), i = S(r);
|
46
|
+
return i ? (n.push.apply(n, Array.from(i.querySelectorAll("[aria-live], script"))), E(n, i, e, "aria-hidden")) : function() {
|
47
|
+
return null;
|
48
|
+
};
|
49
|
+
};
|
9
50
|
export {
|
10
|
-
|
51
|
+
C as hideOthers
|
11
52
|
};
|
12
53
|
//# sourceMappingURL=index.es475.js.map
|
package/dist/index.es475.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es475.js","sources":["../node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":["ReactRemoveScroll","React","props","ref","RemoveScroll","__assign","SideCar"],"mappings":";;;;AAIG,IAACA,IAAoBC,EAAM,WAAW,SAAUC,GAAOC,GAAK;AAAE,SAAQF,EAAM,cAAcG,GAAcC,EAAS,IAAIH,GAAO,EAAE,KAAKC,GAAK,SAASG,EAAO,CAAE,CAAC;AAAI,CAAC;AACnKN,EAAkB,aAAaI,EAAa;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es475.js","sources":["../node_modules/aria-hidden/dist/es2015/index.js"],"sourcesContent":["var getDefaultParent = function (originalTarget) {\n if (typeof document === 'undefined') {\n return null;\n }\n var sampleTarget = Array.isArray(originalTarget) ? originalTarget[0] : originalTarget;\n return sampleTarget.ownerDocument.body;\n};\nvar counterMap = new WeakMap();\nvar uncontrolledNodes = new WeakMap();\nvar markerMap = {};\nvar lockCount = 0;\nvar unwrapHost = function (node) {\n return node && (node.host || unwrapHost(node.parentNode));\n};\nvar correctTargets = function (parent, targets) {\n return targets\n .map(function (target) {\n if (parent.contains(target)) {\n return target;\n }\n var correctedTarget = unwrapHost(target);\n if (correctedTarget && parent.contains(correctedTarget)) {\n return correctedTarget;\n }\n console.error('aria-hidden', target, 'in not contained inside', parent, '. Doing nothing');\n return null;\n })\n .filter(function (x) { return Boolean(x); });\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @param {String} [controlAttribute] - html Attribute to control\n * @return {Undo} undo command\n */\nvar applyAttributeToOthers = function (originalTarget, parentNode, markerName, controlAttribute) {\n var targets = correctTargets(parentNode, Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n if (!markerMap[markerName]) {\n markerMap[markerName] = new WeakMap();\n }\n var markerCounter = markerMap[markerName];\n var hiddenNodes = [];\n var elementsToKeep = new Set();\n var elementsToStop = new Set(targets);\n var keep = function (el) {\n if (!el || elementsToKeep.has(el)) {\n return;\n }\n elementsToKeep.add(el);\n keep(el.parentNode);\n };\n targets.forEach(keep);\n var deep = function (parent) {\n if (!parent || elementsToStop.has(parent)) {\n return;\n }\n Array.prototype.forEach.call(parent.children, function (node) {\n if (elementsToKeep.has(node)) {\n deep(node);\n }\n else {\n try {\n var attr = node.getAttribute(controlAttribute);\n var alreadyHidden = attr !== null && attr !== 'false';\n var counterValue = (counterMap.get(node) || 0) + 1;\n var markerValue = (markerCounter.get(node) || 0) + 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n hiddenNodes.push(node);\n if (counterValue === 1 && alreadyHidden) {\n uncontrolledNodes.set(node, true);\n }\n if (markerValue === 1) {\n node.setAttribute(markerName, 'true');\n }\n if (!alreadyHidden) {\n node.setAttribute(controlAttribute, 'true');\n }\n }\n catch (e) {\n console.error('aria-hidden: cannot operate on ', node, e);\n }\n }\n });\n };\n deep(parentNode);\n elementsToKeep.clear();\n lockCount++;\n return function () {\n hiddenNodes.forEach(function (node) {\n var counterValue = counterMap.get(node) - 1;\n var markerValue = markerCounter.get(node) - 1;\n counterMap.set(node, counterValue);\n markerCounter.set(node, markerValue);\n if (!counterValue) {\n if (!uncontrolledNodes.has(node)) {\n node.removeAttribute(controlAttribute);\n }\n uncontrolledNodes.delete(node);\n }\n if (!markerValue) {\n node.removeAttribute(markerName);\n }\n });\n lockCount--;\n if (!lockCount) {\n // clear\n counterMap = new WeakMap();\n counterMap = new WeakMap();\n uncontrolledNodes = new WeakMap();\n markerMap = {};\n }\n };\n};\n/**\n * Marks everything except given node(or nodes) as aria-hidden\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var hideOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-aria-hidden'; }\n var targets = Array.from(Array.isArray(originalTarget) ? originalTarget : [originalTarget]);\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n // we should not hide aria-live elements - https://github.com/theKashey/aria-hidden/issues/10\n // and script elements, as they have no impact on accessibility.\n targets.push.apply(targets, Array.from(activeParentNode.querySelectorAll('[aria-live], script')));\n return applyAttributeToOthers(targets, activeParentNode, markerName, 'aria-hidden');\n};\n/**\n * Marks everything except given node(or nodes) as inert\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var inertOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-inert-ed'; }\n var activeParentNode = parentNode || getDefaultParent(originalTarget);\n if (!activeParentNode) {\n return function () { return null; };\n }\n return applyAttributeToOthers(originalTarget, activeParentNode, markerName, 'inert');\n};\n/**\n * @returns if current browser supports inert\n */\nexport var supportsInert = function () {\n return typeof HTMLElement !== 'undefined' && HTMLElement.prototype.hasOwnProperty('inert');\n};\n/**\n * Automatic function to \"suppress\" DOM elements - _hide_ or _inert_ in the best possible way\n * @param {Element | Element[]} originalTarget - elements to keep on the page\n * @param [parentNode] - top element, defaults to document.body\n * @param {String} [markerName] - a special attribute to mark every node\n * @return {Undo} undo command\n */\nexport var suppressOthers = function (originalTarget, parentNode, markerName) {\n if (markerName === void 0) { markerName = 'data-suppressed'; }\n return (supportsInert() ? inertOthers : hideOthers)(originalTarget, parentNode, markerName);\n};\n"],"names":["getDefaultParent","originalTarget","sampleTarget","counterMap","uncontrolledNodes","markerMap","lockCount","unwrapHost","node","correctTargets","parent","targets","target","correctedTarget","x","applyAttributeToOthers","parentNode","markerName","controlAttribute","markerCounter","hiddenNodes","elementsToKeep","elementsToStop","keep","el","deep","attr","alreadyHidden","counterValue","markerValue","e","hideOthers","activeParentNode"],"mappings":"AAAA,IAAIA,IAAmB,SAAUC,GAAgB;AAC7C,MAAI,OAAO,WAAa;AACpB,WAAO;AAEX,MAAIC,IAAe,MAAM,QAAQD,CAAc,IAAIA,EAAe,CAAC,IAAIA;AACvE,SAAOC,EAAa,cAAc;AACtC,GACIC,IAAa,oBAAI,QAAO,GACxBC,IAAoB,oBAAI,QAAO,GAC/BC,IAAY,CAAA,GAC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,KAAK,MAAMA,GAAS,MAAM,KAAKqB,EAAiB,iBAAiB,qBAAqB,CAAC,CAAC,GACzFjB,EAAuBJ,GAASqB,GAAkBf,GAAY,aAAa,KALvE,WAAY;AAAE,WAAO;AAAA,EAAM;AAM1C;","x_google_ignoreList":[0]}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { __assign as m } from "./index.es493.js";
|
2
|
+
import * as r from "react";
|
3
|
+
import { RemoveScroll as e } from "./index.es494.js";
|
4
|
+
import t from "./index.es495.js";
|
5
|
+
var s = r.forwardRef(function(a, o) {
|
6
|
+
return r.createElement(e, m({}, a, { ref: o, sideCar: t }));
|
7
|
+
});
|
8
|
+
s.classNames = e.classNames;
|
9
|
+
export {
|
10
|
+
s as default
|
11
|
+
};
|
12
|
+
//# sourceMappingURL=index.es476.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.es476.js","sources":["../node_modules/react-remove-scroll/dist/es2015/Combination.js"],"sourcesContent":["import { __assign } from \"tslib\";\nimport * as React from 'react';\nimport { RemoveScroll } from './UI';\nimport SideCar from './sidecar';\nvar ReactRemoveScroll = React.forwardRef(function (props, ref) { return (React.createElement(RemoveScroll, __assign({}, props, { ref: ref, sideCar: SideCar }))); });\nReactRemoveScroll.classNames = RemoveScroll.classNames;\nexport default ReactRemoveScroll;\n"],"names":["ReactRemoveScroll","React","props","ref","RemoveScroll","__assign","SideCar"],"mappings":";;;;AAIG,IAACA,IAAoBC,EAAM,WAAW,SAAUC,GAAOC,GAAK;AAAE,SAAQF,EAAM,cAAcG,GAAcC,EAAS,IAAIH,GAAO,EAAE,KAAKC,GAAK,SAASG,EAAO,CAAE,CAAC;AAAI,CAAC;AACnKN,EAAkB,aAAaI,EAAa;","x_google_ignoreList":[0]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as r from "react";
|
2
|
-
import { useCallbackRef as s } from "./index.
|
2
|
+
import { useCallbackRef as s } from "./index.es474.js";
|
3
3
|
function p(n, e = globalThis == null ? void 0 : globalThis.document) {
|
4
4
|
const t = s(n);
|
5
5
|
r.useEffect(() => {
|
@@ -12,4 +12,4 @@ function p(n, e = globalThis == null ? void 0 : globalThis.document) {
|
|
12
12
|
export {
|
13
13
|
p as useEscapeKeydown
|
14
14
|
};
|
15
|
-
//# sourceMappingURL=index.
|
15
|
+
//# sourceMappingURL=index.es483.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.
|
1
|
+
{"version":3,"file":"index.es483.js","sources":["../node_modules/@radix-ui/react-use-escape-keydown/dist/index.mjs"],"sourcesContent":["// packages/react/use-escape-keydown/src/use-escape-keydown.tsx\nimport * as React from \"react\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nfunction useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {\n const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);\n React.useEffect(() => {\n const handleKeyDown = (event) => {\n if (event.key === \"Escape\") {\n onEscapeKeyDown(event);\n }\n };\n ownerDocument.addEventListener(\"keydown\", handleKeyDown, { capture: true });\n return () => ownerDocument.removeEventListener(\"keydown\", handleKeyDown, { capture: true });\n }, [onEscapeKeyDown, ownerDocument]);\n}\nexport {\n useEscapeKeydown\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["useEscapeKeydown","onEscapeKeyDownProp","ownerDocument","onEscapeKeyDown","useCallbackRef","React","handleKeyDown","event"],"mappings":";;AAGA,SAASA,EAAiBC,GAAqBC,IAAgB,yCAAY,UAAU;AACnF,QAAMC,IAAkBC,EAAeH,CAAmB;AAC1D,EAAAI,EAAM,UAAU,MAAM;AACpB,UAAMC,IAAgB,CAACC,MAAU;AAC/B,MAAIA,EAAM,QAAQ,YAChBJ,EAAgBI,CAAK;AAAA,IAEzB;AACA,WAAAL,EAAc,iBAAiB,WAAWI,GAAe,EAAE,SAAS,IAAM,GACnE,MAAMJ,EAAc,oBAAoB,WAAWI,GAAe,EAAE,SAAS,IAAM;AAAA,EAC5F,GAAG,CAACH,GAAiBD,CAAa,CAAC;AACrC;","x_google_ignoreList":[0]}
|
@@ -1,5 +1,5 @@
|
|
1
|
-
import { computePosition as I, offset as J, shift as K, flip as N, size as Q, hide as T, limitShift as X, arrow as z } from "./index.
|
2
|
-
import { autoUpdate as pe, platform as ge } from "./index.
|
1
|
+
import { computePosition as I, offset as J, shift as K, flip as N, size as Q, hide as T, limitShift as X, arrow as z } from "./index.es486.js";
|
2
|
+
import { autoUpdate as pe, platform as ge } from "./index.es486.js";
|
3
3
|
import * as o from "react";
|
4
4
|
import { useLayoutEffect as Y } from "react";
|
5
5
|
import * as Z from "react-dom";
|
@@ -206,4 +206,4 @@ export {
|
|
206
206
|
le as size,
|
207
207
|
oe as useFloating
|
208
208
|
};
|
209
|
-
//# sourceMappingURL=index.
|
209
|
+
//# sourceMappingURL=index.es484.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es480.js","sources":["../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"],"sourcesContent":["import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n ...offset$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n ...shift$1(options),\n options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n ...limitShift$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n ...flip$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n ...size$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n ...autoPlacement$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n ...hide$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n ...inline$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n ...arrow$1(options),\n options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n"],"names":["isClient","noop","index","useLayoutEffect","deepEqual","a","b","length","i","keys","key","getDPR","element","roundByDPR","value","dpr","useLatestRef","ref","React","useFloating","options","placement","strategy","middleware","platform","externalReference","externalFloating","transform","whileElementsMounted","open","data","setData","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","node","referenceRef","setFloating","floatingRef","referenceEl","floatingEl","dataRef","hasWhileElementsMounted","whileElementsMountedRef","platformRef","openRef","update","config","computePosition","fullData","isMountedRef","ReactDOM","refs","elements","floatingStyles","initialStyles","x","y","arrow$1","isRef","state","padding","arrow$2","offset","deps","offset$1","shift","shift$1","limitShift","limitShift$1","flip","flip$1","size","size$1","hide","hide$1","arrow"],"m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AAA,EAC/B,GAAGS,EAAOzD,CAAO;AAAA,EACjB,SAAS,CAACA,GAASgD,CAAI;AACzB,IAkBMU,KAAO,CAAC1D,GAASgD,OAAU;AAAA,EAC/B,GAAGW,EAAO3D,CAAO;AAAA,EACjB,SAAS,CAACA,GAASgD,CAAI;AACzB,IAkBMY,KAAQ,CAAC5D,GAASgD,OAAU;AAAA,EAChC,GAAGN,GAAQ1C,CAAO;AAAA,EAClB,SAAS,CAACA,GAASgD,CAAI;AACzB;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es484.js","sources":["../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"],"sourcesContent":["import { computePosition, arrow as arrow$2, autoPlacement as autoPlacement$1, flip as flip$1, hide as hide$1, inline as inline$1, limitShift as limitShift$1, offset as offset$1, shift as shift$1, size as size$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar isClient = typeof document !== 'undefined';\n\nvar noop = function noop() {};\nvar index = isClient ? useLayoutEffect : noop;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const openRef = useLatestRef(open);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n // The floating element's position may be recomputed while it's closed\n // but still mounted (such as when transitioning out). To ensure\n // `isPositioned` will be `false` initially on the next open, avoid\n // setting it to `true` when `open === false` (must be specified).\n isPositioned: openRef.current !== false\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef, openRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n ...offset$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n ...shift$1(options),\n options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n ...limitShift$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n ...flip$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n ...size$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n ...autoPlacement$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n ...hide$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n ...inline$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n ...arrow$1(options),\n options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n"],"names":["isClient","noop","index","useLayoutEffect","deepEqual","a","b","length","i","keys","key","getDPR","element","roundByDPR","value","dpr","useLatestRef","ref","React","useFloating","options","placement","strategy","middleware","platform","externalReference","externalFloating","transform","whileElementsMounted","open","data","setData","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","node","referenceRef","setFloating","floatingRef","referenceEl","floatingEl","dataRef","hasWhileElementsMounted","whileElementsMountedRef","platformRef","openRef","update","config","computePosition","fullData","isMountedRef","ReactDOM","refs","elements","floatingStyles","initialStyles","x","y","arrow$1","isRef","state","padding","arrow$2","offset","deps","offset$1","shift","shift$1","limitShift","limitShift$1","flip","flip$1","size","size$1","hide","hide$1","arrow"],"mappings":";;;;;AAMA,IAAIA,IAAW,OAAO,WAAa,KAE/BC,KAAO,WAAgB;AAAC,GACxBC,IAAQF,IAAWG,IAAkBF;AAIzC,SAASG,EAAUC,GAAGC,GAAG;AACvB,MAAID,MAAMC;AACR,WAAO;AAET,MAAI,OAAOD,KAAM,OAAOC;AACtB,WAAO;AAET,MAAI,OAAOD,KAAM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AAAA,EAChC,GAAGN,GAAQ1C,CAAO;AAAA,EAClB,SAAS,CAACA,GAASgD,CAAI;AACzB;","x_google_ignoreList":[0]}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as n from "react";
|
2
|
-
import { Primitive as p } from "./index.
|
2
|
+
import { Primitive as p } from "./index.es460.js";
|
3
3
|
import { j as o } from "./index.es225.js";
|
4
4
|
var v = "Arrow", e = n.forwardRef((r, i) => {
|
5
5
|
const { children: t, width: s = 10, height: a = 5, ...m } = r;
|
@@ -22,4 +22,4 @@ export {
|
|
22
22
|
e as Arrow,
|
23
23
|
h as Root
|
24
24
|
};
|
25
|
-
//# sourceMappingURL=index.
|
25
|
+
//# sourceMappingURL=index.es485.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.
|
1
|
+
{"version":3,"file":"index.es485.js","sources":["../node_modules/@radix-ui/react-arrow/dist/index.mjs"],"sourcesContent":["// src/arrow.tsx\nimport * as React from \"react\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { jsx } from \"react/jsx-runtime\";\nvar NAME = \"Arrow\";\nvar Arrow = React.forwardRef((props, forwardedRef) => {\n const { children, width = 10, height = 5, ...arrowProps } = props;\n return /* @__PURE__ */ jsx(\n Primitive.svg,\n {\n ...arrowProps,\n ref: forwardedRef,\n width,\n height,\n viewBox: \"0 0 30 10\",\n preserveAspectRatio: \"none\",\n children: props.asChild ? children : /* @__PURE__ */ jsx(\"polygon\", { points: \"0,0 30,0 15,10\" })\n }\n );\n});\nArrow.displayName = NAME;\nvar Root = Arrow;\nexport {\n Arrow,\n Root\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["NAME","Arrow","React","props","forwardedRef","children","width","height","arrowProps","jsx","Primitive","Root"],"mappings":";;;AAIA,IAAIA,IAAO,SACPC,IAAQC,EAAM,WAAW,CAACC,GAAOC,MAAiB;AACpD,QAAM,EAAE,UAAAC,GAAU,OAAAC,IAAQ,IAAI,QAAAC,IAAS,GAAG,GAAGC,EAAU,IAAKL;AAC5D,SAAuBM,gBAAAA,EAAAA;AAAAA,IACrBC,EAAU;AAAA,IACV;AAAA,MACE,GAAGF;AAAA,MACH,KAAKJ;AAAA,MACL,OAAAE;AAAA,MACA,QAAAC;AAAA,MACA,SAAS;AAAA,MACT,qBAAqB;AAAA,MACrB,UAAUJ,EAAM,UAAUE,IAA2BI,gBAAAA,EAAAA,IAAI,WAAW,EAAE,QAAQ,iBAAgB,CAAE;AAAA,IACtG;AAAA,EACA;AACA,CAAC;AACDR,EAAM,cAAcD;AACjB,IAACW,IAAOV;","x_google_ignoreList":[0]}
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { offset as st, shift as rt, flip as ct, size as lt, hide as ft, limitShift as ut, computePosition as ht, arrow as at } from "./index.
|
2
|
-
import { createCoords as y, round as D, max as E, min as N, rectToClientRect as J, floor as A } from "./index.
|
3
|
-
import { isElement as v, getDocumentElement as R, getOverflowAncestors as $, getComputedStyle as b, isHTMLElement as C, getWindow as L, isTopLayer as V, getParentNode as S, isLastTraversableNode as z, isTableElement as dt, isContainingBlock as Q, getContainingBlock as gt, getNodeName as _, isOverflowElement as q, getNodeScroll as H, getFrameElement as U, isWebKit as Y } from "./index.
|
1
|
+
import { offset as st, shift as rt, flip as ct, size as lt, hide as ft, limitShift as ut, computePosition as ht, arrow as at } from "./index.es507.js";
|
2
|
+
import { createCoords as y, round as D, max as E, min as N, rectToClientRect as J, floor as A } from "./index.es508.js";
|
3
|
+
import { isElement as v, getDocumentElement as R, getOverflowAncestors as $, getComputedStyle as b, isHTMLElement as C, getWindow as L, isTopLayer as V, getParentNode as S, isLastTraversableNode as z, isTableElement as dt, isContainingBlock as Q, getContainingBlock as gt, getNodeName as _, isOverflowElement as q, getNodeScroll as H, getFrameElement as U, isWebKit as Y } from "./index.es509.js";
|
4
4
|
function Z(t) {
|
5
5
|
const e = b(t);
|
6
6
|
let o = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
@@ -400,4 +400,4 @@ export {
|
|
400
400
|
It as shift,
|
401
401
|
Nt as size
|
402
402
|
};
|
403
|
-
//# sourceMappingURL=index.
|
403
|
+
//# sourceMappingURL=index.es486.js.map
|