@anoki/fse-ui 1.0.697 → 1.0.698
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/navigations/TabBar/TabBar.css +1 -1
- package/dist/index.cjs20.js.map +1 -1
- package/dist/index.cjs213.js +1 -1
- package/dist/index.cjs220.js +1 -1
- package/dist/index.cjs240.js +1 -1
- package/dist/index.cjs244.js +1 -1
- package/dist/index.cjs251.js +1 -1
- package/dist/index.cjs261.js +1 -1
- package/dist/index.cjs267.js +1 -1
- package/dist/index.cjs294.js +1 -1
- package/dist/index.cjs333.js +1 -1
- package/dist/index.cjs361.js +1 -1
- package/dist/index.cjs362.js +1 -1
- package/dist/index.cjs374.js +27 -1
- package/dist/index.cjs374.js.map +1 -1
- package/dist/index.cjs375.js +1 -2
- package/dist/index.cjs375.js.map +1 -1
- package/dist/index.cjs376.js +1 -27
- package/dist/index.cjs376.js.map +1 -1
- package/dist/index.cjs377.js +1 -1
- package/dist/index.cjs377.js.map +1 -1
- package/dist/index.cjs378.js +2 -1
- package/dist/index.cjs378.js.map +1 -1
- package/dist/index.cjs379.js +2 -0
- package/dist/index.cjs379.js.map +1 -0
- package/dist/index.cjs380.js +1 -1
- package/dist/index.cjs380.js.map +1 -1
- package/dist/index.cjs381.js +2 -0
- package/dist/index.cjs381.js.map +1 -0
- package/dist/index.cjs382.js +2 -0
- package/dist/index.cjs382.js.map +1 -0
- package/dist/index.cjs383.js +1 -1
- package/dist/index.cjs383.js.map +1 -1
- package/dist/index.cjs384.js +1 -1
- package/dist/index.cjs384.js.map +1 -1
- package/dist/index.cjs385.js +1 -1
- package/dist/index.cjs385.js.map +1 -1
- package/dist/index.cjs386.js +1 -1
- package/dist/index.cjs386.js.map +1 -1
- package/dist/index.cjs390.js +1 -1
- package/dist/index.cjs390.js.map +1 -1
- package/dist/index.cjs391.js +1 -1
- package/dist/index.cjs391.js.map +1 -1
- package/dist/index.cjs392.js +1 -1
- package/dist/index.cjs392.js.map +1 -1
- package/dist/index.cjs398.js +1 -1
- package/dist/index.cjs398.js.map +1 -1
- package/dist/index.cjs399.js +1 -1
- package/dist/index.cjs399.js.map +1 -1
- package/dist/index.cjs400.js +1 -1
- package/dist/index.cjs400.js.map +1 -1
- package/dist/index.cjs401.js +1 -1
- package/dist/index.cjs401.js.map +1 -1
- package/dist/index.cjs402.js +2 -0
- package/dist/index.cjs402.js.map +1 -0
- package/dist/index.cjs403.js +2 -0
- package/dist/index.cjs403.js.map +1 -0
- package/dist/index.cjs404.js +2 -0
- package/dist/index.cjs404.js.map +1 -0
- package/dist/{index.cjs408.js → index.cjs405.js} +1 -1
- package/dist/{index.cjs408.js.map → index.cjs405.js.map} +1 -1
- package/dist/index.cjs420.js +1 -1
- package/dist/index.cjs424.js +1 -1
- package/dist/index.cjs424.js.map +1 -1
- package/dist/index.cjs425.js +1 -1
- package/dist/index.cjs425.js.map +1 -1
- package/dist/index.cjs426.js +1 -1
- package/dist/index.cjs426.js.map +1 -1
- package/dist/index.cjs427.js +1 -1
- package/dist/index.cjs427.js.map +1 -1
- package/dist/index.cjs428.js +1 -1
- package/dist/index.cjs428.js.map +1 -1
- package/dist/index.cjs431.js +1 -1
- package/dist/index.cjs431.js.map +1 -1
- package/dist/index.cjs432.js +1 -1
- package/dist/index.cjs433.js +1 -1
- package/dist/index.cjs433.js.map +1 -1
- package/dist/index.cjs434.js +1 -1
- package/dist/index.cjs434.js.map +1 -1
- package/dist/index.cjs436.js +1 -1
- package/dist/index.cjs437.js +1 -1
- package/dist/index.cjs441.js +1 -1
- package/dist/index.cjs442.js +1 -1
- package/dist/index.cjs449.js +1 -1
- package/dist/index.cjs451.js +1 -1
- package/dist/index.cjs453.js +1 -1
- package/dist/index.cjs463.js +1 -1
- package/dist/index.cjs463.js.map +1 -1
- package/dist/index.cjs464.js +38 -1
- package/dist/index.cjs464.js.map +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 -38
- 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.es20.js.map +1 -1
- package/dist/index.es213.js +1 -1
- package/dist/index.es220.js +2 -2
- package/dist/index.es240.js +7 -7
- package/dist/index.es244.js +1 -1
- package/dist/index.es251.js +8 -8
- package/dist/index.es261.js +1 -1
- package/dist/index.es267.js +14 -14
- package/dist/index.es294.js +7 -7
- package/dist/index.es333.js +4 -4
- package/dist/index.es361.js +1 -1
- package/dist/index.es362.js +2 -2
- package/dist/index.es374.js +3674 -5
- package/dist/index.es374.js.map +1 -1
- package/dist/index.es375.js +5 -520
- package/dist/index.es375.js.map +1 -1
- package/dist/index.es376.js +2 -3675
- package/dist/index.es376.js.map +1 -1
- package/dist/index.es377.js +5 -5
- package/dist/index.es377.js.map +1 -1
- package/dist/index.es378.js +521 -2
- package/dist/index.es378.js.map +1 -1
- package/dist/index.es379.js +10 -0
- package/dist/index.es379.js.map +1 -0
- package/dist/index.es380.js +27 -15
- package/dist/index.es380.js.map +1 -1
- package/dist/index.es381.js +71 -0
- package/dist/index.es381.js.map +1 -0
- package/dist/index.es382.js +33 -0
- package/dist/index.es382.js.map +1 -0
- package/dist/index.es383.js +32 -26
- package/dist/index.es383.js.map +1 -1
- package/dist/index.es384.js +617 -63
- package/dist/index.es384.js.map +1 -1
- package/dist/index.es385.js +10 -6
- package/dist/index.es385.js.map +1 -1
- package/dist/index.es386.js +15 -30
- package/dist/index.es386.js.map +1 -1
- package/dist/index.es390.js +5 -32
- package/dist/index.es390.js.map +1 -1
- package/dist/index.es391.js +24 -621
- package/dist/index.es391.js.map +1 -1
- package/dist/index.es392.js +68 -10
- package/dist/index.es392.js.map +1 -1
- package/dist/index.es398.js +122 -12
- package/dist/index.es398.js.map +1 -1
- package/dist/index.es399.js +134 -8
- package/dist/index.es399.js.map +1 -1
- package/dist/index.es400.js +14 -50
- package/dist/index.es400.js.map +1 -1
- package/dist/index.es401.js +13 -51
- package/dist/index.es401.js.map +1 -1
- package/dist/index.es402.js +12 -0
- package/dist/index.es402.js.map +1 -0
- package/dist/index.es403.js +53 -0
- package/dist/index.es403.js.map +1 -0
- package/dist/index.es404.js +56 -0
- package/dist/index.es404.js.map +1 -0
- package/dist/{index.es408.js → index.es405.js} +1 -1
- package/dist/{index.es408.js.map → index.es405.js.map} +1 -1
- package/dist/index.es420.js +1 -1
- package/dist/index.es424.js +46 -4
- package/dist/index.es424.js.map +1 -1
- package/dist/index.es425.js +7 -45
- package/dist/index.es425.js.map +1 -1
- package/dist/index.es426.js +217 -7
- package/dist/index.es426.js.map +1 -1
- package/dist/index.es427.js +163 -203
- package/dist/index.es427.js.map +1 -1
- package/dist/index.es428.js +3 -177
- package/dist/index.es428.js.map +1 -1
- package/dist/index.es431.js +131 -8
- package/dist/index.es431.js.map +1 -1
- package/dist/index.es432.js +1 -1
- package/dist/index.es433.js +9 -3
- package/dist/index.es433.js.map +1 -1
- package/dist/index.es434.js +2 -131
- package/dist/index.es434.js.map +1 -1
- package/dist/index.es436.js +1 -1
- package/dist/index.es437.js +3 -3
- package/dist/index.es441.js +1 -1
- package/dist/index.es442.js +1 -1
- package/dist/index.es449.js +7 -7
- package/dist/index.es451.js +1 -1
- package/dist/index.es453.js +4 -4
- package/dist/index.es463.js +54 -512
- package/dist/index.es463.js.map +1 -1
- package/dist/index.es464.js +68 -126
- package/dist/index.es464.js.map +1 -1
- package/dist/index.es465.js +8 -128
- package/dist/index.es465.js.map +1 -1
- package/dist/index.es466.js +13 -64
- package/dist/index.es466.js.map +1 -1
- package/dist/index.es467.js +61 -68
- package/dist/index.es467.js.map +1 -1
- package/dist/index.es468.js +521 -7
- package/dist/index.es468.js.map +1 -1
- package/dist/index.es469.js +126 -13
- package/dist/index.es469.js.map +1 -1
- package/dist/index.es470.js +127 -60
- package/dist/index.es470.js.map +1 -1
- package/package.json +1 -1
- package/dist/index.cjs387.js +0 -2
- package/dist/index.cjs387.js.map +0 -1
- package/dist/index.cjs388.js +0 -2
- package/dist/index.cjs388.js.map +0 -1
- package/dist/index.cjs389.js +0 -2
- package/dist/index.cjs389.js.map +0 -1
- package/dist/index.cjs395.js +0 -2
- package/dist/index.cjs395.js.map +0 -1
- package/dist/index.cjs396.js +0 -2
- package/dist/index.cjs396.js.map +0 -1
- package/dist/index.cjs397.js +0 -2
- package/dist/index.cjs397.js.map +0 -1
- package/dist/index.es387.js +0 -9
- package/dist/index.es387.js.map +0 -1
- package/dist/index.es388.js +0 -28
- package/dist/index.es388.js.map +0 -1
- package/dist/index.es389.js +0 -72
- package/dist/index.es389.js.map +0 -1
- package/dist/index.es395.js +0 -128
- package/dist/index.es395.js.map +0 -1
- package/dist/index.es396.js +0 -138
- package/dist/index.es396.js.map +0 -1
- package/dist/index.es397.js +0 -17
- package/dist/index.es397.js.map +0 -1
package/dist/index.es424.js
CHANGED
@@ -1,7 +1,49 @@
|
|
1
|
-
import
|
2
|
-
|
3
|
-
};
|
1
|
+
import r from "react";
|
2
|
+
import { createContextScope as y } from "./index.es381.js";
|
3
|
+
import { useComposedRefs as S } from "./index.es380.js";
|
4
|
+
import { createSlot as M } from "./index.es404.js";
|
5
|
+
import { j as d } from "./index.es209.js";
|
6
|
+
function D(s) {
|
7
|
+
const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
|
8
|
+
m,
|
9
|
+
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
10
|
+
), p = (c) => {
|
11
|
+
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
12
|
+
return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
|
13
|
+
};
|
14
|
+
p.displayName = m;
|
15
|
+
const a = s + "CollectionSlot", _ = M(a), C = r.forwardRef(
|
16
|
+
(c, e) => {
|
17
|
+
const { scope: l, children: o } = c, t = f(a, l), n = S(e, t.collectionRef);
|
18
|
+
return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
|
19
|
+
}
|
20
|
+
);
|
21
|
+
C.displayName = a;
|
22
|
+
const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
|
23
|
+
(c, e) => {
|
24
|
+
const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = f(u, l);
|
25
|
+
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
|
26
|
+
}
|
27
|
+
);
|
28
|
+
x.displayName = u;
|
29
|
+
function O(c) {
|
30
|
+
const e = f(s + "CollectionConsumer", c);
|
31
|
+
return r.useCallback(() => {
|
32
|
+
const o = e.collectionRef.current;
|
33
|
+
if (!o) return [];
|
34
|
+
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
35
|
+
return Array.from(e.itemMap.values()).sort(
|
36
|
+
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
37
|
+
);
|
38
|
+
}, [e.collectionRef, e.itemMap]);
|
39
|
+
}
|
40
|
+
return [
|
41
|
+
{ Provider: p, Slot: C, ItemSlot: x },
|
42
|
+
O,
|
43
|
+
E
|
44
|
+
];
|
45
|
+
}
|
4
46
|
export {
|
5
|
-
|
47
|
+
D as createCollection
|
6
48
|
};
|
7
49
|
//# sourceMappingURL=index.es424.js.map
|
package/dist/index.es424.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es424.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es424.js","sources":["../node_modules/@radix-ui/react-collection/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/collection/src/collection.tsx\nimport React from \"react\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createSlot } from \"@radix-ui/react-slot\";\nimport { jsx } from \"react/jsx-runtime\";\nfunction createCollection(name) {\n const PROVIDER_NAME = name + \"CollectionProvider\";\n const [createCollectionContext, createCollectionScope] = createContextScope(PROVIDER_NAME);\n const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(\n PROVIDER_NAME,\n { collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }\n );\n const CollectionProvider = (props) => {\n const { scope, children } = props;\n const ref = React.useRef(null);\n const itemMap = React.useRef(/* @__PURE__ */ new Map()).current;\n return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });\n };\n CollectionProvider.displayName = PROVIDER_NAME;\n const COLLECTION_SLOT_NAME = name + \"CollectionSlot\";\n const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);\n const CollectionSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children } = props;\n const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);\n const composedRefs = useComposedRefs(forwardedRef, context.collectionRef);\n return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });\n }\n );\n CollectionSlot.displayName = COLLECTION_SLOT_NAME;\n const ITEM_SLOT_NAME = name + \"CollectionItemSlot\";\n const ITEM_DATA_ATTR = \"data-radix-collection-item\";\n const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);\n const CollectionItemSlot = React.forwardRef(\n (props, forwardedRef) => {\n const { scope, children, ...itemData } = props;\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n const context = useCollectionContext(ITEM_SLOT_NAME, scope);\n React.useEffect(() => {\n context.itemMap.set(ref, { ref, ...itemData });\n return () => void context.itemMap.delete(ref);\n });\n return /* @__PURE__ */ jsx(CollectionItemSlotImpl, { ...{ [ITEM_DATA_ATTR]: \"\" }, ref: composedRefs, children });\n }\n );\n CollectionItemSlot.displayName = ITEM_SLOT_NAME;\n function useCollection(scope) {\n const context = useCollectionContext(name + \"CollectionConsumer\", scope);\n const getItems = React.useCallback(() => {\n const collectionNode = context.collectionRef.current;\n if (!collectionNode) return [];\n const orderedNodes = Array.from(collectionNode.querySelectorAll(`[${ITEM_DATA_ATTR}]`));\n const items = Array.from(context.itemMap.values());\n const orderedItems = items.sort(\n (a, b) => orderedNodes.indexOf(a.ref.current) - orderedNodes.indexOf(b.ref.current)\n );\n return orderedItems;\n }, [context.collectionRef, context.itemMap]);\n return getItems;\n }\n return [\n { Provider: CollectionProvider, Slot: CollectionSlot, ItemSlot: CollectionItemSlot },\n useCollection,\n createCollectionScope\n ];\n}\nexport {\n createCollection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["createCollection","name","PROVIDER_NAME","createCollectionContext","createCollectionScope","createContextScope","CollectionProviderImpl","useCollectionContext","CollectionProvider","props","scope","children","ref","React","itemMap","jsx","COLLECTION_SLOT_NAME","CollectionSlotImpl","createSlot","CollectionSlot","forwardedRef","context","composedRefs","useComposedRefs","ITEM_SLOT_NAME","ITEM_DATA_ATTR","CollectionItemSlotImpl","CollectionItemSlot","itemData","useCollection","collectionNode","orderedNodes","a","b"],"mappings":";;;;;AAQA,SAASA,EAAiBC,GAAM;AAC9B,QAAMC,IAAgBD,IAAO,sBACvB,CAACE,GAAyBC,CAAqB,IAAIC,EAAmBH,CAAa,GACnF,CAACI,GAAwBC,CAAoB,IAAIJ;AAAA,IACrDD;AAAA,IACA,EAAE,eAAe,EAAE,SAAS,KAAI,GAAI,SAAyB,oBAAI,IAAK,EAAA;AAAA,EACvE,GACKM,IAAqB,CAACC,MAAU;AACpC,UAAM,EAAE,OAAAC,GAAO,UAAAC,EAAQ,IAAKF,GACtBG,IAAMC,EAAM,OAAO,IAAI,GACvBC,IAAUD,EAAM,OAAuB,oBAAI,IAAG,CAAE,EAAE;AACxD,WAAuBE,gBAAAA,EAAG,IAACT,GAA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AC7C,UAAI,CAACS,EAAgB,QAAO,CAAE;AAC9B,YAAMC,IAAe,MAAM,KAAKD,EAAe,iBAAiB,IAAIL,CAAc,GAAG,CAAC;AAKtF,aAJc,MAAM,KAAKJ,EAAQ,QAAQ,QAAQ,EACtB;AAAA,QACzB,CAACW,GAAGC,MAAMF,EAAa,QAAQC,EAAE,IAAI,OAAO,IAAID,EAAa,QAAQE,EAAE,IAAI,OAAO;AAAA,MACnF;AAAA,IAEF,GAAE,CAACZ,EAAQ,eAAeA,EAAQ,OAAO,CAAC;AAAA,EAE/C;AACE,SAAO;AAAA,IACL,EAAE,UAAUb,GAAoB,MAAMW,GAAgB,UAAUQ,EAAoB;AAAA,IACpFE;AAAA,IACAzB;AAAA,EACD;AACH;","x_google_ignoreList":[0]}
|
package/dist/index.es425.js
CHANGED
@@ -1,49 +1,11 @@
|
|
1
|
-
import
|
2
|
-
import
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
const m = s + "CollectionProvider", [A, E] = y(m), [N, f] = A(
|
8
|
-
m,
|
9
|
-
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
10
|
-
), p = (c) => {
|
11
|
-
const { scope: e, children: l } = c, o = r.useRef(null), t = r.useRef(/* @__PURE__ */ new Map()).current;
|
12
|
-
return /* @__PURE__ */ d.jsx(N, { scope: e, itemMap: t, collectionRef: o, children: l });
|
13
|
-
};
|
14
|
-
p.displayName = m;
|
15
|
-
const a = s + "CollectionSlot", _ = M(a), C = r.forwardRef(
|
16
|
-
(c, e) => {
|
17
|
-
const { scope: l, children: o } = c, t = f(a, l), n = S(e, t.collectionRef);
|
18
|
-
return /* @__PURE__ */ d.jsx(_, { ref: n, children: o });
|
19
|
-
}
|
20
|
-
);
|
21
|
-
C.displayName = a;
|
22
|
-
const u = s + "CollectionItemSlot", R = "data-radix-collection-item", T = M(u), x = r.forwardRef(
|
23
|
-
(c, e) => {
|
24
|
-
const { scope: l, children: o, ...t } = c, n = r.useRef(null), I = S(e, n), i = f(u, l);
|
25
|
-
return r.useEffect(() => (i.itemMap.set(n, { ref: n, ...t }), () => void i.itemMap.delete(n))), /* @__PURE__ */ d.jsx(T, { [R]: "", ref: I, children: o });
|
26
|
-
}
|
27
|
-
);
|
28
|
-
x.displayName = u;
|
29
|
-
function O(c) {
|
30
|
-
const e = f(s + "CollectionConsumer", c);
|
31
|
-
return r.useCallback(() => {
|
32
|
-
const o = e.collectionRef.current;
|
33
|
-
if (!o) return [];
|
34
|
-
const t = Array.from(o.querySelectorAll(`[${R}]`));
|
35
|
-
return Array.from(e.itemMap.values()).sort(
|
36
|
-
(i, v) => t.indexOf(i.ref.current) - t.indexOf(v.ref.current)
|
37
|
-
);
|
38
|
-
}, [e.collectionRef, e.itemMap]);
|
39
|
-
}
|
40
|
-
return [
|
41
|
-
{ Provider: p, Slot: C, ItemSlot: x },
|
42
|
-
O,
|
43
|
-
E
|
44
|
-
];
|
1
|
+
import * as t from "react";
|
2
|
+
import "./index.es209.js";
|
3
|
+
var r = t.createContext(void 0);
|
4
|
+
function n(o) {
|
5
|
+
const e = t.useContext(r);
|
6
|
+
return o || e || "ltr";
|
45
7
|
}
|
46
8
|
export {
|
47
|
-
|
9
|
+
n as useDirection
|
48
10
|
};
|
49
11
|
//# sourceMappingURL=index.es425.js.map
|
package/dist/index.es425.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es425.js","sources":["../node_modules/@radix-ui/react-
|
1
|
+
{"version":3,"file":"index.es425.js","sources":["../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DirectionContext","React","useDirection","localDir","globalDir"],"mappings":";;AAGA,IAAIA,IAAmBC,EAAM,cAAc,MAAM;AAKjD,SAASC,EAAaC,GAAU;AAC9B,QAAMC,IAAYH,EAAM,WAAWD,CAAgB;AACnD,SAAOG,KAAYC,KAAa;AAClC;","x_google_ignoreList":[0]}
|
package/dist/index.es426.js
CHANGED
@@ -1,11 +1,221 @@
|
|
1
|
-
import * as
|
2
|
-
import "./index.
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
import * as s from "react";
|
2
|
+
import { useFloating as xe, offset as Pe, shift as ye, flip as Ae, size as ve, arrow as Ce, hide as be, limitShift as Se } from "./index.es435.js";
|
3
|
+
import { Root as Oe } from "./index.es436.js";
|
4
|
+
import { useComposedRefs as T } from "./index.es380.js";
|
5
|
+
import { createContextScope as Re } from "./index.es381.js";
|
6
|
+
import { Primitive as z } from "./index.es383.js";
|
7
|
+
import { useCallbackRef as Ee } from "./index.es423.js";
|
8
|
+
import { useLayoutEffect as B } from "./index.es428.js";
|
9
|
+
import { useSize as Ne } from "./index.es391.js";
|
10
|
+
import { j as f } from "./index.es209.js";
|
11
|
+
import { autoUpdate as _e } from "./index.es437.js";
|
12
|
+
var N = "Popper", [L, Ue] = Re(N), [$e, Z] = L(N), U = (e) => {
|
13
|
+
const { __scopePopper: i, children: n } = e, [t, a] = s.useState(null);
|
14
|
+
return /* @__PURE__ */ f.jsx($e, { scope: i, anchor: t, onAnchorChange: a, children: n });
|
15
|
+
};
|
16
|
+
U.displayName = N;
|
17
|
+
var q = "PopperAnchor", G = s.forwardRef(
|
18
|
+
(e, i) => {
|
19
|
+
const { __scopePopper: n, virtualRef: t, ...a } = e, r = Z(q, n), o = s.useRef(null), w = T(i, o);
|
20
|
+
return s.useEffect(() => {
|
21
|
+
r.onAnchorChange((t == null ? void 0 : t.current) || o.current);
|
22
|
+
}), t ? null : /* @__PURE__ */ f.jsx(z.div, { ...a, ref: w });
|
23
|
+
}
|
24
|
+
);
|
25
|
+
G.displayName = q;
|
26
|
+
var _ = "PopperContent", [je, He] = L(_), J = s.forwardRef(
|
27
|
+
(e, i) => {
|
28
|
+
var I, Y, M, X, D, F;
|
29
|
+
const {
|
30
|
+
__scopePopper: n,
|
31
|
+
side: t = "bottom",
|
32
|
+
sideOffset: a = 0,
|
33
|
+
align: r = "center",
|
34
|
+
alignOffset: o = 0,
|
35
|
+
arrowPadding: w = 0,
|
36
|
+
avoidCollisions: p = !0,
|
37
|
+
collisionBoundary: c = [],
|
38
|
+
collisionPadding: x = 0,
|
39
|
+
sticky: m = "partial",
|
40
|
+
hideWhenDetached: y = !1,
|
41
|
+
updatePositionStrategy: A = "optimized",
|
42
|
+
onPlaced: l,
|
43
|
+
...d
|
44
|
+
} = e, v = Z(_, n), [h, C] = s.useState(null), ee = T(i, (P) => C(P)), [E, te] = s.useState(null), g = Ne(E), re = (g == null ? void 0 : g.width) ?? 0, $ = (g == null ? void 0 : g.height) ?? 0, oe = t + (r !== "center" ? "-" + r : ""), ne = typeof x == "number" ? x : { top: 0, right: 0, bottom: 0, left: 0, ...x }, j = Array.isArray(c) ? c : [c], ae = j.length > 0, b = {
|
45
|
+
padding: ne,
|
46
|
+
boundary: j.filter(Ie),
|
47
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
48
|
+
altBoundary: ae
|
49
|
+
}, { refs: ie, floatingStyles: H, placement: se, isPositioned: S, middlewareData: u } = xe({
|
50
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
51
|
+
strategy: "fixed",
|
52
|
+
placement: oe,
|
53
|
+
whileElementsMounted: (...P) => _e(...P, {
|
54
|
+
animationFrame: A === "always"
|
55
|
+
}),
|
56
|
+
elements: {
|
57
|
+
reference: v.anchor
|
58
|
+
},
|
59
|
+
middleware: [
|
60
|
+
Pe({ mainAxis: a + $, alignmentAxis: o }),
|
61
|
+
p && ye({
|
62
|
+
mainAxis: !0,
|
63
|
+
crossAxis: !1,
|
64
|
+
limiter: m === "partial" ? Se() : void 0,
|
65
|
+
...b
|
66
|
+
}),
|
67
|
+
p && Ae({ ...b }),
|
68
|
+
ve({
|
69
|
+
...b,
|
70
|
+
apply: ({ elements: P, rects: k, availableWidth: he, availableHeight: ge }) => {
|
71
|
+
const { width: ue, height: we } = k.reference, R = P.floating.style;
|
72
|
+
R.setProperty("--radix-popper-available-width", `${he}px`), R.setProperty("--radix-popper-available-height", `${ge}px`), R.setProperty("--radix-popper-anchor-width", `${ue}px`), R.setProperty("--radix-popper-anchor-height", `${we}px`);
|
73
|
+
}
|
74
|
+
}),
|
75
|
+
E && Ce({ element: E, padding: w }),
|
76
|
+
Ye({ arrowWidth: re, arrowHeight: $ }),
|
77
|
+
y && be({ strategy: "referenceHidden", ...b })
|
78
|
+
]
|
79
|
+
}), [W, pe] = V(se), O = Ee(l);
|
80
|
+
B(() => {
|
81
|
+
S && (O == null || O());
|
82
|
+
}, [S, O]);
|
83
|
+
const ce = (I = u.arrow) == null ? void 0 : I.x, de = (Y = u.arrow) == null ? void 0 : Y.y, le = ((M = u.arrow) == null ? void 0 : M.centerOffset) !== 0, [fe, me] = s.useState();
|
84
|
+
return B(() => {
|
85
|
+
h && me(window.getComputedStyle(h).zIndex);
|
86
|
+
}, [h]), /* @__PURE__ */ f.jsx(
|
87
|
+
"div",
|
88
|
+
{
|
89
|
+
ref: ie.setFloating,
|
90
|
+
"data-radix-popper-content-wrapper": "",
|
91
|
+
style: {
|
92
|
+
...H,
|
93
|
+
transform: S ? H.transform : "translate(0, -200%)",
|
94
|
+
// keep off the page when measuring
|
95
|
+
minWidth: "max-content",
|
96
|
+
zIndex: fe,
|
97
|
+
"--radix-popper-transform-origin": [
|
98
|
+
(X = u.transformOrigin) == null ? void 0 : X.x,
|
99
|
+
(D = u.transformOrigin) == null ? void 0 : D.y
|
100
|
+
].join(" "),
|
101
|
+
// hide the content if using the hide middleware and should be hidden
|
102
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
103
|
+
// as if the PopperContent isn't there at all
|
104
|
+
...((F = u.hide) == null ? void 0 : F.referenceHidden) && {
|
105
|
+
visibility: "hidden",
|
106
|
+
pointerEvents: "none"
|
107
|
+
}
|
108
|
+
},
|
109
|
+
dir: e.dir,
|
110
|
+
children: /* @__PURE__ */ f.jsx(
|
111
|
+
je,
|
112
|
+
{
|
113
|
+
scope: n,
|
114
|
+
placedSide: W,
|
115
|
+
onArrowChange: te,
|
116
|
+
arrowX: ce,
|
117
|
+
arrowY: de,
|
118
|
+
shouldHideArrow: le,
|
119
|
+
children: /* @__PURE__ */ f.jsx(
|
120
|
+
z.div,
|
121
|
+
{
|
122
|
+
"data-side": W,
|
123
|
+
"data-align": pe,
|
124
|
+
...d,
|
125
|
+
ref: ee,
|
126
|
+
style: {
|
127
|
+
...d.style,
|
128
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
129
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
130
|
+
animation: S ? void 0 : "none"
|
131
|
+
}
|
132
|
+
}
|
133
|
+
)
|
134
|
+
}
|
135
|
+
)
|
136
|
+
}
|
137
|
+
);
|
138
|
+
}
|
139
|
+
);
|
140
|
+
J.displayName = _;
|
141
|
+
var K = "PopperArrow", We = {
|
142
|
+
top: "bottom",
|
143
|
+
right: "left",
|
144
|
+
bottom: "top",
|
145
|
+
left: "right"
|
146
|
+
}, Q = s.forwardRef(function(i, n) {
|
147
|
+
const { __scopePopper: t, ...a } = i, r = He(K, t), o = We[r.placedSide];
|
148
|
+
return (
|
149
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
150
|
+
// doesn't report size as we'd expect on SVG elements.
|
151
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
152
|
+
/* @__PURE__ */ f.jsx(
|
153
|
+
"span",
|
154
|
+
{
|
155
|
+
ref: r.onArrowChange,
|
156
|
+
style: {
|
157
|
+
position: "absolute",
|
158
|
+
left: r.arrowX,
|
159
|
+
top: r.arrowY,
|
160
|
+
[o]: 0,
|
161
|
+
transformOrigin: {
|
162
|
+
top: "",
|
163
|
+
right: "0 0",
|
164
|
+
bottom: "center 0",
|
165
|
+
left: "100% 0"
|
166
|
+
}[r.placedSide],
|
167
|
+
transform: {
|
168
|
+
top: "translateY(100%)",
|
169
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
170
|
+
bottom: "rotate(180deg)",
|
171
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
172
|
+
}[r.placedSide],
|
173
|
+
visibility: r.shouldHideArrow ? "hidden" : void 0
|
174
|
+
},
|
175
|
+
children: /* @__PURE__ */ f.jsx(
|
176
|
+
Oe,
|
177
|
+
{
|
178
|
+
...a,
|
179
|
+
ref: n,
|
180
|
+
style: {
|
181
|
+
...a.style,
|
182
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
183
|
+
display: "block"
|
184
|
+
}
|
185
|
+
}
|
186
|
+
)
|
187
|
+
}
|
188
|
+
)
|
189
|
+
);
|
190
|
+
});
|
191
|
+
Q.displayName = K;
|
192
|
+
function Ie(e) {
|
193
|
+
return e !== null;
|
194
|
+
}
|
195
|
+
var Ye = (e) => ({
|
196
|
+
name: "transformOrigin",
|
197
|
+
options: e,
|
198
|
+
fn(i) {
|
199
|
+
var v, h, C;
|
200
|
+
const { placement: n, rects: t, middlewareData: a } = i, o = ((v = a.arrow) == null ? void 0 : v.centerOffset) !== 0, w = o ? 0 : e.arrowWidth, p = o ? 0 : e.arrowHeight, [c, x] = V(n), m = { start: "0%", center: "50%", end: "100%" }[x], y = (((h = a.arrow) == null ? void 0 : h.x) ?? 0) + w / 2, A = (((C = a.arrow) == null ? void 0 : C.y) ?? 0) + p / 2;
|
201
|
+
let l = "", d = "";
|
202
|
+
return c === "bottom" ? (l = o ? m : `${y}px`, d = `${-p}px`) : c === "top" ? (l = o ? m : `${y}px`, d = `${t.floating.height + p}px`) : c === "right" ? (l = `${-p}px`, d = o ? m : `${A}px`) : c === "left" && (l = `${t.floating.width + p}px`, d = o ? m : `${A}px`), { data: { x: l, y: d } };
|
203
|
+
}
|
204
|
+
});
|
205
|
+
function V(e) {
|
206
|
+
const [i, n = "center"] = e.split("-");
|
207
|
+
return [i, n];
|
7
208
|
}
|
209
|
+
var qe = U, Ge = G, Je = J, Ke = Q;
|
8
210
|
export {
|
9
|
-
|
211
|
+
Ge as Anchor,
|
212
|
+
Ke as Arrow,
|
213
|
+
Je as Content,
|
214
|
+
U as Popper,
|
215
|
+
G as PopperAnchor,
|
216
|
+
Q as PopperArrow,
|
217
|
+
J as PopperContent,
|
218
|
+
qe as Root,
|
219
|
+
Ue as createPopperScope
|
10
220
|
};
|
11
221
|
//# sourceMappingURL=index.es426.js.map
|
package/dist/index.es426.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.es426.js","sources":["../node_modules/@radix-ui/react-direction/dist/index.mjs"],"sourcesContent":["// packages/react/direction/src/direction.tsx\nimport * as React from \"react\";\nimport { jsx } from \"react/jsx-runtime\";\nvar DirectionContext = React.createContext(void 0);\nvar DirectionProvider = (props) => {\n const { dir, children } = props;\n return /* @__PURE__ */ jsx(DirectionContext.Provider, { value: dir, children });\n};\nfunction useDirection(localDir) {\n const globalDir = React.useContext(DirectionContext);\n return localDir || globalDir || \"ltr\";\n}\nvar Provider = DirectionProvider;\nexport {\n DirectionProvider,\n Provider,\n useDirection\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["DirectionContext","React","useDirection","localDir","globalDir"],"mappings":";;AAGA,IAAIA,IAAmBC,EAAM,cAAc,MAAM;AAKjD,SAASC,EAAaC,GAAU;AAC9B,QAAMC,IAAYH,EAAM,WAAWD,CAAgB;AACnD,SAAOG,KAAYC,KAAa;AAClC;","x_google_ignoreList":[0]}
|
1
|
+
{"version":3,"file":"index.es426.js","sources":["../node_modules/@radix-ui/react-popper/dist/index.mjs"],"sourcesContent":["\"use client\";\n\n// packages/react/popper/src/popper.tsx\nimport * as React from \"react\";\nimport {\n useFloating,\n autoUpdate,\n offset,\n shift,\n limitShift,\n hide,\n arrow as floatingUIarrow,\n flip,\n size\n} from \"@floating-ui/react-dom\";\nimport * as ArrowPrimitive from \"@radix-ui/react-arrow\";\nimport { useComposedRefs } from \"@radix-ui/react-compose-refs\";\nimport { createContextScope } from \"@radix-ui/react-context\";\nimport { Primitive } from \"@radix-ui/react-primitive\";\nimport { useCallbackRef } from \"@radix-ui/react-use-callback-ref\";\nimport { useLayoutEffect } from \"@radix-ui/react-use-layout-effect\";\nimport { useSize } from \"@radix-ui/react-use-size\";\nimport { jsx } from \"react/jsx-runtime\";\nvar SIDE_OPTIONS = [\"top\", \"right\", \"bottom\", \"left\"];\nvar ALIGN_OPTIONS = [\"start\", \"center\", \"end\"];\nvar POPPER_NAME = \"Popper\";\nvar [createPopperContext, createPopperScope] = createContextScope(POPPER_NAME);\nvar [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);\nvar Popper = (props) => {\n const { __scopePopper, children } = props;\n const [anchor, setAnchor] = React.useState(null);\n return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });\n};\nPopper.displayName = POPPER_NAME;\nvar ANCHOR_NAME = \"PopperAnchor\";\nvar PopperAnchor = React.forwardRef(\n (props, forwardedRef) => {\n const { __scopePopper, virtualRef, ...anchorProps } = props;\n const context = usePopperContext(ANCHOR_NAME, __scopePopper);\n const ref = React.useRef(null);\n const composedRefs = useComposedRefs(forwardedRef, ref);\n React.useEffect(() => {\n context.onAnchorChange(virtualRef?.current || ref.current);\n });\n return virtualRef ? null : /* @__PURE__ */ jsx(Primitive.div, { ...anchorProps, ref: composedRefs });\n }\n);\nPopperAnchor.displayName = ANCHOR_NAME;\nvar CONTENT_NAME = \"PopperContent\";\nvar [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME);\nvar PopperContent = React.forwardRef(\n (props, forwardedRef) => {\n const {\n __scopePopper,\n side = \"bottom\",\n sideOffset = 0,\n align = \"center\",\n alignOffset = 0,\n arrowPadding = 0,\n avoidCollisions = true,\n collisionBoundary = [],\n collisionPadding: collisionPaddingProp = 0,\n sticky = \"partial\",\n hideWhenDetached = false,\n updatePositionStrategy = \"optimized\",\n onPlaced,\n ...contentProps\n } = props;\n const context = usePopperContext(CONTENT_NAME, __scopePopper);\n const [content, setContent] = React.useState(null);\n const composedRefs = useComposedRefs(forwardedRef, (node) => setContent(node));\n const [arrow, setArrow] = React.useState(null);\n const arrowSize = useSize(arrow);\n const arrowWidth = arrowSize?.width ?? 0;\n const arrowHeight = arrowSize?.height ?? 0;\n const desiredPlacement = side + (align !== \"center\" ? \"-\" + align : \"\");\n const collisionPadding = typeof collisionPaddingProp === \"number\" ? collisionPaddingProp : { top: 0, right: 0, bottom: 0, left: 0, ...collisionPaddingProp };\n const boundary = Array.isArray(collisionBoundary) ? collisionBoundary : [collisionBoundary];\n const hasExplicitBoundaries = boundary.length > 0;\n const detectOverflowOptions = {\n padding: collisionPadding,\n boundary: boundary.filter(isNotNull),\n // with `strategy: 'fixed'`, this is the only way to get it to respect boundaries\n altBoundary: hasExplicitBoundaries\n };\n const { refs, floatingStyles, placement, isPositioned, middlewareData } = useFloating({\n // default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues\n strategy: \"fixed\",\n placement: desiredPlacement,\n whileElementsMounted: (...args) => {\n const cleanup = autoUpdate(...args, {\n animationFrame: updatePositionStrategy === \"always\"\n });\n return cleanup;\n },\n elements: {\n reference: context.anchor\n },\n middleware: [\n offset({ mainAxis: sideOffset + arrowHeight, alignmentAxis: alignOffset }),\n avoidCollisions && shift({\n mainAxis: true,\n crossAxis: false,\n limiter: sticky === \"partial\" ? limitShift() : void 0,\n ...detectOverflowOptions\n }),\n avoidCollisions && flip({ ...detectOverflowOptions }),\n size({\n ...detectOverflowOptions,\n apply: ({ elements, rects, availableWidth, availableHeight }) => {\n const { width: anchorWidth, height: anchorHeight } = rects.reference;\n const contentStyle = elements.floating.style;\n contentStyle.setProperty(\"--radix-popper-available-width\", `${availableWidth}px`);\n contentStyle.setProperty(\"--radix-popper-available-height\", `${availableHeight}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-width\", `${anchorWidth}px`);\n contentStyle.setProperty(\"--radix-popper-anchor-height\", `${anchorHeight}px`);\n }\n }),\n arrow && floatingUIarrow({ element: arrow, padding: arrowPadding }),\n transformOrigin({ arrowWidth, arrowHeight }),\n hideWhenDetached && hide({ strategy: \"referenceHidden\", ...detectOverflowOptions })\n ]\n });\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const handlePlaced = useCallbackRef(onPlaced);\n useLayoutEffect(() => {\n if (isPositioned) {\n handlePlaced?.();\n }\n }, [isPositioned, handlePlaced]);\n const arrowX = middlewareData.arrow?.x;\n const arrowY = middlewareData.arrow?.y;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const [contentZIndex, setContentZIndex] = React.useState();\n useLayoutEffect(() => {\n if (content) setContentZIndex(window.getComputedStyle(content).zIndex);\n }, [content]);\n return /* @__PURE__ */ jsx(\n \"div\",\n {\n ref: refs.setFloating,\n \"data-radix-popper-content-wrapper\": \"\",\n style: {\n ...floatingStyles,\n transform: isPositioned ? floatingStyles.transform : \"translate(0, -200%)\",\n // keep off the page when measuring\n minWidth: \"max-content\",\n zIndex: contentZIndex,\n [\"--radix-popper-transform-origin\"]: [\n middlewareData.transformOrigin?.x,\n middlewareData.transformOrigin?.y\n ].join(\" \"),\n // hide the content if using the hide middleware and should be hidden\n // set visibility to hidden and disable pointer events so the UI behaves\n // as if the PopperContent isn't there at all\n ...middlewareData.hide?.referenceHidden && {\n visibility: \"hidden\",\n pointerEvents: \"none\"\n }\n },\n dir: props.dir,\n children: /* @__PURE__ */ jsx(\n PopperContentProvider,\n {\n scope: __scopePopper,\n placedSide,\n onArrowChange: setArrow,\n arrowX,\n arrowY,\n shouldHideArrow: cannotCenterArrow,\n children: /* @__PURE__ */ jsx(\n Primitive.div,\n {\n \"data-side\": placedSide,\n \"data-align\": placedAlign,\n ...contentProps,\n ref: composedRefs,\n style: {\n ...contentProps.style,\n // if the PopperContent hasn't been placed yet (not all measurements done)\n // we prevent animations so that users's animation don't kick in too early referring wrong sides\n animation: !isPositioned ? \"none\" : void 0\n }\n }\n )\n }\n )\n }\n );\n }\n);\nPopperContent.displayName = CONTENT_NAME;\nvar ARROW_NAME = \"PopperArrow\";\nvar OPPOSITE_SIDE = {\n top: \"bottom\",\n right: \"left\",\n bottom: \"top\",\n left: \"right\"\n};\nvar PopperArrow = React.forwardRef(function PopperArrow2(props, forwardedRef) {\n const { __scopePopper, ...arrowProps } = props;\n const contentContext = useContentContext(ARROW_NAME, __scopePopper);\n const baseSide = OPPOSITE_SIDE[contentContext.placedSide];\n return (\n // we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)\n // doesn't report size as we'd expect on SVG elements.\n // it reports their bounding box which is effectively the largest path inside the SVG.\n /* @__PURE__ */ jsx(\n \"span\",\n {\n ref: contentContext.onArrowChange,\n style: {\n position: \"absolute\",\n left: contentContext.arrowX,\n top: contentContext.arrowY,\n [baseSide]: 0,\n transformOrigin: {\n top: \"\",\n right: \"0 0\",\n bottom: \"center 0\",\n left: \"100% 0\"\n }[contentContext.placedSide],\n transform: {\n top: \"translateY(100%)\",\n right: \"translateY(50%) rotate(90deg) translateX(-50%)\",\n bottom: `rotate(180deg)`,\n left: \"translateY(50%) rotate(-90deg) translateX(50%)\"\n }[contentContext.placedSide],\n visibility: contentContext.shouldHideArrow ? \"hidden\" : void 0\n },\n children: /* @__PURE__ */ jsx(\n ArrowPrimitive.Root,\n {\n ...arrowProps,\n ref: forwardedRef,\n style: {\n ...arrowProps.style,\n // ensures the element can be measured correctly (mostly for if SVG)\n display: \"block\"\n }\n }\n )\n }\n )\n );\n});\nPopperArrow.displayName = ARROW_NAME;\nfunction isNotNull(value) {\n return value !== null;\n}\nvar transformOrigin = (options) => ({\n name: \"transformOrigin\",\n options,\n fn(data) {\n const { placement, rects, middlewareData } = data;\n const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;\n const isArrowHidden = cannotCenterArrow;\n const arrowWidth = isArrowHidden ? 0 : options.arrowWidth;\n const arrowHeight = isArrowHidden ? 0 : options.arrowHeight;\n const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);\n const noArrowAlign = { start: \"0%\", center: \"50%\", end: \"100%\" }[placedAlign];\n const arrowXCenter = (middlewareData.arrow?.x ?? 0) + arrowWidth / 2;\n const arrowYCenter = (middlewareData.arrow?.y ?? 0) + arrowHeight / 2;\n let x = \"\";\n let y = \"\";\n if (placedSide === \"bottom\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${-arrowHeight}px`;\n } else if (placedSide === \"top\") {\n x = isArrowHidden ? noArrowAlign : `${arrowXCenter}px`;\n y = `${rects.floating.height + arrowHeight}px`;\n } else if (placedSide === \"right\") {\n x = `${-arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n } else if (placedSide === \"left\") {\n x = `${rects.floating.width + arrowHeight}px`;\n y = isArrowHidden ? noArrowAlign : `${arrowYCenter}px`;\n }\n return { data: { x, y } };\n }\n});\nfunction getSideAndAlignFromPlacement(placement) {\n const [side, align = \"center\"] = placement.split(\"-\");\n return [side, align];\n}\nvar Root2 = Popper;\nvar Anchor = PopperAnchor;\nvar Content = PopperContent;\nvar Arrow = PopperArrow;\nexport {\n ALIGN_OPTIONS,\n Anchor,\n Arrow,\n Content,\n Popper,\n PopperAnchor,\n PopperArrow,\n PopperContent,\n Root2 as Root,\n SIDE_OPTIONS,\n createPopperScope\n};\n//# sourceMappingURL=index.mjs.map\n"],"names":["POPPER_NAME","createPopperContext","createPopperScope","createContextScope","PopperProvider","usePopperContext","Popper","props","__scopePopper","children","anchor","setAnchor","React","jsx","ANCHOR_NAME","PopperAnchor","forwardedRef","virtualRef","anchorProps","context","ref","composedRefs","useComposedRefs","Primitive","CONTENT_NAME","PopperContentProvider","useContentContext","PopperContent","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPaddingProp","sticky","hideWhenDetached","updatePositionStrategy","onPlaced","contentProps","content","setContent","node","arrow","setArrow","arrowSize","useSize","arrowWidth","arrowHeight","desiredPlacement","collisionPadding","boundary","hasExplicitBoundaries","detectOverflowOptions","isNotNull","refs","floatingStyles","placement","isPositioned","middlewareData","useFloating","args","autoUpdate","offset","shift","limitShift","flip","size","elements","rects","availableWidth","availableHeight","anchorWidth","anchorHeight","contentStyle","floatingUIarrow","transformOrigin","hide","placedSide","placedAlign","getSideAndAlignFromPlacement","handlePlaced","useCallbackRef","useLayoutEffect","arrowX","_a","arrowY","_b","cannotCenterArrow","_c","contentZIndex","setContentZIndex","_d","_e","_f","ARROW_NAME","OPPOSITE_SIDE","PopperArrow","arrowProps","contentContext","baseSide","ArrowPrimitive.Root","value","options","data","isArrowHidden","noArrowAlign","arrowXCenter","arrowYCenter","x","y","Root2","Anchor","Content","Arrow"],"mappings":";;;;;;;;;;;AAyBA,IAAIA,IAAc,UACd,CAACC,GAAqBC,EAAiB,IAAIC,GAAmBH,CAAW,GACzE,CAACI,IAAgBC,CAAgB,IAAIJ,EAAoBD,CAAW,GACpEM,IAAS,CAACC,MAAU;AACtB,QAAM,EAAE,eAAAC,GAAe,UAAAC,EAAQ,IAAKF,GAC9B,CAACG,GAAQC,CAAS,IAAIC,EAAM,SAAS,IAAI;AAC/C,SAAuBC,gBAAAA,EAAG,IAACT,IAAgB,EAAE,OAAOI,GAAe,QAAAE,GAAQ,gBAAgBC,GAAW,UAAAF,GAAU;AAClH;AACAH,EAAO,cAAcN;AACrB,IAAIc,IAAc,gBACdC,IAAeH,EAAM;AAAA,EACvB,CAACL,GAAOS,MAAiB;AACvB,UAAM,EAAE,eAAAR,GAAe,YAAAS,GAAY,GAAGC,EAAa,IAAGX,GA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