@drjoshcsimmons/scl 0.1.14 → 0.2.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/LICENSE +1 -1
- package/dist/components/ui/accordion/accordion.d.ts +1 -1
- package/dist/components/ui/accordion/accordion.d.ts.map +1 -1
- package/dist/components/ui/accordion/index.d.ts +1 -1
- package/dist/components/ui/accordion/index.d.ts.map +1 -1
- package/dist/components/ui/alert/alert.d.ts.map +1 -1
- package/dist/components/ui/alert/index.d.ts +1 -1
- package/dist/components/ui/alert/index.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts +2 -2
- package/dist/components/ui/alert-dialog/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/alert-dialog/index.d.ts +1 -1
- package/dist/components/ui/alert-dialog/index.d.ts.map +1 -1
- package/dist/components/ui/avatar/avatar.d.ts +1 -1
- package/dist/components/ui/avatar/avatar.d.ts.map +1 -1
- package/dist/components/ui/avatar/index.d.ts +1 -1
- package/dist/components/ui/avatar/index.d.ts.map +1 -1
- package/dist/components/ui/badge/badge.d.ts +1 -1
- package/dist/components/ui/badge/badge.d.ts.map +1 -1
- package/dist/components/ui/badge/index.d.ts +1 -1
- package/dist/components/ui/badge/index.d.ts.map +1 -1
- package/dist/components/ui/button/button.d.ts.map +1 -1
- package/dist/components/ui/button/index.d.ts +1 -1
- package/dist/components/ui/button/index.d.ts.map +1 -1
- package/dist/components/ui/card/card.d.ts.map +1 -1
- package/dist/components/ui/card/index.d.ts +1 -1
- package/dist/components/ui/card/index.d.ts.map +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts +1 -1
- package/dist/components/ui/checkbox/checkbox.d.ts.map +1 -1
- package/dist/components/ui/checkbox/index.d.ts.map +1 -1
- package/dist/components/ui/collapsible/collapsible.d.ts.map +1 -1
- package/dist/components/ui/collapsible/index.d.ts +1 -1
- package/dist/components/ui/collapsible/index.d.ts.map +1 -1
- package/dist/components/ui/combobox/combobox.d.ts.map +1 -1
- package/dist/components/ui/combobox/index.d.ts +1 -1
- package/dist/components/ui/combobox/index.d.ts.map +1 -1
- package/dist/components/ui/command/command.d.ts.map +1 -1
- package/dist/components/ui/command/index.d.ts +1 -1
- package/dist/components/ui/command/index.d.ts.map +1 -1
- package/dist/components/ui/dialog/dialog.d.ts +1 -1
- package/dist/components/ui/dialog/dialog.d.ts.map +1 -1
- package/dist/components/ui/dialog/index.d.ts +1 -1
- package/dist/components/ui/dialog/index.d.ts.map +1 -1
- package/dist/components/ui/dithered-image/dithered-image.d.ts.map +1 -1
- package/dist/components/ui/dithered-image/index.d.ts +1 -1
- package/dist/components/ui/dithered-image/index.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts +1 -1
- package/dist/components/ui/dropdown-menu/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +1 -1
- package/dist/components/ui/dropdown-menu/index.d.ts.map +1 -1
- package/dist/components/ui/form/form.d.ts +1 -1
- package/dist/components/ui/form/form.d.ts.map +1 -1
- package/dist/components/ui/form/index.d.ts +1 -1
- package/dist/components/ui/form/index.d.ts.map +1 -1
- package/dist/components/ui/input/index.d.ts.map +1 -1
- package/dist/components/ui/input/input.d.ts.map +1 -1
- package/dist/components/ui/label/index.d.ts.map +1 -1
- package/dist/components/ui/label/label.d.ts +1 -1
- package/dist/components/ui/label/label.d.ts.map +1 -1
- package/dist/components/ui/popover/index.d.ts +1 -1
- package/dist/components/ui/popover/index.d.ts.map +1 -1
- package/dist/components/ui/popover/popover.d.ts +1 -1
- package/dist/components/ui/popover/popover.d.ts.map +1 -1
- package/dist/components/ui/progress/index.d.ts.map +1 -1
- package/dist/components/ui/progress/progress.d.ts +1 -1
- package/dist/components/ui/progress/progress.d.ts.map +1 -1
- package/dist/components/ui/radio-group/index.d.ts.map +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts +1 -1
- package/dist/components/ui/radio-group/radio-group.d.ts.map +1 -1
- package/dist/components/ui/scroll-area/index.d.ts.map +1 -1
- package/dist/components/ui/scroll-area/scroll-area.d.ts +1 -1
- package/dist/components/ui/scroll-area/scroll-area.d.ts.map +1 -1
- package/dist/components/ui/select/index.d.ts +1 -1
- package/dist/components/ui/select/index.d.ts.map +1 -1
- package/dist/components/ui/select/select.d.ts +1 -1
- package/dist/components/ui/select/select.d.ts.map +1 -1
- package/dist/components/ui/separator/index.d.ts.map +1 -1
- package/dist/components/ui/separator/separator.d.ts +1 -1
- package/dist/components/ui/separator/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet/index.d.ts +1 -1
- package/dist/components/ui/sheet/index.d.ts.map +1 -1
- package/dist/components/ui/sheet/sheet.d.ts +2 -2
- package/dist/components/ui/sheet/sheet.d.ts.map +1 -1
- package/dist/components/ui/skeleton/index.d.ts.map +1 -1
- package/dist/components/ui/skeleton/skeleton.d.ts.map +1 -1
- package/dist/components/ui/slider/index.d.ts.map +1 -1
- package/dist/components/ui/slider/slider.d.ts +1 -1
- package/dist/components/ui/slider/slider.d.ts.map +1 -1
- package/dist/components/ui/statusline/index.d.ts.map +1 -1
- package/dist/components/ui/statusline/statusline.d.ts.map +1 -1
- package/dist/components/ui/switch/index.d.ts.map +1 -1
- package/dist/components/ui/switch/switch.d.ts +1 -1
- package/dist/components/ui/switch/switch.d.ts.map +1 -1
- package/dist/components/ui/table/index.d.ts +1 -1
- package/dist/components/ui/table/index.d.ts.map +1 -1
- package/dist/components/ui/table/table.d.ts +1 -1
- package/dist/components/ui/table/table.d.ts.map +1 -1
- package/dist/components/ui/tabs/index.d.ts +1 -1
- package/dist/components/ui/tabs/index.d.ts.map +1 -1
- package/dist/components/ui/tabs/tabs.d.ts +1 -1
- package/dist/components/ui/tabs/tabs.d.ts.map +1 -1
- package/dist/components/ui/terminal-textarea/index.d.ts.map +1 -1
- package/dist/components/ui/terminal-textarea/terminal-textarea.d.ts.map +1 -1
- package/dist/components/ui/textarea/index.d.ts.map +1 -1
- package/dist/components/ui/textarea/textarea.d.ts.map +1 -1
- package/dist/components/ui/toggle/index.d.ts.map +1 -1
- package/dist/components/ui/toggle/toggle.d.ts +1 -1
- package/dist/components/ui/toggle/toggle.d.ts.map +1 -1
- package/dist/components/ui/tooltip/index.d.ts +1 -1
- package/dist/components/ui/tooltip/index.d.ts.map +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts +1 -1
- package/dist/components/ui/tooltip/tooltip.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -12
- package/dist/index10.js +42 -44
- package/dist/index100.js +4 -13
- package/dist/index101.js +30 -9
- package/dist/index102.js +13 -30
- package/dist/index103.js +649 -3
- package/dist/index104.js +30 -25
- package/dist/index105.js +3 -5
- package/dist/index106.js +44 -51
- package/dist/index107.js +30 -30
- package/dist/index108.js +55 -30
- package/dist/index109.js +29 -47
- package/dist/index11.js +5 -11
- package/dist/index110.js +44 -646
- package/dist/index113.js +47 -11
- package/dist/index114.js +42 -200
- package/dist/index115.js +12 -22
- package/dist/index116.js +194 -388
- package/dist/index117.js +21 -47
- package/dist/index118.js +392 -40
- package/dist/index119.js +6 -21
- package/dist/index12.js +2 -2
- package/dist/index120.js +48 -9
- package/dist/index121.js +15 -32
- package/dist/index122.js +3 -12
- package/dist/index123.js +38 -6
- package/dist/index124.js +18 -48
- package/dist/index126.js +3 -3
- package/dist/index127.js +3 -3
- package/dist/index129.js +1 -1
- package/dist/index13.js +2 -2
- package/dist/index130.js +1 -1
- package/dist/index131.js +2 -5
- package/dist/index132.js +2 -3
- package/dist/index133.js +5 -24
- package/dist/index134.js +3 -113
- package/dist/index135.js +23 -15
- package/dist/index136.js +107 -519
- package/dist/index137.js +14 -126
- package/dist/index138.js +516 -125
- package/dist/index139.js +128 -2
- package/dist/index14.js +4 -13
- package/dist/index140.js +134 -2
- package/dist/index141.js +65 -69
- package/dist/index142.js +68 -8
- package/dist/index143.js +9 -14
- package/dist/index144.js +14 -66
- package/dist/index145.js +65 -64
- package/dist/index15.js +43 -67
- package/dist/index16.js +3 -30
- package/dist/index17.js +75 -80
- package/dist/index18.js +11 -13
- package/dist/index19.js +4 -4
- package/dist/index20.js +5 -12
- package/dist/index21.js +15 -15
- package/dist/index22.js +21 -24
- package/dist/index23.js +7 -14
- package/dist/index24.js +11 -11
- package/dist/index25.js +66 -72
- package/dist/index26.js +15 -17
- package/dist/index27.js +57 -51
- package/dist/index28.js +2 -10
- package/dist/index29.js +9 -12
- package/dist/index3.js +18 -18
- package/dist/index30.js +27 -60
- package/dist/index31.js +15 -15
- package/dist/index32.js +24 -47
- package/dist/index33.js +16 -16
- package/dist/index34.js +1 -4
- package/dist/index36.js +11 -11
- package/dist/index37.js +21 -18
- package/dist/index38.js +99 -38
- package/dist/index39.js +37 -64
- package/dist/index4.js +24 -31
- package/dist/index40.js +10 -48
- package/dist/index41.js +48 -99
- package/dist/index42.js +65 -10
- package/dist/index45.js +237 -33
- package/dist/index46.js +11 -241
- package/dist/index47.js +33 -237
- package/dist/index48.js +241 -11
- package/dist/index49.js +16 -258
- package/dist/index5.js +13 -26
- package/dist/index50.js +125 -12
- package/dist/index51.js +25 -524
- package/dist/index52.js +71 -20
- package/dist/index53.js +206 -131
- package/dist/index54.js +11 -73
- package/dist/index55.js +54 -330
- package/dist/index56.js +249 -231
- package/dist/index57.js +225 -11
- package/dist/index58.js +9 -82
- package/dist/index59.js +11 -249
- package/dist/index6.js +66 -36
- package/dist/index60.js +130 -9
- package/dist/index61.js +21 -129
- package/dist/index62.js +860 -18
- package/dist/index63.js +9 -860
- package/dist/index64.js +82 -9
- package/dist/index65.js +256 -27
- package/dist/index66.js +12 -435
- package/dist/index67.js +244 -55
- package/dist/index68.js +7 -7
- package/dist/index69.js +511 -206
- package/dist/index7.js +5 -5
- package/dist/index70.js +5 -4
- package/dist/index71.js +435 -12
- package/dist/index72.js +318 -107
- package/dist/index73.js +3 -3
- package/dist/index74.js +1 -1
- package/dist/index75.js +156 -249
- package/dist/index76.js +66 -5
- package/dist/index77.js +44 -25
- package/dist/index78.js +23 -64
- package/dist/index79.js +5 -123
- package/dist/index8.js +5 -5
- package/dist/index80.js +50 -13
- package/dist/index81.js +32 -133
- package/dist/index82.js +1 -1
- package/dist/index83.js +7 -218
- package/dist/index84.js +124 -13
- package/dist/index85.js +13 -67
- package/dist/index86.js +133 -32
- package/dist/index87.js +216 -45
- package/dist/index88.js +14 -52
- package/dist/index89.js +66 -47
- package/dist/index9.js +19 -26
- package/dist/index90.js +48 -9
- package/dist/index91.js +49 -45
- package/dist/index92.js +9 -8
- package/dist/index93.js +29 -47
- package/dist/index94.js +9 -30
- package/dist/index95.js +8 -8
- package/dist/index96.js +24 -54
- package/dist/index97.js +5 -10
- package/dist/index98.js +55 -4
- package/dist/index99.js +11 -30
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/tokens/animations.d.ts.map +1 -1
- package/dist/tokens/colors.d.ts.map +1 -1
- package/dist/tokens/index.d.ts +3 -3
- package/dist/tokens/index.d.ts.map +1 -1
- package/dist/tokens/shadows.d.ts.map +1 -1
- package/dist/tokens/spacing.d.ts.map +1 -1
- package/dist/tokens/typography.d.ts.map +1 -1
- package/package.json +19 -9
package/dist/index84.js
CHANGED
|
@@ -1,16 +1,127 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { Primitive as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
import * as n from "react";
|
|
2
|
+
import { composeEventHandlers as m } from "./index79.js";
|
|
3
|
+
import { Primitive as g, dispatchDiscreteCustomEvent as k } from "./index81.js";
|
|
4
|
+
import { useComposedRefs as R } from "./index78.js";
|
|
5
|
+
import { useCallbackRef as w } from "./index99.js";
|
|
6
|
+
import { useEscapeKeydown as U } from "./index115.js";
|
|
7
|
+
import { jsx as T } from "react/jsx-runtime";
|
|
8
|
+
var z = "DismissableLayer", y = "dismissableLayer.update", H = "dismissableLayer.pointerDownOutside", M = "dismissableLayer.focusOutside", L, B = n.createContext({
|
|
9
|
+
layers: /* @__PURE__ */ new Set(),
|
|
10
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
11
|
+
branches: /* @__PURE__ */ new Set()
|
|
12
|
+
}), j = n.forwardRef(
|
|
13
|
+
(r, e) => {
|
|
14
|
+
const {
|
|
15
|
+
disableOutsidePointerEvents: i = !1,
|
|
16
|
+
onEscapeKeyDown: o,
|
|
17
|
+
onPointerDownOutside: t,
|
|
18
|
+
onFocusOutside: a,
|
|
19
|
+
onInteractOutside: l,
|
|
20
|
+
onDismiss: d,
|
|
21
|
+
...v
|
|
22
|
+
} = r, c = n.useContext(B), [u, S] = n.useState(null), f = (u == null ? void 0 : u.ownerDocument) ?? (globalThis == null ? void 0 : globalThis.document), [, F] = n.useState({}), W = R(e, (s) => S(s)), p = Array.from(c.layers), [A] = [...c.layersWithOutsidePointerEventsDisabled].slice(-1), N = p.indexOf(A), b = u ? p.indexOf(u) : -1, I = c.layersWithOutsidePointerEventsDisabled.size > 0, P = b >= N, _ = q((s) => {
|
|
23
|
+
const E = s.target, C = [...c.branches].some((h) => h.contains(E));
|
|
24
|
+
!P || C || (t == null || t(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
|
25
|
+
}, f), D = G((s) => {
|
|
26
|
+
const E = s.target;
|
|
27
|
+
[...c.branches].some((h) => h.contains(E)) || (a == null || a(s), l == null || l(s), s.defaultPrevented || d == null || d());
|
|
28
|
+
}, f);
|
|
29
|
+
return U((s) => {
|
|
30
|
+
b === c.layers.size - 1 && (o == null || o(s), !s.defaultPrevented && d && (s.preventDefault(), d()));
|
|
31
|
+
}, f), n.useEffect(() => {
|
|
32
|
+
if (u)
|
|
33
|
+
return i && (c.layersWithOutsidePointerEventsDisabled.size === 0 && (L = f.body.style.pointerEvents, f.body.style.pointerEvents = "none"), c.layersWithOutsidePointerEventsDisabled.add(u)), c.layers.add(u), O(), () => {
|
|
34
|
+
i && c.layersWithOutsidePointerEventsDisabled.size === 1 && (f.body.style.pointerEvents = L);
|
|
35
|
+
};
|
|
36
|
+
}, [u, f, i, c]), n.useEffect(() => () => {
|
|
37
|
+
u && (c.layers.delete(u), c.layersWithOutsidePointerEventsDisabled.delete(u), O());
|
|
38
|
+
}, [u, c]), n.useEffect(() => {
|
|
39
|
+
const s = () => F({});
|
|
40
|
+
return document.addEventListener(y, s), () => document.removeEventListener(y, s);
|
|
41
|
+
}, []), /* @__PURE__ */ T(
|
|
42
|
+
g.div,
|
|
43
|
+
{
|
|
44
|
+
...v,
|
|
45
|
+
ref: W,
|
|
46
|
+
style: {
|
|
47
|
+
pointerEvents: I ? P ? "auto" : "none" : void 0,
|
|
48
|
+
...r.style
|
|
49
|
+
},
|
|
50
|
+
onFocusCapture: m(r.onFocusCapture, D.onFocusCapture),
|
|
51
|
+
onBlurCapture: m(r.onBlurCapture, D.onBlurCapture),
|
|
52
|
+
onPointerDownCapture: m(
|
|
53
|
+
r.onPointerDownCapture,
|
|
54
|
+
_.onPointerDownCapture
|
|
55
|
+
)
|
|
56
|
+
}
|
|
57
|
+
);
|
|
58
|
+
}
|
|
59
|
+
);
|
|
60
|
+
j.displayName = z;
|
|
61
|
+
var X = "DismissableLayerBranch", Y = n.forwardRef((r, e) => {
|
|
62
|
+
const i = n.useContext(B), o = n.useRef(null), t = R(e, o);
|
|
63
|
+
return n.useEffect(() => {
|
|
64
|
+
const a = o.current;
|
|
65
|
+
if (a)
|
|
66
|
+
return i.branches.add(a), () => {
|
|
67
|
+
i.branches.delete(a);
|
|
68
|
+
};
|
|
69
|
+
}, [i.branches]), /* @__PURE__ */ T(g.div, { ...r, ref: t });
|
|
12
70
|
});
|
|
13
|
-
|
|
71
|
+
Y.displayName = X;
|
|
72
|
+
function q(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
73
|
+
const i = w(r), o = n.useRef(!1), t = n.useRef(() => {
|
|
74
|
+
});
|
|
75
|
+
return n.useEffect(() => {
|
|
76
|
+
const a = (d) => {
|
|
77
|
+
if (d.target && !o.current) {
|
|
78
|
+
let v = function() {
|
|
79
|
+
x(
|
|
80
|
+
H,
|
|
81
|
+
i,
|
|
82
|
+
c,
|
|
83
|
+
{ discrete: !0 }
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
const c = { originalEvent: d };
|
|
87
|
+
d.pointerType === "touch" ? (e.removeEventListener("click", t.current), t.current = v, e.addEventListener("click", t.current, { once: !0 })) : v();
|
|
88
|
+
} else
|
|
89
|
+
e.removeEventListener("click", t.current);
|
|
90
|
+
o.current = !1;
|
|
91
|
+
}, l = window.setTimeout(() => {
|
|
92
|
+
e.addEventListener("pointerdown", a);
|
|
93
|
+
}, 0);
|
|
94
|
+
return () => {
|
|
95
|
+
window.clearTimeout(l), e.removeEventListener("pointerdown", a), e.removeEventListener("click", t.current);
|
|
96
|
+
};
|
|
97
|
+
}, [e, i]), {
|
|
98
|
+
// ensures we check React component tree (not just DOM tree)
|
|
99
|
+
onPointerDownCapture: () => o.current = !0
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
function G(r, e = globalThis == null ? void 0 : globalThis.document) {
|
|
103
|
+
const i = w(r), o = n.useRef(!1);
|
|
104
|
+
return n.useEffect(() => {
|
|
105
|
+
const t = (a) => {
|
|
106
|
+
a.target && !o.current && x(M, i, { originalEvent: a }, {
|
|
107
|
+
discrete: !1
|
|
108
|
+
});
|
|
109
|
+
};
|
|
110
|
+
return e.addEventListener("focusin", t), () => e.removeEventListener("focusin", t);
|
|
111
|
+
}, [e, i]), {
|
|
112
|
+
onFocusCapture: () => o.current = !0,
|
|
113
|
+
onBlurCapture: () => o.current = !1
|
|
114
|
+
};
|
|
115
|
+
}
|
|
116
|
+
function O() {
|
|
117
|
+
const r = new CustomEvent(y);
|
|
118
|
+
document.dispatchEvent(r);
|
|
119
|
+
}
|
|
120
|
+
function x(r, e, i, { discrete: o }) {
|
|
121
|
+
const t = i.originalEvent.target, a = new CustomEvent(r, { bubbles: !1, cancelable: !0, detail: i });
|
|
122
|
+
e && t.addEventListener(r, e, { once: !0 }), o ? k(t, a) : t.dispatchEvent(a);
|
|
123
|
+
}
|
|
14
124
|
export {
|
|
15
|
-
|
|
125
|
+
j as DismissableLayer,
|
|
126
|
+
Y as DismissableLayerBranch
|
|
16
127
|
};
|
package/dist/index85.js
CHANGED
|
@@ -1,71 +1,17 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import * as r from "react";
|
|
2
|
+
var t = 0;
|
|
3
|
+
function a() {
|
|
4
|
+
r.useEffect(() => {
|
|
5
|
+
const e = document.querySelectorAll("[data-radix-focus-guard]");
|
|
6
|
+
return document.body.insertAdjacentElement("afterbegin", e[0] ?? n()), document.body.insertAdjacentElement("beforeend", e[1] ?? n()), t++, () => {
|
|
7
|
+
t === 1 && document.querySelectorAll("[data-radix-focus-guard]").forEach((o) => o.remove()), t--;
|
|
8
|
+
};
|
|
9
|
+
}, []);
|
|
6
10
|
}
|
|
7
|
-
|
|
8
|
-
const
|
|
9
|
-
return
|
|
10
|
-
};
|
|
11
|
-
R.displayName = "Presence";
|
|
12
|
-
function v(n) {
|
|
13
|
-
const [e, r] = a.useState(), t = a.useRef(null), i = a.useRef(n), c = a.useRef("none"), p = n ? "mounted" : "unmounted", [N, s] = T(p, {
|
|
14
|
-
mounted: {
|
|
15
|
-
UNMOUNT: "unmounted",
|
|
16
|
-
ANIMATION_OUT: "unmountSuspended"
|
|
17
|
-
},
|
|
18
|
-
unmountSuspended: {
|
|
19
|
-
MOUNT: "mounted",
|
|
20
|
-
ANIMATION_END: "unmounted"
|
|
21
|
-
},
|
|
22
|
-
unmounted: {
|
|
23
|
-
MOUNT: "mounted"
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
return a.useEffect(() => {
|
|
27
|
-
const o = l(t.current);
|
|
28
|
-
c.current = N === "mounted" ? o : "none";
|
|
29
|
-
}, [N]), A(() => {
|
|
30
|
-
const o = t.current, m = i.current;
|
|
31
|
-
if (m !== n) {
|
|
32
|
-
const f = c.current, u = l(o);
|
|
33
|
-
n ? s("MOUNT") : u === "none" || (o == null ? void 0 : o.display) === "none" ? s("UNMOUNT") : s(m && f !== u ? "ANIMATION_OUT" : "UNMOUNT"), i.current = n;
|
|
34
|
-
}
|
|
35
|
-
}, [n, s]), A(() => {
|
|
36
|
-
if (e) {
|
|
37
|
-
let o;
|
|
38
|
-
const m = e.ownerDocument.defaultView ?? window, d = (u) => {
|
|
39
|
-
const g = l(t.current).includes(CSS.escape(u.animationName));
|
|
40
|
-
if (u.target === e && g && (s("ANIMATION_END"), !i.current)) {
|
|
41
|
-
const O = e.style.animationFillMode;
|
|
42
|
-
e.style.animationFillMode = "forwards", o = m.setTimeout(() => {
|
|
43
|
-
e.style.animationFillMode === "forwards" && (e.style.animationFillMode = O);
|
|
44
|
-
});
|
|
45
|
-
}
|
|
46
|
-
}, f = (u) => {
|
|
47
|
-
u.target === e && (c.current = l(t.current));
|
|
48
|
-
};
|
|
49
|
-
return e.addEventListener("animationstart", f), e.addEventListener("animationcancel", d), e.addEventListener("animationend", d), () => {
|
|
50
|
-
m.clearTimeout(o), e.removeEventListener("animationstart", f), e.removeEventListener("animationcancel", d), e.removeEventListener("animationend", d);
|
|
51
|
-
};
|
|
52
|
-
} else
|
|
53
|
-
s("ANIMATION_END");
|
|
54
|
-
}, [e, s]), {
|
|
55
|
-
isPresent: ["mounted", "unmountSuspended"].includes(N),
|
|
56
|
-
ref: a.useCallback((o) => {
|
|
57
|
-
t.current = o ? getComputedStyle(o) : null, r(o);
|
|
58
|
-
}, [])
|
|
59
|
-
};
|
|
60
|
-
}
|
|
61
|
-
function l(n) {
|
|
62
|
-
return (n == null ? void 0 : n.animationName) || "none";
|
|
63
|
-
}
|
|
64
|
-
function P(n) {
|
|
65
|
-
var t, i;
|
|
66
|
-
let e = (t = Object.getOwnPropertyDescriptor(n.props, "ref")) == null ? void 0 : t.get, r = e && "isReactWarning" in e && e.isReactWarning;
|
|
67
|
-
return r ? n.ref : (e = (i = Object.getOwnPropertyDescriptor(n, "ref")) == null ? void 0 : i.get, r = e && "isReactWarning" in e && e.isReactWarning, r ? n.props.ref : n.props.ref || n.ref);
|
|
11
|
+
function n() {
|
|
12
|
+
const e = document.createElement("span");
|
|
13
|
+
return e.setAttribute("data-radix-focus-guard", ""), e.tabIndex = 0, e.style.outline = "none", e.style.opacity = "0", e.style.position = "fixed", e.style.pointerEvents = "none", e;
|
|
68
14
|
}
|
|
69
15
|
export {
|
|
70
|
-
|
|
16
|
+
a as useFocusGuards
|
|
71
17
|
};
|
package/dist/index86.js
CHANGED
|
@@ -1,36 +1,137 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
1
|
+
import * as d from "react";
|
|
2
|
+
import { useComposedRefs as R } from "./index78.js";
|
|
3
|
+
import { Primitive as M } from "./index81.js";
|
|
4
|
+
import { useCallbackRef as y } from "./index99.js";
|
|
5
|
+
import { jsx as _ } from "react/jsx-runtime";
|
|
6
|
+
var F = "focusScope.autoFocusOnMount", T = "focusScope.autoFocusOnUnmount", N = { bubbles: !1, cancelable: !0 }, K = "FocusScope", k = d.forwardRef((e, n) => {
|
|
7
|
+
const {
|
|
8
|
+
loop: t = !1,
|
|
9
|
+
trapped: u = !1,
|
|
10
|
+
onMountAutoFocus: p,
|
|
11
|
+
onUnmountAutoFocus: L,
|
|
12
|
+
...g
|
|
13
|
+
} = e, [o, U] = d.useState(null), E = y(p), v = y(L), b = d.useRef(null), A = R(n, (s) => U(s)), a = d.useRef({
|
|
14
|
+
paused: !1,
|
|
15
|
+
pause() {
|
|
16
|
+
this.paused = !0;
|
|
17
|
+
},
|
|
18
|
+
resume() {
|
|
19
|
+
this.paused = !1;
|
|
20
|
+
}
|
|
21
|
+
}).current;
|
|
22
|
+
d.useEffect(() => {
|
|
23
|
+
if (u) {
|
|
24
|
+
let s = function(i) {
|
|
25
|
+
if (a.paused || !o) return;
|
|
26
|
+
const c = i.target;
|
|
27
|
+
o.contains(c) ? b.current = c : f(b.current, { select: !0 });
|
|
28
|
+
}, l = function(i) {
|
|
29
|
+
if (a.paused || !o) return;
|
|
30
|
+
const c = i.relatedTarget;
|
|
31
|
+
c !== null && (o.contains(c) || f(b.current, { select: !0 }));
|
|
32
|
+
}, r = function(i) {
|
|
33
|
+
if (document.activeElement === document.body)
|
|
34
|
+
for (const h of i)
|
|
35
|
+
h.removedNodes.length > 0 && f(o);
|
|
36
|
+
};
|
|
37
|
+
document.addEventListener("focusin", s), document.addEventListener("focusout", l);
|
|
38
|
+
const m = new MutationObserver(r);
|
|
39
|
+
return o && m.observe(o, { childList: !0, subtree: !0 }), () => {
|
|
40
|
+
document.removeEventListener("focusin", s), document.removeEventListener("focusout", l), m.disconnect();
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
}, [u, o, a.paused]), d.useEffect(() => {
|
|
44
|
+
if (o) {
|
|
45
|
+
S.add(a);
|
|
46
|
+
const s = document.activeElement;
|
|
47
|
+
if (!o.contains(s)) {
|
|
48
|
+
const r = new CustomEvent(F, N);
|
|
49
|
+
o.addEventListener(F, E), o.dispatchEvent(r), r.defaultPrevented || (w(W(I(o)), { select: !0 }), document.activeElement === s && f(o));
|
|
50
|
+
}
|
|
51
|
+
return () => {
|
|
52
|
+
o.removeEventListener(F, E), setTimeout(() => {
|
|
53
|
+
const r = new CustomEvent(T, N);
|
|
54
|
+
o.addEventListener(T, v), o.dispatchEvent(r), r.defaultPrevented || f(s ?? document.body, { select: !0 }), o.removeEventListener(T, v), S.remove(a);
|
|
55
|
+
}, 0);
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
}, [o, E, v, a]);
|
|
59
|
+
const P = d.useCallback(
|
|
60
|
+
(s) => {
|
|
61
|
+
if (!t && !u || a.paused) return;
|
|
62
|
+
const l = s.key === "Tab" && !s.altKey && !s.ctrlKey && !s.metaKey, r = document.activeElement;
|
|
63
|
+
if (l && r) {
|
|
64
|
+
const m = s.currentTarget, [i, c] = x(m);
|
|
65
|
+
i && c ? !s.shiftKey && r === c ? (s.preventDefault(), t && f(i, { select: !0 })) : s.shiftKey && r === i && (s.preventDefault(), t && f(c, { select: !0 })) : r === m && s.preventDefault();
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
[t, u, a.paused]
|
|
69
|
+
);
|
|
70
|
+
return /* @__PURE__ */ _(M.div, { tabIndex: -1, ...g, ref: A, onKeyDown: P });
|
|
71
|
+
});
|
|
72
|
+
k.displayName = K;
|
|
73
|
+
function w(e, { select: n = !1 } = {}) {
|
|
74
|
+
const t = document.activeElement;
|
|
75
|
+
for (const u of e)
|
|
76
|
+
if (f(u, { select: n }), document.activeElement !== t) return;
|
|
77
|
+
}
|
|
78
|
+
function x(e) {
|
|
79
|
+
const n = I(e), t = O(n, e), u = O(n.reverse(), e);
|
|
80
|
+
return [t, u];
|
|
81
|
+
}
|
|
82
|
+
function I(e) {
|
|
83
|
+
const n = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
84
|
+
acceptNode: (u) => {
|
|
85
|
+
const p = u.tagName === "INPUT" && u.type === "hidden";
|
|
86
|
+
return u.disabled || u.hidden || p ? NodeFilter.FILTER_SKIP : u.tabIndex >= 0 ? NodeFilter.FILTER_ACCEPT : NodeFilter.FILTER_SKIP;
|
|
87
|
+
}
|
|
27
88
|
});
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
89
|
+
for (; t.nextNode(); ) n.push(t.currentNode);
|
|
90
|
+
return n;
|
|
91
|
+
}
|
|
92
|
+
function O(e, n) {
|
|
93
|
+
for (const t of e)
|
|
94
|
+
if (!D(t, { upTo: n })) return t;
|
|
95
|
+
}
|
|
96
|
+
function D(e, { upTo: n }) {
|
|
97
|
+
if (getComputedStyle(e).visibility === "hidden") return !0;
|
|
98
|
+
for (; e; ) {
|
|
99
|
+
if (n !== void 0 && e === n) return !1;
|
|
100
|
+
if (getComputedStyle(e).display === "none") return !0;
|
|
101
|
+
e = e.parentElement;
|
|
102
|
+
}
|
|
103
|
+
return !1;
|
|
104
|
+
}
|
|
105
|
+
function H(e) {
|
|
106
|
+
return e instanceof HTMLInputElement && "select" in e;
|
|
107
|
+
}
|
|
108
|
+
function f(e, { select: n = !1 } = {}) {
|
|
109
|
+
if (e && e.focus) {
|
|
110
|
+
const t = document.activeElement;
|
|
111
|
+
e.focus({ preventScroll: !0 }), e !== t && H(e) && n && e.select();
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
var S = V();
|
|
115
|
+
function V() {
|
|
116
|
+
let e = [];
|
|
117
|
+
return {
|
|
118
|
+
add(n) {
|
|
119
|
+
const t = e[0];
|
|
120
|
+
n !== t && (t == null || t.pause()), e = C(e, n), e.unshift(n);
|
|
121
|
+
},
|
|
122
|
+
remove(n) {
|
|
123
|
+
var t;
|
|
124
|
+
e = C(e, n), (t = e[0]) == null || t.resume();
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
function C(e, n) {
|
|
129
|
+
const t = [...e], u = t.indexOf(n);
|
|
130
|
+
return u !== -1 && t.splice(u, 1), t;
|
|
131
|
+
}
|
|
132
|
+
function W(e) {
|
|
133
|
+
return e.filter((n) => n.tagName !== "A");
|
|
32
134
|
}
|
|
33
135
|
export {
|
|
34
|
-
|
|
35
|
-
w as dispatchDiscreteCustomEvent
|
|
136
|
+
k as FocusScope
|
|
36
137
|
};
|
package/dist/index87.js
CHANGED
|
@@ -1,50 +1,221 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
});
|
|
14
|
-
return
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const {
|
|
20
|
-
|
|
21
|
-
const c =
|
|
22
|
-
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
1
|
+
import * as p 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 "./index116.js";
|
|
3
|
+
import { Root as Oe } from "./index117.js";
|
|
4
|
+
import { useComposedRefs as j } from "./index78.js";
|
|
5
|
+
import { createContextScope as Re } from "./index76.js";
|
|
6
|
+
import { Primitive as z } from "./index81.js";
|
|
7
|
+
import { useCallbackRef as Ee } from "./index99.js";
|
|
8
|
+
import { useLayoutEffect as T } from "./index100.js";
|
|
9
|
+
import { useSize as Ne } from "./index96.js";
|
|
10
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
11
|
+
import { autoUpdate as _e } from "./index118.js";
|
|
12
|
+
var N = "Popper", [L, Ue] = Re(N), [$e, Z] = L(N), U = (e) => {
|
|
13
|
+
const { __scopePopper: s, children: a } = e, [t, i] = p.useState(null);
|
|
14
|
+
return /* @__PURE__ */ f($e, { scope: s, anchor: t, onAnchorChange: i, children: a });
|
|
15
|
+
};
|
|
16
|
+
U.displayName = N;
|
|
17
|
+
var q = "PopperAnchor", G = p.forwardRef(
|
|
18
|
+
(e, s) => {
|
|
19
|
+
const { __scopePopper: a, virtualRef: t, ...i } = e, r = Z(q, a), o = p.useRef(null), w = j(s, o), n = p.useRef(null);
|
|
20
|
+
return p.useEffect(() => {
|
|
21
|
+
const c = n.current;
|
|
22
|
+
n.current = (t == null ? void 0 : t.current) || o.current, c !== n.current && r.onAnchorChange(n.current);
|
|
23
|
+
}), t ? null : /* @__PURE__ */ f(z.div, { ...i, ref: w });
|
|
24
|
+
}
|
|
25
|
+
);
|
|
26
|
+
G.displayName = q;
|
|
27
|
+
var _ = "PopperContent", [He, We] = L(_), J = p.forwardRef(
|
|
28
|
+
(e, s) => {
|
|
29
|
+
var Y, M, X, D, F, k;
|
|
30
|
+
const {
|
|
31
|
+
__scopePopper: a,
|
|
32
|
+
side: t = "bottom",
|
|
33
|
+
sideOffset: i = 0,
|
|
34
|
+
align: r = "center",
|
|
35
|
+
alignOffset: o = 0,
|
|
36
|
+
arrowPadding: w = 0,
|
|
37
|
+
avoidCollisions: n = !0,
|
|
38
|
+
collisionBoundary: c = [],
|
|
39
|
+
collisionPadding: x = 0,
|
|
40
|
+
sticky: m = "partial",
|
|
41
|
+
hideWhenDetached: y = !1,
|
|
42
|
+
updatePositionStrategy: A = "optimized",
|
|
43
|
+
onPlaced: l,
|
|
44
|
+
...d
|
|
45
|
+
} = e, v = Z(_, a), [h, C] = p.useState(null), ee = j(s, (P) => C(P)), [E, te] = p.useState(null), u = Ne(E), re = (u == null ? void 0 : u.width) ?? 0, $ = (u == null ? void 0 : u.height) ?? 0, oe = t + (r !== "center" ? "-" + r : ""), ne = typeof x == "number" ? x : { top: 0, right: 0, bottom: 0, left: 0, ...x }, H = Array.isArray(c) ? c : [c], ae = H.length > 0, b = {
|
|
46
|
+
padding: ne,
|
|
47
|
+
boundary: H.filter(Ye),
|
|
48
|
+
// with `strategy: 'fixed'`, this is the only way to get it to respect boundaries
|
|
49
|
+
altBoundary: ae
|
|
50
|
+
}, { refs: ie, floatingStyles: W, placement: se, isPositioned: S, middlewareData: g } = xe({
|
|
51
|
+
// default to `fixed` strategy so users don't have to pick and we also avoid focus scroll issues
|
|
52
|
+
strategy: "fixed",
|
|
53
|
+
placement: oe,
|
|
54
|
+
whileElementsMounted: (...P) => _e(...P, {
|
|
55
|
+
animationFrame: A === "always"
|
|
56
|
+
}),
|
|
57
|
+
elements: {
|
|
58
|
+
reference: v.anchor
|
|
59
|
+
},
|
|
60
|
+
middleware: [
|
|
61
|
+
Pe({ mainAxis: i + $, alignmentAxis: o }),
|
|
62
|
+
n && ye({
|
|
63
|
+
mainAxis: !0,
|
|
64
|
+
crossAxis: !1,
|
|
65
|
+
limiter: m === "partial" ? Se() : void 0,
|
|
66
|
+
...b
|
|
67
|
+
}),
|
|
68
|
+
n && Ae({ ...b }),
|
|
69
|
+
ve({
|
|
70
|
+
...b,
|
|
71
|
+
apply: ({ elements: P, rects: B, availableWidth: he, availableHeight: ue }) => {
|
|
72
|
+
const { width: ge, height: we } = B.reference, R = P.floating.style;
|
|
73
|
+
R.setProperty("--radix-popper-available-width", `${he}px`), R.setProperty("--radix-popper-available-height", `${ue}px`), R.setProperty("--radix-popper-anchor-width", `${ge}px`), R.setProperty("--radix-popper-anchor-height", `${we}px`);
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
E && Ce({ element: E, padding: w }),
|
|
77
|
+
Me({ arrowWidth: re, arrowHeight: $ }),
|
|
78
|
+
y && be({ strategy: "referenceHidden", ...b })
|
|
79
|
+
]
|
|
80
|
+
}), [I, ce] = V(se), O = Ee(l);
|
|
81
|
+
T(() => {
|
|
82
|
+
S && (O == null || O());
|
|
83
|
+
}, [S, O]);
|
|
84
|
+
const pe = (Y = g.arrow) == null ? void 0 : Y.x, de = (M = g.arrow) == null ? void 0 : M.y, le = ((X = g.arrow) == null ? void 0 : X.centerOffset) !== 0, [fe, me] = p.useState();
|
|
85
|
+
return T(() => {
|
|
86
|
+
h && me(window.getComputedStyle(h).zIndex);
|
|
87
|
+
}, [h]), /* @__PURE__ */ f(
|
|
88
|
+
"div",
|
|
89
|
+
{
|
|
90
|
+
ref: ie.setFloating,
|
|
91
|
+
"data-radix-popper-content-wrapper": "",
|
|
92
|
+
style: {
|
|
93
|
+
...W,
|
|
94
|
+
transform: S ? W.transform : "translate(0, -200%)",
|
|
95
|
+
// keep off the page when measuring
|
|
96
|
+
minWidth: "max-content",
|
|
97
|
+
zIndex: fe,
|
|
98
|
+
"--radix-popper-transform-origin": [
|
|
99
|
+
(D = g.transformOrigin) == null ? void 0 : D.x,
|
|
100
|
+
(F = g.transformOrigin) == null ? void 0 : F.y
|
|
101
|
+
].join(" "),
|
|
102
|
+
// hide the content if using the hide middleware and should be hidden
|
|
103
|
+
// set visibility to hidden and disable pointer events so the UI behaves
|
|
104
|
+
// as if the PopperContent isn't there at all
|
|
105
|
+
...((k = g.hide) == null ? void 0 : k.referenceHidden) && {
|
|
106
|
+
visibility: "hidden",
|
|
107
|
+
pointerEvents: "none"
|
|
108
|
+
}
|
|
109
|
+
},
|
|
110
|
+
dir: e.dir,
|
|
111
|
+
children: /* @__PURE__ */ f(
|
|
112
|
+
He,
|
|
113
|
+
{
|
|
114
|
+
scope: a,
|
|
115
|
+
placedSide: I,
|
|
116
|
+
onArrowChange: te,
|
|
117
|
+
arrowX: pe,
|
|
118
|
+
arrowY: de,
|
|
119
|
+
shouldHideArrow: le,
|
|
120
|
+
children: /* @__PURE__ */ f(
|
|
121
|
+
z.div,
|
|
122
|
+
{
|
|
123
|
+
"data-side": I,
|
|
124
|
+
"data-align": ce,
|
|
125
|
+
...d,
|
|
126
|
+
ref: ee,
|
|
127
|
+
style: {
|
|
128
|
+
...d.style,
|
|
129
|
+
// if the PopperContent hasn't been placed yet (not all measurements done)
|
|
130
|
+
// we prevent animations so that users's animation don't kick in too early referring wrong sides
|
|
131
|
+
animation: S ? void 0 : "none"
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
}
|
|
136
|
+
)
|
|
137
|
+
}
|
|
138
|
+
);
|
|
40
139
|
}
|
|
41
|
-
|
|
140
|
+
);
|
|
141
|
+
J.displayName = _;
|
|
142
|
+
var K = "PopperArrow", Ie = {
|
|
143
|
+
top: "bottom",
|
|
144
|
+
right: "left",
|
|
145
|
+
bottom: "top",
|
|
146
|
+
left: "right"
|
|
147
|
+
}, Q = p.forwardRef(function(s, a) {
|
|
148
|
+
const { __scopePopper: t, ...i } = s, r = We(K, t), o = Ie[r.placedSide];
|
|
149
|
+
return (
|
|
150
|
+
// we have to use an extra wrapper because `ResizeObserver` (used by `useSize`)
|
|
151
|
+
// doesn't report size as we'd expect on SVG elements.
|
|
152
|
+
// it reports their bounding box which is effectively the largest path inside the SVG.
|
|
153
|
+
/* @__PURE__ */ f(
|
|
154
|
+
"span",
|
|
155
|
+
{
|
|
156
|
+
ref: r.onArrowChange,
|
|
157
|
+
style: {
|
|
158
|
+
position: "absolute",
|
|
159
|
+
left: r.arrowX,
|
|
160
|
+
top: r.arrowY,
|
|
161
|
+
[o]: 0,
|
|
162
|
+
transformOrigin: {
|
|
163
|
+
top: "",
|
|
164
|
+
right: "0 0",
|
|
165
|
+
bottom: "center 0",
|
|
166
|
+
left: "100% 0"
|
|
167
|
+
}[r.placedSide],
|
|
168
|
+
transform: {
|
|
169
|
+
top: "translateY(100%)",
|
|
170
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
171
|
+
bottom: "rotate(180deg)",
|
|
172
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
173
|
+
}[r.placedSide],
|
|
174
|
+
visibility: r.shouldHideArrow ? "hidden" : void 0
|
|
175
|
+
},
|
|
176
|
+
children: /* @__PURE__ */ f(
|
|
177
|
+
Oe,
|
|
178
|
+
{
|
|
179
|
+
...i,
|
|
180
|
+
ref: a,
|
|
181
|
+
style: {
|
|
182
|
+
...i.style,
|
|
183
|
+
// ensures the element can be measured correctly (mostly for if SVG)
|
|
184
|
+
display: "block"
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
)
|
|
188
|
+
}
|
|
189
|
+
)
|
|
190
|
+
);
|
|
191
|
+
});
|
|
192
|
+
Q.displayName = K;
|
|
193
|
+
function Ye(e) {
|
|
194
|
+
return e !== null;
|
|
42
195
|
}
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
196
|
+
var Me = (e) => ({
|
|
197
|
+
name: "transformOrigin",
|
|
198
|
+
options: e,
|
|
199
|
+
fn(s) {
|
|
200
|
+
var v, h, C;
|
|
201
|
+
const { placement: a, rects: t, middlewareData: i } = s, o = ((v = i.arrow) == null ? void 0 : v.centerOffset) !== 0, w = o ? 0 : e.arrowWidth, n = o ? 0 : e.arrowHeight, [c, x] = V(a), m = { start: "0%", center: "50%", end: "100%" }[x], y = (((h = i.arrow) == null ? void 0 : h.x) ?? 0) + w / 2, A = (((C = i.arrow) == null ? void 0 : C.y) ?? 0) + n / 2;
|
|
202
|
+
let l = "", d = "";
|
|
203
|
+
return c === "bottom" ? (l = o ? m : `${y}px`, d = `${-n}px`) : c === "top" ? (l = o ? m : `${y}px`, d = `${t.floating.height + n}px`) : c === "right" ? (l = `${-n}px`, d = o ? m : `${A}px`) : c === "left" && (l = `${t.floating.width + n}px`, d = o ? m : `${A}px`), { data: { x: l, y: d } };
|
|
204
|
+
}
|
|
205
|
+
});
|
|
206
|
+
function V(e) {
|
|
207
|
+
const [s, a = "center"] = e.split("-");
|
|
208
|
+
return [s, a];
|
|
47
209
|
}
|
|
210
|
+
var qe = U, Ge = G, Je = J, Ke = Q;
|
|
48
211
|
export {
|
|
49
|
-
|
|
212
|
+
Ge as Anchor,
|
|
213
|
+
Ke as Arrow,
|
|
214
|
+
Je as Content,
|
|
215
|
+
U as Popper,
|
|
216
|
+
G as PopperAnchor,
|
|
217
|
+
Q as PopperArrow,
|
|
218
|
+
J as PopperContent,
|
|
219
|
+
qe as Root,
|
|
220
|
+
Ue as createPopperScope
|
|
50
221
|
};
|