@rinzai/zen 0.6.0 → 0.6.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/README.md +12 -4
- package/dist/chart/donut.d.ts.map +1 -1
- package/dist/chart/donut.js +51 -40
- package/dist/chart/index.d.ts.map +1 -1
- package/dist/chart/index.js +83 -81
- package/dist/combobox/index.d.ts.map +1 -1
- package/dist/combobox/index.js +93 -91
- package/dist/meter/index.d.ts +4 -3
- package/dist/meter/index.d.ts.map +1 -1
- package/dist/meter/index.js +9 -8
- package/dist/money-input/index.d.ts +7 -8
- package/dist/money-input/index.d.ts.map +1 -1
- package/dist/money-input/index.js +37 -19
- package/dist/popover/index.d.ts.map +1 -1
- package/dist/popover/index.js +3 -2
- package/dist/theme.css +19 -18
- package/dist/tooltip/index.d.ts.map +1 -1
- package/dist/tooltip/index.js +45 -43
- package/dist/utils/useAnchoredPopup.d.ts +23 -7
- package/dist/utils/useAnchoredPopup.d.ts.map +1 -1
- package/dist/utils/useAnchoredPopup.js +86 -30
- package/dist/zen.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/tooltip/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EACH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/tooltip/index.tsx"],"names":[],"mappings":"AAKA,OAAO,EACH,cAAc,EAEd,SAAS,EAQZ,MAAM,OAAO,CAAC;AAmBf;;;;;GAKG;AACH,MAAM,CAAC,OAAO,UAAU,OAAO,CAAC,EAAE,QAAQ,EAAE,EAAE;IAAE,QAAQ,CAAC,EAAE,SAAS,CAAA;CAAE,+BA+BrE;AAED,2GAA2G;AAC3G,wBAAgB,cAAc,CAAC,EAC3B,OAAO,EACP,KAAK,EACL,cAAc,EACd,cAAc,EACd,OAAO,EACP,MAAM,EACN,SAAS,EACT,QAAQ,EACR,GAAG,IAAI,EACV,EAAE,mBAAmB,+BAmCrB;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,EAC3B,KAAgB,EAChB,MAAU,EACV,SAAS,EACT,KAAK,EACL,cAAc,EACd,cAAc,EACd,QAAQ,EACR,GAAG,IAAI,EACV,EAAE,mBAAmB,+BAwBrB;AAED,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,QAAQ,CAAC;IACjE,2FAA2F;IAC3F,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,mBAAoB,SAAQ,cAAc,CAAC,KAAK,CAAC;IAC9D,gFAAgF;IAChF,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACnC,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;CACnB"}
|
package/dist/tooltip/index.js
CHANGED
|
@@ -2,86 +2,87 @@
|
|
|
2
2
|
import { cx as e } from "../utils/cx.js";
|
|
3
3
|
import { useGraphicsMode as t } from "../utils/graphics.js";
|
|
4
4
|
import { Slot as n } from "../utils/slot.js";
|
|
5
|
-
import {
|
|
6
|
-
import { POPUP as
|
|
7
|
-
import { createContext as
|
|
8
|
-
import { jsx as
|
|
5
|
+
import { anchorFor as r, anchoredStyle as i, useAnchorFallback as a } from "../utils/useAnchoredPopup.js";
|
|
6
|
+
import { POPUP as o } from "../utils/styles.js";
|
|
7
|
+
import { createContext as s, useCallback as c, useContext as l, useEffect as u, useId as d, useMemo as f, useRef as p } from "react";
|
|
8
|
+
import { jsx as m } from "react/jsx-runtime";
|
|
9
9
|
//#region packages/tooltip/index.tsx
|
|
10
|
-
var
|
|
11
|
-
function
|
|
12
|
-
let t =
|
|
10
|
+
var h = s(null);
|
|
11
|
+
function g(e) {
|
|
12
|
+
let t = l(h);
|
|
13
13
|
if (!t) throw Error(`<${e}> must be inside <Tooltip>`);
|
|
14
14
|
return t;
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function _({ children: e }) {
|
|
17
17
|
t();
|
|
18
|
-
let n = `zen__tooltip-${
|
|
18
|
+
let n = `zen__tooltip-${d().replace(/[^\w-]/g, "")}`, r = p(null), i = p(0), o = c(() => {
|
|
19
19
|
clearTimeout(i.current);
|
|
20
20
|
try {
|
|
21
21
|
r.current?.showPopover?.();
|
|
22
22
|
} catch {}
|
|
23
|
-
}, []), s =
|
|
23
|
+
}, []), s = c(() => {
|
|
24
24
|
clearTimeout(i.current);
|
|
25
25
|
try {
|
|
26
26
|
r.current?.hidePopover?.();
|
|
27
27
|
} catch {}
|
|
28
|
-
}, []),
|
|
28
|
+
}, []), l = c(() => {
|
|
29
29
|
clearTimeout(i.current), i.current = window.setTimeout(s, 100);
|
|
30
30
|
}, [s]);
|
|
31
|
-
|
|
32
|
-
let
|
|
31
|
+
u(() => () => clearTimeout(i.current), []), a(r);
|
|
32
|
+
let g = f(() => ({
|
|
33
33
|
id: n,
|
|
34
34
|
ref: r,
|
|
35
|
-
show:
|
|
35
|
+
show: o,
|
|
36
36
|
hide: s,
|
|
37
|
-
hideSoon:
|
|
37
|
+
hideSoon: l
|
|
38
38
|
}), [
|
|
39
39
|
n,
|
|
40
|
-
|
|
40
|
+
o,
|
|
41
41
|
s,
|
|
42
|
-
|
|
42
|
+
l
|
|
43
43
|
]);
|
|
44
|
-
return /* @__PURE__ */
|
|
45
|
-
value:
|
|
44
|
+
return /* @__PURE__ */ m(h.Provider, {
|
|
45
|
+
value: g,
|
|
46
46
|
children: e
|
|
47
47
|
});
|
|
48
48
|
}
|
|
49
|
-
function
|
|
50
|
-
let
|
|
51
|
-
"aria-describedby":
|
|
52
|
-
...
|
|
49
|
+
function v({ asChild: e, style: t, onPointerEnter: i, onPointerLeave: a, onFocus: o, onBlur: s, onKeyDown: c, children: l, ...u }) {
|
|
50
|
+
let d = g("TooltipTrigger"), f = {
|
|
51
|
+
"aria-describedby": d.id,
|
|
52
|
+
...u,
|
|
53
|
+
...r(d.id),
|
|
53
54
|
style: {
|
|
54
|
-
|
|
55
|
+
...r(d.id).style,
|
|
55
56
|
...t
|
|
56
57
|
},
|
|
57
58
|
onPointerEnter: (e) => {
|
|
58
|
-
|
|
59
|
+
i?.(e), e.pointerType === "mouse" && d.show();
|
|
59
60
|
},
|
|
60
61
|
onPointerLeave: (e) => {
|
|
61
|
-
|
|
62
|
+
a?.(e), d.hideSoon();
|
|
62
63
|
},
|
|
63
64
|
onFocus: (e) => {
|
|
64
|
-
|
|
65
|
+
o?.(e), e.currentTarget.matches(":focus-visible") && d.show();
|
|
65
66
|
},
|
|
66
67
|
onBlur: (e) => {
|
|
67
|
-
|
|
68
|
+
s?.(e), d.hide();
|
|
68
69
|
},
|
|
69
70
|
onKeyDown: (e) => {
|
|
70
|
-
|
|
71
|
+
c?.(e), e.key === "Escape" && d.hide();
|
|
71
72
|
}
|
|
72
73
|
};
|
|
73
|
-
return e ? /* @__PURE__ */
|
|
74
|
-
...
|
|
75
|
-
children:
|
|
76
|
-
}) : /* @__PURE__ */
|
|
74
|
+
return e ? /* @__PURE__ */ m(n, {
|
|
75
|
+
...f,
|
|
76
|
+
children: l
|
|
77
|
+
}) : /* @__PURE__ */ m("button", {
|
|
77
78
|
type: "button",
|
|
78
|
-
...
|
|
79
|
-
children:
|
|
79
|
+
...f,
|
|
80
|
+
children: l
|
|
80
81
|
});
|
|
81
82
|
}
|
|
82
|
-
function
|
|
83
|
-
let d =
|
|
84
|
-
return /* @__PURE__ */
|
|
83
|
+
function y({ align: t = "center", offset: n = 5, className: r, style: a, onPointerEnter: s, onPointerLeave: c, children: l, ...u }) {
|
|
84
|
+
let d = g("TooltipContent");
|
|
85
|
+
return /* @__PURE__ */ m("div", {
|
|
85
86
|
...u,
|
|
86
87
|
ref: d.ref,
|
|
87
88
|
id: d.id,
|
|
@@ -94,15 +95,16 @@ function _({ align: t = "center", offset: n = 5, className: a, style: o, onPoint
|
|
|
94
95
|
c?.(e), d.hideSoon();
|
|
95
96
|
},
|
|
96
97
|
style: {
|
|
97
|
-
...
|
|
98
|
+
...i(d.id, {
|
|
98
99
|
align: t,
|
|
99
|
-
offset: n
|
|
100
|
+
offset: n,
|
|
101
|
+
width: "at-least"
|
|
100
102
|
}),
|
|
101
|
-
...
|
|
103
|
+
...a
|
|
102
104
|
},
|
|
103
|
-
className: e("zen__popover fixed z-50
|
|
105
|
+
className: e("zen__popover fixed z-50 overflow-visible p-0", o, r),
|
|
104
106
|
children: l
|
|
105
107
|
});
|
|
106
108
|
}
|
|
107
109
|
//#endregion
|
|
108
|
-
export {
|
|
110
|
+
export { y as TooltipContent, v as TooltipTrigger, _ as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CSSProperties } from 'react';
|
|
1
|
+
import { CSSProperties, RefObject } from 'react';
|
|
2
2
|
/**
|
|
3
3
|
* A popup anchored to a trigger, on the native Popover API: opens below the
|
|
4
4
|
* trigger (flipping above if there's no room), closes on outside click and
|
|
@@ -10,26 +10,41 @@ export declare function useAnchoredPopup<T extends HTMLElement = HTMLDivElement>
|
|
|
10
10
|
open: boolean;
|
|
11
11
|
setOpen: (next: boolean) => void;
|
|
12
12
|
triggerProps: {
|
|
13
|
+
'data-zen-anchor': string;
|
|
14
|
+
style: CSSProperties;
|
|
13
15
|
popoverTarget: string;
|
|
14
16
|
'aria-expanded': boolean;
|
|
15
17
|
'aria-controls': string;
|
|
16
18
|
'data-popup-open': true | undefined;
|
|
17
|
-
style: CSSProperties;
|
|
18
19
|
};
|
|
19
20
|
popupProps: {
|
|
20
|
-
ref:
|
|
21
|
+
ref: RefObject<T | null>;
|
|
21
22
|
id: string;
|
|
22
23
|
popover: "auto";
|
|
23
24
|
style: CSSProperties;
|
|
24
25
|
};
|
|
25
|
-
popupRef:
|
|
26
|
+
popupRef: RefObject<T | null>;
|
|
27
|
+
};
|
|
28
|
+
/** Makes an element the anchor its popup (`id`) is placed against. Spread it on the trigger. */
|
|
29
|
+
export declare function anchorFor(id: string): {
|
|
30
|
+
'data-zen-anchor': string;
|
|
31
|
+
style: CSSProperties;
|
|
26
32
|
};
|
|
27
33
|
/**
|
|
28
34
|
* The popup's position: below the trigger (above it if there's no room below),
|
|
29
|
-
* lined up with its start or end edge, or centred on it
|
|
30
|
-
*
|
|
35
|
+
* lined up with its start or end edge, or centred on it; `width` makes it as
|
|
36
|
+
* wide as the trigger, or at least as wide. For parts that take their own
|
|
37
|
+
* `align`/`offset` (PopoverContent, MenuContent). The same choices are kept as
|
|
38
|
+
* custom properties, for placing it where anchor positioning isn't supported.
|
|
31
39
|
*/
|
|
32
|
-
export declare function anchoredStyle(id: string, { align, offset,
|
|
40
|
+
export declare function anchoredStyle(id: string, { align, offset, width }?: AnchorOptions): CSSProperties;
|
|
41
|
+
interface AnchorOptions {
|
|
42
|
+
align?: 'start' | 'end' | 'center';
|
|
43
|
+
offset?: number;
|
|
44
|
+
width?: 'match' | 'at-least';
|
|
45
|
+
}
|
|
46
|
+
/** Places the popup in `ref` against its trigger while it's open, where the browser can't. */
|
|
47
|
+
export declare function useAnchorFallback(ref: RefObject<HTMLElement | null>): void;
|
|
33
48
|
export interface AnchoredPopupOptions {
|
|
34
49
|
/** Line the popup up with the trigger's start (default) or end edge, or centre it. */
|
|
35
50
|
align?: 'start' | 'end' | 'center';
|
|
@@ -39,4 +54,5 @@ export interface AnchoredPopupOptions {
|
|
|
39
54
|
matchWidth?: boolean;
|
|
40
55
|
onOpenChange?: (open: boolean) => void;
|
|
41
56
|
}
|
|
57
|
+
export {};
|
|
42
58
|
//# sourceMappingURL=useAnchoredPopup.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAnchoredPopup.d.ts","sourceRoot":"","sources":["../../packages/utils/useAnchoredPopup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAmD,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useAnchoredPopup.d.ts","sourceRoot":"","sources":["../../packages/utils/useAnchoredPopup.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,SAAS,EAAmD,MAAM,OAAO,CAAC;AAElG;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,CAAC,SAAS,WAAW,GAAG,cAAc,EAAE,EACrE,KAAe,EACf,MAAU,EACV,UAAkB,EAClB,YAAY,GACf,GAAE,oBAAyB;;;oBAgBb,OAAO;;;eA6CkD,aAAa;;;;;;;;;;;;;EAJpF;AAED,gGAAgG;AAChG,wBAAgB,SAAS,CAAC,EAAE,EAAE,MAAM;;WACoC,aAAa;EACpF;AAED;;;;;;GAMG;AACH,wBAAgB,aAAa,CAAC,EAAE,EAAE,MAAM,EAAE,EAAE,KAAe,EAAE,MAAU,EAAE,KAAK,EAAE,GAAE,aAAkB,GAAG,aAAa,CAoBnH;AAED,UAAU,aAAa;IACnB,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,OAAO,GAAG,UAAU,CAAC;CAChC;AAYD,8FAA8F;AAC9F,wBAAgB,iBAAiB,CAAC,GAAG,EAAE,SAAS,CAAC,WAAW,GAAG,IAAI,CAAC,QAiCnE;AAmCD,MAAM,WAAW,oBAAoB;IACjC,sFAAsF;IACtF,KAAK,CAAC,EAAE,OAAO,GAAG,KAAK,GAAG,QAAQ,CAAC;IACnC,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8DAA8D;IAC9D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC1C"}
|
|
@@ -1,50 +1,56 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { useCallback as e, useEffect as t, useId as n, useRef as r, useState as i } from "react";
|
|
3
3
|
//#region packages/utils/useAnchoredPopup.ts
|
|
4
|
-
function a({ align: a = "start", offset:
|
|
5
|
-
let
|
|
6
|
-
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
}, []),
|
|
10
|
-
let t =
|
|
4
|
+
function a({ align: a = "start", offset: c = 4, matchWidth: l = !1, onOpenChange: d } = {}) {
|
|
5
|
+
let f = `zen__popup-${n().replace(/[^\w-]/g, "")}`, p = r(null), [m, h] = i(!1), g = r(d);
|
|
6
|
+
g.current = d;
|
|
7
|
+
let _ = r(!1), v = e((e) => {
|
|
8
|
+
h(e), _.current !== e && (_.current = e, g.current?.(e));
|
|
9
|
+
}, []), y = e((e) => {
|
|
10
|
+
let t = p.current;
|
|
11
11
|
if (t) {
|
|
12
12
|
try {
|
|
13
13
|
e ? t.showPopover?.() : t.hidePopover?.();
|
|
14
14
|
} catch {}
|
|
15
|
-
|
|
15
|
+
v(e);
|
|
16
16
|
}
|
|
17
|
-
}, [
|
|
18
|
-
return t(() => {
|
|
19
|
-
let e =
|
|
17
|
+
}, [v]);
|
|
18
|
+
return u(p), t(() => {
|
|
19
|
+
let e = p.current;
|
|
20
20
|
if (!e) return;
|
|
21
|
-
let t = (e) =>
|
|
21
|
+
let t = (e) => v(e.newState === "open");
|
|
22
22
|
return e.addEventListener("toggle", t), () => e.removeEventListener("toggle", t);
|
|
23
|
-
}, [
|
|
24
|
-
id:
|
|
25
|
-
open:
|
|
26
|
-
setOpen:
|
|
23
|
+
}, [v]), {
|
|
24
|
+
id: f,
|
|
25
|
+
open: m,
|
|
26
|
+
setOpen: y,
|
|
27
27
|
triggerProps: {
|
|
28
|
-
popoverTarget:
|
|
29
|
-
"aria-expanded":
|
|
30
|
-
"aria-controls":
|
|
31
|
-
"data-popup-open":
|
|
32
|
-
|
|
28
|
+
popoverTarget: f,
|
|
29
|
+
"aria-expanded": m,
|
|
30
|
+
"aria-controls": f,
|
|
31
|
+
"data-popup-open": m || void 0,
|
|
32
|
+
...o(f)
|
|
33
33
|
},
|
|
34
34
|
popupProps: {
|
|
35
|
-
ref:
|
|
36
|
-
id:
|
|
35
|
+
ref: p,
|
|
36
|
+
id: f,
|
|
37
37
|
popover: "auto",
|
|
38
|
-
style:
|
|
38
|
+
style: s(f, {
|
|
39
39
|
align: a,
|
|
40
|
-
offset:
|
|
41
|
-
|
|
40
|
+
offset: c,
|
|
41
|
+
width: l ? "at-least" : void 0
|
|
42
42
|
})
|
|
43
43
|
},
|
|
44
|
-
popupRef:
|
|
44
|
+
popupRef: p
|
|
45
45
|
};
|
|
46
46
|
}
|
|
47
|
-
function o(e
|
|
47
|
+
function o(e) {
|
|
48
|
+
return {
|
|
49
|
+
"data-zen-anchor": e,
|
|
50
|
+
style: { anchorName: `--${e}` }
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
function s(e, { align: t = "start", offset: n = 4, width: r } = {}) {
|
|
48
54
|
let i = {
|
|
49
55
|
start: "block-end span-inline-end",
|
|
50
56
|
end: "block-end span-inline-start",
|
|
@@ -56,8 +62,58 @@ function o(e, { align: t = "start", offset: n = 4, matchWidth: r = !1 } = {}) {
|
|
|
56
62
|
positionTryFallbacks: "flip-block",
|
|
57
63
|
inset: "auto",
|
|
58
64
|
margin: `${n}px 0`,
|
|
59
|
-
...r
|
|
65
|
+
...r === "at-least" && {
|
|
66
|
+
width: "max-content",
|
|
67
|
+
minWidth: "anchor-size(width)"
|
|
68
|
+
},
|
|
69
|
+
...r === "match" && {
|
|
70
|
+
width: "anchor-size(width)",
|
|
71
|
+
minWidth: 0
|
|
72
|
+
},
|
|
73
|
+
"--zen-anchor": e,
|
|
74
|
+
"--zen-anchor-align": t,
|
|
75
|
+
"--zen-anchor-offset": n,
|
|
76
|
+
"--zen-anchor-width": r ?? "auto"
|
|
60
77
|
};
|
|
61
78
|
}
|
|
79
|
+
var c, l = () => c ??= typeof CSS < "u" && !!CSS.supports?.("position-area: block-end");
|
|
80
|
+
function u(e) {
|
|
81
|
+
t(() => {
|
|
82
|
+
let t = e.current;
|
|
83
|
+
if (!t || l()) return;
|
|
84
|
+
let n = 0, r = () => {
|
|
85
|
+
n ||= requestAnimationFrame(() => {
|
|
86
|
+
n = 0, f(t);
|
|
87
|
+
});
|
|
88
|
+
}, i = typeof ResizeObserver > "u" ? null : new ResizeObserver(r), a = () => {
|
|
89
|
+
window.removeEventListener("scroll", r, { capture: !0 }), window.removeEventListener("resize", r), i?.disconnect(), cancelAnimationFrame(n), n = 0;
|
|
90
|
+
}, o = (e) => {
|
|
91
|
+
a(), e.newState === "open" && (f(t), window.addEventListener("scroll", r, {
|
|
92
|
+
capture: !0,
|
|
93
|
+
passive: !0
|
|
94
|
+
}), window.addEventListener("resize", r, { passive: !0 }), i?.observe(t));
|
|
95
|
+
};
|
|
96
|
+
return t.addEventListener("toggle", o), () => {
|
|
97
|
+
t.removeEventListener("toggle", o), a();
|
|
98
|
+
};
|
|
99
|
+
}, [e]);
|
|
100
|
+
}
|
|
101
|
+
var d = 8;
|
|
102
|
+
function f(e) {
|
|
103
|
+
let t = e.style.getPropertyValue("--zen-anchor").trim(), n = t ? document.querySelector(`[data-zen-anchor="${t}"]`) : null;
|
|
104
|
+
if (!n) return;
|
|
105
|
+
let r = e.style.getPropertyValue("--zen-anchor-align").trim() || "start", i = Number(e.style.getPropertyValue("--zen-anchor-offset")) || 0, a = e.style.getPropertyValue("--zen-anchor-width").trim(), o = n.getBoundingClientRect(), s = e.style;
|
|
106
|
+
for (let e of [
|
|
107
|
+
"position-anchor",
|
|
108
|
+
"position-area",
|
|
109
|
+
"position-try-fallbacks"
|
|
110
|
+
]) s.removeProperty(e);
|
|
111
|
+
s.inset = "0 auto auto 0", s.margin = "0", a === "match" && (s.width = `${o.width}px`), a === "at-least" && (s.minWidth = `${o.width}px`);
|
|
112
|
+
let c = {
|
|
113
|
+
width: e.offsetWidth,
|
|
114
|
+
height: e.offsetHeight
|
|
115
|
+
}, l = document.documentElement.clientWidth, u = window.innerHeight, f = o.bottom + i, p = o.top - i - c.height, m = f + c.height > u - d && p >= d ? p : f, h = getComputedStyle(n).direction === "rtl", g = h ? o.right - c.width : o.left, _ = h ? o.left : o.right - c.width, v = r === "center" ? o.left + (o.width - c.width) / 2 : r === "end" ? _ : g;
|
|
116
|
+
s.top = `${m}px`, s.left = `${Math.max(d, Math.min(v, l - c.width - d))}px`;
|
|
117
|
+
}
|
|
62
118
|
//#endregion
|
|
63
|
-
export { o as anchoredStyle, a as useAnchoredPopup };
|
|
119
|
+
export { o as anchorFor, s as anchoredStyle, u as useAnchorFallback, a as useAnchoredPopup };
|