@nxgt/material 3.7.5 → 3.8.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/CHANGELOG.md +56 -0
- package/README.md +39 -6
- package/bin/nxgt-theme.js +6 -0
- package/dist/{async-slice-o_fpqeGX.js → async-slice-DDjaJY_F.js} +2 -2
- package/dist/background--Bf_EbFR.js +159 -0
- package/dist/backgrounds/backgrounds.css +2 -0
- package/dist/backgrounds/css-react/moon.css +97 -0
- package/dist/backgrounds.js +3 -139
- package/dist/browser-only-DQ94lWF8.js +18 -0
- package/dist/bubble-input-B7BVd9fX.js +237 -0
- package/dist/{button--cF4gY14.js → button-DbfdITBB.js} +51 -57
- package/dist/charts.js +3 -3
- package/dist/{chip-D1B1dL77.js → chip-DpySRqCy.js} +2 -2
- package/dist/{client-only.utils-lQ7GqP8w.js → client-only.utils-3nHNzCki.js} +1 -1
- package/dist/{code-editor-0CdGwKDg.js → code-editor-BiA14xua.js} +7 -7
- package/dist/code-editor.js +6 -6
- package/dist/{code-language-items-CGARRbVm.js → code-language-items-C_dJ6GVs.js} +2 -2
- package/dist/components/theme-tokens.css +34 -35
- package/dist/components/tones/app-tones.css +2 -1
- package/dist/components/tones/containers.css +4 -1
- package/dist/components/tones/index.css +2 -0
- package/dist/components/tones/surface.css +1 -0
- package/dist/components/tones/tokens.css +8 -3
- package/dist/components/tones/zone-paint.css +15 -0
- package/dist/components/ui/feedback/toast/toast-tokens.css +1 -0
- package/dist/components/ui/layout/app-shell/activity-backdrop.css +26 -0
- package/dist/components/ui/layout/sidebar/sidebar-tokens.css +5 -2
- package/dist/components/ui/media/media-player/nxgt-media-player.css +7 -32
- package/dist/components/ui/primitives/field-box/field-box-tokens.css +5 -2
- package/dist/{components-CDrQCOsU.js → components-DNUYg8QM.js} +18625 -18532
- package/dist/components.js +24 -22
- package/dist/{dialog-DdJ1C4BR.js → dialog-CkIYpJXk.js} +55 -53
- package/dist/dist-B7RjY7SL.js +158 -0
- package/dist/dist-C4wtXCjf.js +593 -0
- package/dist/dist-DVRQkaTK.js +111 -0
- package/dist/dist-lmHmz_bu.js +419 -0
- package/dist/dnd.js +1 -1
- package/dist/dropdown-menu-BC5Tbhb9.js +908 -0
- package/dist/editor.js +527 -527
- package/dist/empty-state-s2CSjKXJ.js +126 -0
- package/dist/{escape-owner-B8k7DvFa.js → escape-owner-CripBce_.js} +2 -1
- package/dist/{field-blur-DFUazxsL.js → field-blur-DPLsMufs.js} +1 -1
- package/dist/{field-blur-context-Dw9ZAgBr.js → field-blur-context-1ZwJgsHE.js} +2 -2
- package/dist/has-text-content-Ds2dkHX_.js +10 -0
- package/dist/hooks.js +35 -33
- package/dist/{hover-card-D5iHS9q1.js → hover-card-Cox-tPDz.js} +41 -39
- package/dist/{i18n-provider-C6SBK_nO.js → i18n-provider-C6HhBw34.js} +1 -1
- package/dist/i18n.js +6 -6
- package/dist/{icon-badge-Bb5-73XP.js → icon-badge-q3Ve8gra.js} +3 -3
- package/dist/{icon-button-5A6Mrj6w.js → icon-button-DJcWpIhu.js} +2 -1
- package/dist/{in-dialog-AiwTD3DK.js → in-dialog-Vwkyp-M5.js} +6 -5
- package/dist/lib/backgrounds/background/available.d.ts +3 -3
- package/dist/lib/backgrounds/background/background.d.ts +7 -3
- package/dist/lib/backgrounds/background/types.d.ts +7 -1
- package/dist/lib/backgrounds/index.d.ts +1 -1
- package/dist/lib/components/ui/layout/account-menu/account-menu-avatar.d.ts +1 -1
- package/dist/lib/components/ui/layout/app-shell/activity-chrome.d.ts +17 -0
- package/dist/lib/components/ui/layout/app-shell/activity-layout.d.ts +6 -4
- package/dist/lib/components/ui/layout/app-shell/backdrop-layer.d.ts +11 -0
- package/dist/lib/components/ui/layout/app-shell/keep-shapes-inside.d.ts +17 -0
- package/dist/lib/components/ui/layout/app-shell/theme-backdrop.d.ts +6 -0
- package/dist/lib/components/ui/layout/app-shell/use-activity-backdrop.d.ts +18 -0
- package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +9 -0
- package/dist/lib/hooks/resolve-theme.d.ts +46 -1
- package/dist/lib/hooks/theme-store.d.ts +35 -4
- package/dist/lib/hooks/use-theme.d.ts +20 -4
- package/dist/lib/i18n/resources/en/en.d.ts +4 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +4 -0
- package/dist/lib/i18n/resources/resources.d.ts +8 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib/theme-picker/index.d.ts +7 -0
- package/dist/lib/theme-picker/partials/mini-background.d.ts +10 -0
- package/dist/lib/theme-picker/partials/mode-control.d.ts +5 -0
- package/dist/lib/theme-picker/partials/theme-tile.d.ts +12 -0
- package/dist/lib/theme-picker/theme-label.d.ts +7 -0
- package/dist/lib/theme-picker/theme-picker.d.ts +25 -0
- package/dist/lib/themes/index.d.ts +14 -0
- package/dist/lib/themes/nxgt-theme-provider.d.ts +29 -0
- package/dist/lib/themes/nxgt-theme.d.ts +22 -0
- package/dist/lib/themes/theme-context.d.ts +28 -0
- package/dist/lib/themes/theme-value.d.ts +5 -0
- package/dist/lib/vite/index.d.ts +1 -1
- package/dist/lib.js +3 -3
- package/dist/main.js +43 -39
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/nxgt-theme-CgSb9Obl.js +37 -0
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-SsiazLEv.js → public-Ce30uvp0.js} +591 -587
- package/dist/read-storage-C2J90bNm.js +10 -0
- package/dist/{rich-code-block-CwNwQs5z.js → rich-code-block-C2Fp_FDU.js} +5 -5
- package/dist/{sortable-provider-BvD98s8Y.js → sortable-provider-pVaEZzty.js} +3 -3
- package/dist/{spinner-CtGCPza-.js → spinner-CsHcmcpF.js} +2 -2
- package/dist/{stored-language-Bb7yX5uE.js → stored-language-BeIKw3-K.js} +15 -15
- package/dist/styles.css +8 -1
- package/dist/theme-context-BagPvRcz.js +16 -0
- package/dist/theme-picker.js +118 -0
- package/dist/theme-store-CSl51uNH.js +91 -0
- package/dist/theme-toggle-C8os82b4.js +48 -0
- package/dist/themes.js +42 -0
- package/dist/toggle-group-j8zaxEg1.js +69 -0
- package/dist/{toolbar-items-DsDDD5AY.js → toolbar-items-CqHvlTU8.js} +443 -589
- package/dist/tooltip-rhbqNmr3.js +1064 -0
- package/dist/{translate-material-Bsjc4Tow.js → translate-material-CGZljjp1.js} +2 -2
- package/dist/{translator-or2y0JJB.js → translator-DCYO4Ij3.js} +3 -3
- package/dist/{use-background-activity-B8jLHNop.js → use-background-activity-KxQgelFF.js} +1 -1
- package/dist/{use-chat-composer-DZ01a16D.js → use-chat-composer-CDrgWGMM.js} +4684 -4886
- package/dist/{use-heading-spy-ByOQNnFZ.js → use-heading-spy-DXo6IOX9.js} +52 -121
- package/dist/{use-material-translation-hLQzOjF0.js → use-material-translation-DkxcLbLM.js} +2 -2
- package/dist/use-slice-reducer-BGkeGtML.js +42 -0
- package/dist/use-theme-Cd-aiDJo.js +31 -0
- package/docs/README.md +2 -1
- package/docs/components/foundations.md +39 -0
- package/docs/components/navigation-and-layout.md +3 -3
- package/docs/getting-started.md +1 -1
- package/docs/guides/app-shell.md +41 -6
- package/docs/guides/backgrounds.md +43 -7
- package/docs/guides/i18n.md +1 -1
- package/docs/guides/themes.md +103 -0
- package/docs/guides/theming.md +288 -84
- package/docs/guides/vite-plugin.md +26 -0
- package/docs/previews/backgrounds-background-from-theme.webp +0 -0
- package/docs/previews/backgrounds-geometry-more.webp +0 -0
- package/docs/previews/backgrounds-geometry.webp +0 -0
- package/docs/previews/backgrounds-illustrated-scenes.webp +0 -0
- package/docs/previews/backgrounds-light-more.webp +0 -0
- package/docs/previews/backgrounds-light.webp +0 -0
- package/docs/previews/backgrounds-material-more.webp +0 -0
- package/docs/previews/backgrounds-matrix.webp +0 -0
- package/docs/previews/backgrounds-moon.webp +0 -0
- package/docs/previews/backgrounds-motif-shapes.webp +0 -0
- package/docs/previews/backgrounds-motifs.webp +0 -0
- package/docs/previews/foundations-themes-themepicker.webp +0 -0
- package/docs/roadmap.md +25 -0
- package/docs/troubleshooting.md +35 -7
- package/lib/backgrounds/backgrounds.css +2 -0
- package/lib/backgrounds/css-react/moon.css +97 -0
- package/lib/components/theme-tokens.css +34 -35
- package/lib/components/tones/app-tones.css +2 -1
- package/lib/components/tones/containers.css +4 -1
- package/lib/components/tones/index.css +2 -0
- package/lib/components/tones/surface.css +1 -0
- package/lib/components/tones/tokens.css +8 -3
- package/lib/components/tones/zone-paint.css +15 -0
- package/lib/components/ui/feedback/toast/toast-tokens.css +1 -0
- package/lib/components/ui/layout/app-shell/activity-backdrop.css +26 -0
- package/lib/components/ui/layout/sidebar/sidebar-tokens.css +5 -2
- package/lib/components/ui/media/media-player/nxgt-media-player.css +7 -32
- package/lib/components/ui/primitives/field-box/field-box-tokens.css +5 -2
- package/lib/styles.css +8 -1
- package/lib/theme-picker/theme-picker-list.css +29 -0
- package/lib/theme-picker/theme-picker.css +192 -0
- package/lib/theme-picker/theme-tile-background.css +77 -0
- package/lib/theme-picker/theme-tile-textures-night.css +63 -0
- package/lib/theme-picker/theme-tile-textures.css +153 -0
- package/lib/themes/ambre.css +134 -0
- package/lib/themes/ardoise.css +133 -0
- package/lib/themes/bleumono.css +136 -0
- package/lib/themes/bluemoon.css +136 -0
- package/lib/themes/corail.css +136 -0
- package/lib/themes/foret.css +133 -0
- package/lib/themes/lavande.css +133 -0
- package/lib/themes/menthe.css +136 -0
- package/lib/themes/ocean.css +136 -0
- package/lib/themes/pink.css +134 -0
- package/lib/themes/prune.css +133 -0
- package/lib/themes/sable.css +133 -0
- package/lib/themes/slate.css +133 -0
- package/lib/themes/teal.css +137 -0
- package/package.json +30 -2
- package/dist/dropdown-menu-DWtgUVW7.js +0 -1490
- package/dist/empty-state-CRWLQ1sM.js +0 -191
- package/dist/tooltip-tmFoTU_d.js +0 -1582
- package/dist/use-slice-reducer-0r5dXnJe.js +0 -58
|
@@ -0,0 +1,1064 @@
|
|
|
1
|
+
import { r as e } from "./rolldown-runtime-BFFgcFxR.js";
|
|
2
|
+
import { n as t, t as n } from "./utils-Bcd2Z3ea.js";
|
|
3
|
+
import { i as r, o as i } from "./dist-DVRQkaTK.js";
|
|
4
|
+
import { a, c as o, i as s, l as c, n as l, o as u, r as d, s as f, t as p, u as m } from "./dist-lmHmz_bu.js";
|
|
5
|
+
import { a as h, c as g, d as _, i as v, l as y, o as b, r as x, t as S, u as C } from "./floating-ui.dom-KkZSW8_E.js";
|
|
6
|
+
import * as w from "react";
|
|
7
|
+
import { useLayoutEffect as T, useRef as E, useSyncExternalStore as D } from "react";
|
|
8
|
+
import { jsx as O, jsxs as k } from "react/jsx-runtime";
|
|
9
|
+
import * as A from "react-dom";
|
|
10
|
+
import { forwardEscape as j } from "@nxgt/material-core/escape-forward";
|
|
11
|
+
//#region ../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
12
|
+
var M = Object.defineProperty, N = (e, t) => M(e, "name", {
|
|
13
|
+
value: t,
|
|
14
|
+
configurable: !0
|
|
15
|
+
}), P = Object.freeze({
|
|
16
|
+
position: "absolute",
|
|
17
|
+
border: 0,
|
|
18
|
+
width: 1,
|
|
19
|
+
height: 1,
|
|
20
|
+
padding: 0,
|
|
21
|
+
margin: -1,
|
|
22
|
+
overflow: "hidden",
|
|
23
|
+
clip: "rect(0, 0, 0, 0)",
|
|
24
|
+
whiteSpace: "nowrap",
|
|
25
|
+
wordWrap: "normal"
|
|
26
|
+
}), F = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ N(function(e, t) {
|
|
27
|
+
return /* @__PURE__ */ O(c.span, {
|
|
28
|
+
...e,
|
|
29
|
+
ref: t,
|
|
30
|
+
style: {
|
|
31
|
+
...P,
|
|
32
|
+
...e.style
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
}, "VisuallyHidden")), I = Object.defineProperty, L = (e, t) => I(e, "name", {
|
|
36
|
+
value: t,
|
|
37
|
+
configurable: !0
|
|
38
|
+
}), R = "dismissableLayer.update", ee = "dismissableLayer.pointerDownOutside", te = "dismissableLayer.focusOutside", z, B = w.createContext({
|
|
39
|
+
layers: /* @__PURE__ */ new Set(),
|
|
40
|
+
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
41
|
+
branches: /* @__PURE__ */ new Set(),
|
|
42
|
+
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
43
|
+
}), V = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ L(function(e, t) {
|
|
44
|
+
let { disableOutsidePointerEvents: n = !1, deferPointerDownOutside: r = !1, onEscapeKeyDown: a, onPointerDownOutside: o, onFocusOutside: s, onInteractOutside: u, onDismiss: d, ...p } = e, m = w.useContext(B), [h, g] = w.useState(null), _ = h?.ownerDocument ?? globalThis?.document, [, v] = w.useState({}), y = i(t, g), b = Array.from(m.layers), [x] = [...m.layersWithOutsidePointerEventsDisabled].slice(-1), S = x ? b.indexOf(x) : -1, C = h ? b.indexOf(h) : -1, T = m.layersWithOutsidePointerEventsDisabled.size > 0, E = C >= S, D = w.useRef(!1), k = U((e) => {
|
|
45
|
+
o?.(e), u?.(e), e.defaultPrevented || d?.();
|
|
46
|
+
}, {
|
|
47
|
+
ownerDocument: _,
|
|
48
|
+
deferPointerDownOutside: r,
|
|
49
|
+
isDeferredPointerDownOutsideRef: D,
|
|
50
|
+
dismissableSurfaces: m.dismissableSurfaces,
|
|
51
|
+
shouldHandlePointerDownOutside: w.useCallback((e) => {
|
|
52
|
+
if (!(e instanceof Node)) return !1;
|
|
53
|
+
let t = [...m.branches].some((t) => t.contains(e));
|
|
54
|
+
return E && !t;
|
|
55
|
+
}, [m.branches, E])
|
|
56
|
+
}), A = re((e) => {
|
|
57
|
+
if (r && D.current) return;
|
|
58
|
+
let t = e.target;
|
|
59
|
+
[...m.branches].some((e) => e.contains(t)) || (s?.(e), u?.(e), e.defaultPrevented || d?.());
|
|
60
|
+
}, _), j = h ? C === b.length - 1 : !1, M = l((e) => {
|
|
61
|
+
e.key === "Escape" && (a?.(e), !e.defaultPrevented && d && (e.preventDefault(), d()));
|
|
62
|
+
});
|
|
63
|
+
return w.useEffect(() => {
|
|
64
|
+
if (j) return _.addEventListener("keydown", M, { capture: !0 }), () => _.removeEventListener("keydown", M, { capture: !0 });
|
|
65
|
+
}, [
|
|
66
|
+
_,
|
|
67
|
+
j,
|
|
68
|
+
M
|
|
69
|
+
]), w.useEffect(() => {
|
|
70
|
+
if (h) return n && (m.layersWithOutsidePointerEventsDisabled.size === 0 && (z = _.body.style.pointerEvents, _.body.style.pointerEvents = "none"), m.layersWithOutsidePointerEventsDisabled.add(h)), m.layers.add(h), W(), () => {
|
|
71
|
+
n && (m.layersWithOutsidePointerEventsDisabled.delete(h), m.layersWithOutsidePointerEventsDisabled.size === 0 && (_.body.style.pointerEvents = z));
|
|
72
|
+
};
|
|
73
|
+
}, [
|
|
74
|
+
h,
|
|
75
|
+
_,
|
|
76
|
+
n,
|
|
77
|
+
m
|
|
78
|
+
]), w.useEffect(() => () => {
|
|
79
|
+
h && (m.layers.delete(h), m.layersWithOutsidePointerEventsDisabled.delete(h), W());
|
|
80
|
+
}, [h, m]), w.useEffect(() => {
|
|
81
|
+
let e = /* @__PURE__ */ L(() => v({}), "handleUpdate");
|
|
82
|
+
return document.addEventListener(R, e), () => document.removeEventListener(R, e);
|
|
83
|
+
}, []), /* @__PURE__ */ O(c.div, {
|
|
84
|
+
...p,
|
|
85
|
+
ref: y,
|
|
86
|
+
style: {
|
|
87
|
+
pointerEvents: T ? E ? "auto" : "none" : void 0,
|
|
88
|
+
...e.style
|
|
89
|
+
},
|
|
90
|
+
onFocusCapture: f(e.onFocusCapture, A.onFocusCapture),
|
|
91
|
+
onBlurCapture: f(e.onBlurCapture, A.onBlurCapture),
|
|
92
|
+
onPointerDownCapture: f(e.onPointerDownCapture, k.onPointerDownCapture)
|
|
93
|
+
});
|
|
94
|
+
}, "DismissableLayer"));
|
|
95
|
+
function H() {
|
|
96
|
+
let e = w.useContext(B), [t, n] = w.useState(null);
|
|
97
|
+
return w.useEffect(() => {
|
|
98
|
+
if (t) return e.dismissableSurfaces.add(t), () => {
|
|
99
|
+
e.dismissableSurfaces.delete(t);
|
|
100
|
+
};
|
|
101
|
+
}, [t, e.dismissableSurfaces]), n;
|
|
102
|
+
}
|
|
103
|
+
L(H, "useDismissableLayerSurface");
|
|
104
|
+
var ne = /* @__PURE__ */ L(() => !0, "IS_TRUE");
|
|
105
|
+
function U(e, t) {
|
|
106
|
+
let { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: i, dismissableSurfaces: a, shouldHandlePointerDownOutside: o = ne } = t, s = l(e), c = w.useRef(!1), u = w.useRef(!1), d = w.useRef(/* @__PURE__ */ new Map()), f = w.useRef(() => {});
|
|
107
|
+
return w.useEffect(() => {
|
|
108
|
+
function e() {
|
|
109
|
+
u.current = !1, i.current = !1, d.current.clear();
|
|
110
|
+
}
|
|
111
|
+
L(e, "resetOutsideInteraction");
|
|
112
|
+
function t() {
|
|
113
|
+
return Array.from(d.current.values()).some(Boolean);
|
|
114
|
+
}
|
|
115
|
+
L(t, "isOutsideInteractionIntercepted");
|
|
116
|
+
function l(e) {
|
|
117
|
+
if (!u.current) return;
|
|
118
|
+
let t = e.target;
|
|
119
|
+
t instanceof Node && [...a].some((e) => e.contains(t)) || d.current.set(e.type, !0), e.type === "click" && window.setTimeout(() => {
|
|
120
|
+
u.current && f.current();
|
|
121
|
+
}, 0);
|
|
122
|
+
}
|
|
123
|
+
L(l, "handleInteractionCapture");
|
|
124
|
+
function p(e) {
|
|
125
|
+
u.current && d.current.set(e.type, !1);
|
|
126
|
+
}
|
|
127
|
+
L(p, "handleInteractionBubble");
|
|
128
|
+
let m = /* @__PURE__ */ L((a) => {
|
|
129
|
+
if (a.target && !c.current) {
|
|
130
|
+
let l = function() {
|
|
131
|
+
n.removeEventListener("click", f.current);
|
|
132
|
+
let r = t();
|
|
133
|
+
e(), r || G(ee, s, p, { discrete: !0 });
|
|
134
|
+
};
|
|
135
|
+
if (L(l, "handleAndDispatchPointerDownOutsideEvent"), !o(a.target)) {
|
|
136
|
+
n.removeEventListener("click", f.current), e(), c.current = !1;
|
|
137
|
+
return;
|
|
138
|
+
}
|
|
139
|
+
let p = { originalEvent: a };
|
|
140
|
+
u.current = !0, i.current = r && a.button === 0, d.current.clear(), !r || a.button !== 0 ? l() : (n.removeEventListener("click", f.current), f.current = l, n.addEventListener("click", f.current, { once: !0 }));
|
|
141
|
+
} else n.removeEventListener("click", f.current), e();
|
|
142
|
+
c.current = !1;
|
|
143
|
+
}, "handlePointerDown"), h = [
|
|
144
|
+
"pointerup",
|
|
145
|
+
"mousedown",
|
|
146
|
+
"mouseup",
|
|
147
|
+
"touchstart",
|
|
148
|
+
"touchend",
|
|
149
|
+
"click"
|
|
150
|
+
];
|
|
151
|
+
for (let e of h) n.addEventListener(e, l, !0), n.addEventListener(e, p);
|
|
152
|
+
let g = window.setTimeout(() => {
|
|
153
|
+
n.addEventListener("pointerdown", m);
|
|
154
|
+
}, 0);
|
|
155
|
+
return () => {
|
|
156
|
+
window.clearTimeout(g), n.removeEventListener("pointerdown", m), n.removeEventListener("click", f.current);
|
|
157
|
+
for (let e of h) n.removeEventListener(e, l, !0), n.removeEventListener(e, p);
|
|
158
|
+
};
|
|
159
|
+
}, [
|
|
160
|
+
n,
|
|
161
|
+
s,
|
|
162
|
+
r,
|
|
163
|
+
i,
|
|
164
|
+
a,
|
|
165
|
+
o
|
|
166
|
+
]), { onPointerDownCapture: /* @__PURE__ */ L(() => c.current = !0, "onPointerDownCapture") };
|
|
167
|
+
}
|
|
168
|
+
L(U, "usePointerDownOutside");
|
|
169
|
+
function re(e, t = globalThis?.document) {
|
|
170
|
+
let n = l(e), r = w.useRef(!1);
|
|
171
|
+
return w.useEffect(() => {
|
|
172
|
+
let e = /* @__PURE__ */ L((e) => {
|
|
173
|
+
e.target && !r.current && G(te, n, { originalEvent: e }, { discrete: !1 });
|
|
174
|
+
}, "handleFocus");
|
|
175
|
+
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
|
|
176
|
+
}, [t, n]), {
|
|
177
|
+
onFocusCapture: /* @__PURE__ */ L(() => r.current = !0, "onFocusCapture"),
|
|
178
|
+
onBlurCapture: /* @__PURE__ */ L(() => r.current = !1, "onBlurCapture")
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
L(re, "useFocusOutside");
|
|
182
|
+
function W() {
|
|
183
|
+
let e = new CustomEvent(R);
|
|
184
|
+
document.dispatchEvent(e);
|
|
185
|
+
}
|
|
186
|
+
L(W, "dispatchUpdate");
|
|
187
|
+
function G(e, t, n, { discrete: r }) {
|
|
188
|
+
let i = n.originalEvent.target, a = new CustomEvent(e, {
|
|
189
|
+
bubbles: !1,
|
|
190
|
+
cancelable: !0,
|
|
191
|
+
detail: n
|
|
192
|
+
});
|
|
193
|
+
t && i.addEventListener(e, t, { once: !0 }), r ? m(i, a) : i.dispatchEvent(a);
|
|
194
|
+
}
|
|
195
|
+
L(G, "handleAndDispatchCustomEvent");
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region ../../node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
198
|
+
var ie = Object.defineProperty, ae = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ ((e, t) => ie(e, "name", {
|
|
199
|
+
value: t,
|
|
200
|
+
configurable: !0
|
|
201
|
+
}))(function(e, t) {
|
|
202
|
+
let { container: n, ...r } = e, [i, a] = w.useState(!1);
|
|
203
|
+
u(() => a(!0), []);
|
|
204
|
+
let o = n || i && globalThis?.document?.body;
|
|
205
|
+
return o ? A.createPortal(/* @__PURE__ */ O(c.div, {
|
|
206
|
+
...r,
|
|
207
|
+
ref: t
|
|
208
|
+
}), o) : null;
|
|
209
|
+
}, "Portal")), K = typeof document < "u" ? T : function() {};
|
|
210
|
+
function q(e, t) {
|
|
211
|
+
if (e === t) return !0;
|
|
212
|
+
if (typeof e != typeof t) return !1;
|
|
213
|
+
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
214
|
+
let n, r, i;
|
|
215
|
+
if (e && t && typeof e == "object") {
|
|
216
|
+
if (Array.isArray(e)) {
|
|
217
|
+
if (n = e.length, n !== t.length) return !1;
|
|
218
|
+
for (r = n; r-- !== 0;) if (!q(e[r], t[r])) return !1;
|
|
219
|
+
return !0;
|
|
220
|
+
}
|
|
221
|
+
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
222
|
+
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
223
|
+
for (r = n; r-- !== 0;) {
|
|
224
|
+
let n = i[r];
|
|
225
|
+
if (!(n === "_owner" && e.$$typeof) && !q(e[n], t[n])) return !1;
|
|
226
|
+
}
|
|
227
|
+
return !0;
|
|
228
|
+
}
|
|
229
|
+
return e !== e && t !== t;
|
|
230
|
+
}
|
|
231
|
+
function oe(e) {
|
|
232
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
233
|
+
}
|
|
234
|
+
function se(e, t) {
|
|
235
|
+
let n = oe(e);
|
|
236
|
+
return Math.round(t * n) / n;
|
|
237
|
+
}
|
|
238
|
+
function ce(e) {
|
|
239
|
+
let t = w.useRef(e);
|
|
240
|
+
return K(() => {
|
|
241
|
+
t.current = e;
|
|
242
|
+
}), t;
|
|
243
|
+
}
|
|
244
|
+
function le(e) {
|
|
245
|
+
e === void 0 && (e = {});
|
|
246
|
+
let { placement: t = "bottom", strategy: n = "absolute", middleware: r = [], platform: i, elements: { reference: a, floating: o } = {}, transform: s = !0, whileElementsMounted: c, open: l } = e, [u, d] = w.useState({
|
|
247
|
+
x: 0,
|
|
248
|
+
y: 0,
|
|
249
|
+
strategy: n,
|
|
250
|
+
placement: t,
|
|
251
|
+
middlewareData: {},
|
|
252
|
+
isPositioned: !1
|
|
253
|
+
}), [f, p] = w.useState(r);
|
|
254
|
+
q(f, r) || p(r);
|
|
255
|
+
let [m, h] = w.useState(null), [g, _] = w.useState(null), y = w.useCallback((e) => {
|
|
256
|
+
e !== C.current && (C.current = e, h(e));
|
|
257
|
+
}, []), b = w.useCallback((e) => {
|
|
258
|
+
e !== T.current && (T.current = e, _(e));
|
|
259
|
+
}, []), x = a || m, S = o || g, C = w.useRef(null), T = w.useRef(null), E = w.useRef(u), D = c != null, O = ce(c), k = ce(i), j = ce(l), M = w.useCallback(() => {
|
|
260
|
+
if (!C.current || !T.current) return;
|
|
261
|
+
let e = {
|
|
262
|
+
placement: t,
|
|
263
|
+
strategy: n,
|
|
264
|
+
middleware: f
|
|
265
|
+
};
|
|
266
|
+
k.current && (e.platform = k.current), v(C.current, T.current, e).then((e) => {
|
|
267
|
+
let t = {
|
|
268
|
+
...e,
|
|
269
|
+
isPositioned: j.current !== !1
|
|
270
|
+
};
|
|
271
|
+
N.current && !q(E.current, t) && (E.current = t, A.flushSync(() => {
|
|
272
|
+
d(t);
|
|
273
|
+
}));
|
|
274
|
+
});
|
|
275
|
+
}, [
|
|
276
|
+
f,
|
|
277
|
+
t,
|
|
278
|
+
n,
|
|
279
|
+
k,
|
|
280
|
+
j
|
|
281
|
+
]);
|
|
282
|
+
K(() => {
|
|
283
|
+
l === !1 && E.current.isPositioned && (E.current.isPositioned = !1, d((e) => ({
|
|
284
|
+
...e,
|
|
285
|
+
isPositioned: !1
|
|
286
|
+
})));
|
|
287
|
+
}, [l]);
|
|
288
|
+
let N = w.useRef(!1);
|
|
289
|
+
K(() => (N.current = !0, () => {
|
|
290
|
+
N.current = !1;
|
|
291
|
+
}), []), K(() => {
|
|
292
|
+
if (x && (C.current = x), S && (T.current = S), x && S) {
|
|
293
|
+
if (O.current) return O.current(x, S, M);
|
|
294
|
+
M();
|
|
295
|
+
}
|
|
296
|
+
}, [
|
|
297
|
+
x,
|
|
298
|
+
S,
|
|
299
|
+
M,
|
|
300
|
+
O,
|
|
301
|
+
D
|
|
302
|
+
]);
|
|
303
|
+
let P = w.useMemo(() => ({
|
|
304
|
+
reference: C,
|
|
305
|
+
floating: T,
|
|
306
|
+
setReference: y,
|
|
307
|
+
setFloating: b
|
|
308
|
+
}), [y, b]), F = w.useMemo(() => ({
|
|
309
|
+
reference: x,
|
|
310
|
+
floating: S
|
|
311
|
+
}), [x, S]), I = w.useMemo(() => {
|
|
312
|
+
let e = {
|
|
313
|
+
position: n,
|
|
314
|
+
left: 0,
|
|
315
|
+
top: 0
|
|
316
|
+
};
|
|
317
|
+
if (!F.floating) return e;
|
|
318
|
+
let t = se(F.floating, u.x), r = se(F.floating, u.y);
|
|
319
|
+
return s ? {
|
|
320
|
+
...e,
|
|
321
|
+
transform: "translate(" + t + "px, " + r + "px)",
|
|
322
|
+
...oe(F.floating) >= 1.5 && { willChange: "transform" }
|
|
323
|
+
} : {
|
|
324
|
+
position: n,
|
|
325
|
+
left: t,
|
|
326
|
+
top: r
|
|
327
|
+
};
|
|
328
|
+
}, [
|
|
329
|
+
n,
|
|
330
|
+
s,
|
|
331
|
+
F.floating,
|
|
332
|
+
u.x,
|
|
333
|
+
u.y
|
|
334
|
+
]);
|
|
335
|
+
return w.useMemo(() => ({
|
|
336
|
+
...u,
|
|
337
|
+
update: M,
|
|
338
|
+
refs: P,
|
|
339
|
+
elements: F,
|
|
340
|
+
floatingStyles: I
|
|
341
|
+
}), [
|
|
342
|
+
u,
|
|
343
|
+
M,
|
|
344
|
+
P,
|
|
345
|
+
F,
|
|
346
|
+
I
|
|
347
|
+
]);
|
|
348
|
+
}
|
|
349
|
+
var ue = (e) => {
|
|
350
|
+
function t(e) {
|
|
351
|
+
return {}.hasOwnProperty.call(e, "current");
|
|
352
|
+
}
|
|
353
|
+
return {
|
|
354
|
+
name: "arrow",
|
|
355
|
+
options: e,
|
|
356
|
+
fn(n) {
|
|
357
|
+
let { element: r, padding: i } = typeof e == "function" ? e(n) : e;
|
|
358
|
+
return r && t(r) ? r.current == null ? {} : S({
|
|
359
|
+
element: r.current,
|
|
360
|
+
padding: i
|
|
361
|
+
}).fn(n) : r ? S({
|
|
362
|
+
element: r,
|
|
363
|
+
padding: i
|
|
364
|
+
}).fn(n) : {};
|
|
365
|
+
}
|
|
366
|
+
};
|
|
367
|
+
}, de = (e, t) => {
|
|
368
|
+
let n = y(e);
|
|
369
|
+
return {
|
|
370
|
+
name: n.name,
|
|
371
|
+
fn: n.fn,
|
|
372
|
+
options: [e, t]
|
|
373
|
+
};
|
|
374
|
+
}, fe = (e, t) => {
|
|
375
|
+
let n = C(e);
|
|
376
|
+
return {
|
|
377
|
+
name: n.name,
|
|
378
|
+
fn: n.fn,
|
|
379
|
+
options: [e, t]
|
|
380
|
+
};
|
|
381
|
+
}, pe = (e, t) => ({
|
|
382
|
+
fn: g(e).fn,
|
|
383
|
+
options: [e, t]
|
|
384
|
+
}), me = (e, t) => {
|
|
385
|
+
let n = h(e);
|
|
386
|
+
return {
|
|
387
|
+
name: n.name,
|
|
388
|
+
fn: n.fn,
|
|
389
|
+
options: [e, t]
|
|
390
|
+
};
|
|
391
|
+
}, he = (e, t) => {
|
|
392
|
+
let n = _(e);
|
|
393
|
+
return {
|
|
394
|
+
name: n.name,
|
|
395
|
+
fn: n.fn,
|
|
396
|
+
options: [e, t]
|
|
397
|
+
};
|
|
398
|
+
}, ge = (e, t) => {
|
|
399
|
+
let n = b(e);
|
|
400
|
+
return {
|
|
401
|
+
name: n.name,
|
|
402
|
+
fn: n.fn,
|
|
403
|
+
options: [e, t]
|
|
404
|
+
};
|
|
405
|
+
}, _e = (e, t) => {
|
|
406
|
+
let n = ue(e);
|
|
407
|
+
return {
|
|
408
|
+
name: n.name,
|
|
409
|
+
fn: n.fn,
|
|
410
|
+
options: [e, t]
|
|
411
|
+
};
|
|
412
|
+
}, ve = Object.defineProperty, ye = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ ((e, t) => ve(e, "name", {
|
|
413
|
+
value: t,
|
|
414
|
+
configurable: !0
|
|
415
|
+
}))(function(e, t) {
|
|
416
|
+
let { children: n, width: r = 10, height: i = 5, ...a } = e;
|
|
417
|
+
return /* @__PURE__ */ O(c.svg, {
|
|
418
|
+
...a,
|
|
419
|
+
ref: t,
|
|
420
|
+
width: r,
|
|
421
|
+
height: i,
|
|
422
|
+
viewBox: "0 0 30 10",
|
|
423
|
+
preserveAspectRatio: "none",
|
|
424
|
+
children: e.asChild ? n : /* @__PURE__ */ O("polygon", { points: "0,0 30,0 15,10" })
|
|
425
|
+
});
|
|
426
|
+
}, "Arrow")), be = Object.defineProperty, J = (e, t) => be(e, "name", {
|
|
427
|
+
value: t,
|
|
428
|
+
configurable: !0
|
|
429
|
+
}), xe = "Popper", [Se, Ce] = o(xe), [we, Te] = Se(xe), Ee = /* @__PURE__ */ J((e) => {
|
|
430
|
+
let { __scopePopper: t, children: n } = e, [r, i] = w.useState(null), [a, o] = w.useState(void 0);
|
|
431
|
+
return /* @__PURE__ */ O(we, {
|
|
432
|
+
scope: t,
|
|
433
|
+
anchor: r,
|
|
434
|
+
onAnchorChange: i,
|
|
435
|
+
placementState: a,
|
|
436
|
+
setPlacementState: o,
|
|
437
|
+
children: n
|
|
438
|
+
});
|
|
439
|
+
}, "Popper"), De = "PopperAnchor", Oe = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ J(function(e, t) {
|
|
440
|
+
let { __scopePopper: n, virtualRef: r, ...a } = e, o = Te(De, n), s = w.useRef(null), l = o.onAnchorChange, u = i(t, w.useCallback((e) => {
|
|
441
|
+
s.current = e, e && l(e);
|
|
442
|
+
}, [l])), d = w.useRef(null);
|
|
443
|
+
w.useEffect(() => {
|
|
444
|
+
if (!r) return;
|
|
445
|
+
let e = d.current;
|
|
446
|
+
d.current = r.current, e !== d.current && l(d.current);
|
|
447
|
+
});
|
|
448
|
+
let f = o.placementState && Y(o.placementState), p = f?.[0], m = f?.[1];
|
|
449
|
+
return r ? null : /* @__PURE__ */ O(c.div, {
|
|
450
|
+
"data-radix-popper-side": p,
|
|
451
|
+
"data-radix-popper-align": m,
|
|
452
|
+
...a,
|
|
453
|
+
ref: u
|
|
454
|
+
});
|
|
455
|
+
}, "PopperAnchor")), ke = "PopperContent", [Ae, je] = Se(ke), Me = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ J(function(e, t) {
|
|
456
|
+
let { __scopePopper: n, side: r = "bottom", sideOffset: a = 0, align: o = "center", alignOffset: s = 0, arrowPadding: d = 0, avoidCollisions: f = !0, collisionBoundary: m = [], collisionPadding: h = 0, sticky: g = "partial", hideWhenDetached: _ = !1, updatePositionStrategy: v = "optimized", onPlaced: y, ...b } = e, S = Te(ke, n), [C, T] = w.useState(null), E = i(t, T), [D, k] = w.useState(null), A = p(D), j = A?.width ?? 0, M = A?.height ?? 0, N = r + (o === "center" ? "" : "-" + o), P = typeof h == "number" ? h : {
|
|
457
|
+
top: 0,
|
|
458
|
+
right: 0,
|
|
459
|
+
bottom: 0,
|
|
460
|
+
left: 0,
|
|
461
|
+
...h
|
|
462
|
+
}, F = Array.isArray(m) ? m : [m], I = F.length > 0, L = {
|
|
463
|
+
padding: P,
|
|
464
|
+
boundary: F.filter(Ie),
|
|
465
|
+
altBoundary: I
|
|
466
|
+
}, { refs: R, floatingStyles: ee, placement: te, isPositioned: z, middlewareData: B } = le({
|
|
467
|
+
strategy: "fixed",
|
|
468
|
+
placement: N,
|
|
469
|
+
whileElementsMounted: /* @__PURE__ */ J((...e) => x(...e, { animationFrame: v === "always" }), "whileElementsMounted"),
|
|
470
|
+
elements: { reference: S.anchor },
|
|
471
|
+
middleware: [
|
|
472
|
+
de({
|
|
473
|
+
mainAxis: a + M,
|
|
474
|
+
alignmentAxis: s
|
|
475
|
+
}),
|
|
476
|
+
f && fe({
|
|
477
|
+
mainAxis: !0,
|
|
478
|
+
crossAxis: !1,
|
|
479
|
+
limiter: g === "partial" ? pe() : void 0,
|
|
480
|
+
...L
|
|
481
|
+
}),
|
|
482
|
+
f && me({ ...L }),
|
|
483
|
+
he({
|
|
484
|
+
...L,
|
|
485
|
+
apply: /* @__PURE__ */ J(({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
|
|
486
|
+
let { width: i, height: a } = t.reference, o = e.floating.style;
|
|
487
|
+
o.setProperty("--radix-popper-available-width", `${n}px`), o.setProperty("--radix-popper-available-height", `${r}px`), o.setProperty("--radix-popper-anchor-width", `${i}px`), o.setProperty("--radix-popper-anchor-height", `${a}px`);
|
|
488
|
+
}, "apply")
|
|
489
|
+
}),
|
|
490
|
+
D && _e({
|
|
491
|
+
element: D,
|
|
492
|
+
padding: d
|
|
493
|
+
}),
|
|
494
|
+
Le({
|
|
495
|
+
arrowWidth: j,
|
|
496
|
+
arrowHeight: M
|
|
497
|
+
}),
|
|
498
|
+
_ && ge({
|
|
499
|
+
strategy: "referenceHidden",
|
|
500
|
+
...L,
|
|
501
|
+
boundary: I ? L.boundary : void 0
|
|
502
|
+
})
|
|
503
|
+
]
|
|
504
|
+
}), V = S.setPlacementState;
|
|
505
|
+
u(() => (V(te), () => {
|
|
506
|
+
V(void 0);
|
|
507
|
+
}), [te, V]);
|
|
508
|
+
let [H, ne] = Y(te), U = l(y);
|
|
509
|
+
u(() => {
|
|
510
|
+
z && U?.();
|
|
511
|
+
}, [z, U]);
|
|
512
|
+
let re = B.arrow?.x, W = B.arrow?.y, G = B.arrow?.centerOffset !== 0, [ie, ae] = w.useState();
|
|
513
|
+
return u(() => {
|
|
514
|
+
C && ae(window.getComputedStyle(C).zIndex);
|
|
515
|
+
}, [C]), /* @__PURE__ */ O("div", {
|
|
516
|
+
ref: R.setFloating,
|
|
517
|
+
"data-radix-popper-content-wrapper": "",
|
|
518
|
+
style: {
|
|
519
|
+
...ee,
|
|
520
|
+
transform: z ? ee.transform : "translate(0, -200%)",
|
|
521
|
+
minWidth: "max-content",
|
|
522
|
+
zIndex: ie,
|
|
523
|
+
"--radix-popper-transform-origin": [B.transformOrigin?.x, B.transformOrigin?.y].join(" "),
|
|
524
|
+
...B.hide?.referenceHidden && {
|
|
525
|
+
visibility: "hidden",
|
|
526
|
+
pointerEvents: "none"
|
|
527
|
+
}
|
|
528
|
+
},
|
|
529
|
+
dir: e.dir,
|
|
530
|
+
children: /* @__PURE__ */ O(Ae, {
|
|
531
|
+
scope: n,
|
|
532
|
+
placedSide: H,
|
|
533
|
+
placedAlign: ne,
|
|
534
|
+
onArrowChange: k,
|
|
535
|
+
arrowX: re,
|
|
536
|
+
arrowY: W,
|
|
537
|
+
shouldHideArrow: G,
|
|
538
|
+
children: /* @__PURE__ */ O(c.div, {
|
|
539
|
+
"data-side": H,
|
|
540
|
+
"data-align": ne,
|
|
541
|
+
...b,
|
|
542
|
+
ref: E,
|
|
543
|
+
style: {
|
|
544
|
+
...b.style,
|
|
545
|
+
animation: z ? b.style?.animation : "none"
|
|
546
|
+
}
|
|
547
|
+
})
|
|
548
|
+
})
|
|
549
|
+
});
|
|
550
|
+
}, "PopperContent")), Ne = "PopperArrow", Pe = {
|
|
551
|
+
top: "bottom",
|
|
552
|
+
right: "left",
|
|
553
|
+
bottom: "top",
|
|
554
|
+
left: "right"
|
|
555
|
+
}, Fe = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ J(function(e, t) {
|
|
556
|
+
let { __scopePopper: n, ...r } = e, i = je(Ne, n), a = Pe[i.placedSide];
|
|
557
|
+
return /* @__PURE__ */ O("span", {
|
|
558
|
+
ref: i.onArrowChange,
|
|
559
|
+
style: {
|
|
560
|
+
position: "absolute",
|
|
561
|
+
left: i.arrowX,
|
|
562
|
+
top: i.arrowY,
|
|
563
|
+
[a]: 0,
|
|
564
|
+
transformOrigin: {
|
|
565
|
+
top: "",
|
|
566
|
+
right: "0 0",
|
|
567
|
+
bottom: "center 0",
|
|
568
|
+
left: "100% 0"
|
|
569
|
+
}[i.placedSide],
|
|
570
|
+
transform: {
|
|
571
|
+
top: "translateY(100%)",
|
|
572
|
+
right: "translateY(50%) rotate(90deg) translateX(-50%)",
|
|
573
|
+
bottom: "rotate(180deg)",
|
|
574
|
+
left: "translateY(50%) rotate(-90deg) translateX(50%)"
|
|
575
|
+
}[i.placedSide],
|
|
576
|
+
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
577
|
+
},
|
|
578
|
+
children: /* @__PURE__ */ O(ye, {
|
|
579
|
+
...r,
|
|
580
|
+
ref: t,
|
|
581
|
+
style: {
|
|
582
|
+
...r.style,
|
|
583
|
+
display: "block"
|
|
584
|
+
}
|
|
585
|
+
})
|
|
586
|
+
});
|
|
587
|
+
}, "PopperArrow"));
|
|
588
|
+
function Ie(e) {
|
|
589
|
+
return e !== null;
|
|
590
|
+
}
|
|
591
|
+
J(Ie, "isNotNull");
|
|
592
|
+
var Le = /* @__PURE__ */ J((e) => ({
|
|
593
|
+
name: "transformOrigin",
|
|
594
|
+
options: e,
|
|
595
|
+
fn(t) {
|
|
596
|
+
let { placement: n, rects: r, middlewareData: i } = t, a = i.arrow?.centerOffset !== 0, o = a ? 0 : e.arrowWidth, s = a ? 0 : e.arrowHeight, [c, l] = Y(n), u = {
|
|
597
|
+
start: "0%",
|
|
598
|
+
center: "50%",
|
|
599
|
+
end: "100%"
|
|
600
|
+
}[l], d = (i.arrow?.x ?? 0) + o / 2, f = (i.arrow?.y ?? 0) + s / 2, p = "", m = "";
|
|
601
|
+
return c === "bottom" ? (p = a ? u : `${d}px`, m = `${-s}px`) : c === "top" ? (p = a ? u : `${d}px`, m = `${r.floating.height + s}px`) : c === "right" ? (p = `${-s}px`, m = a ? u : `${f}px`) : c === "left" && (p = `${r.floating.width + s}px`, m = a ? u : `${f}px`), { data: {
|
|
602
|
+
x: p,
|
|
603
|
+
y: m
|
|
604
|
+
} };
|
|
605
|
+
}
|
|
606
|
+
}), "transformOrigin");
|
|
607
|
+
function Y(e) {
|
|
608
|
+
let [t, n = "center"] = e.split("-");
|
|
609
|
+
return [t, n];
|
|
610
|
+
}
|
|
611
|
+
J(Y, "getSideAndAlignFromPlacement");
|
|
612
|
+
var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
613
|
+
Arrow: () => Ct,
|
|
614
|
+
Content: () => St,
|
|
615
|
+
Portal: () => xt,
|
|
616
|
+
Provider: () => vt,
|
|
617
|
+
Root: () => yt,
|
|
618
|
+
Tooltip: () => et,
|
|
619
|
+
TooltipArrow: () => dt,
|
|
620
|
+
TooltipContent: () => st,
|
|
621
|
+
TooltipPortal: () => ot,
|
|
622
|
+
TooltipProvider: () => Ze,
|
|
623
|
+
TooltipTrigger: () => nt,
|
|
624
|
+
Trigger: () => bt,
|
|
625
|
+
createTooltipScope: () => Ge
|
|
626
|
+
}), Ue = Object.defineProperty, X = (e, t) => Ue(e, "name", {
|
|
627
|
+
value: t,
|
|
628
|
+
configurable: !0
|
|
629
|
+
}), [We, Ge] = o("Tooltip", [Ce]), Z = Ce(), Ke = "TooltipProvider", qe = 700, Je = "tooltip.open", [Ye, Xe] = We(Ke), Ze = /* @__PURE__ */ X((e) => {
|
|
630
|
+
let { __scopeTooltip: t, delayDuration: n = qe, skipDelayDuration: r = 300, disableHoverableContent: i = !1, children: a } = e, o = w.useRef(!0), s = w.useRef(!1), c = w.useRef(0);
|
|
631
|
+
return w.useEffect(() => {
|
|
632
|
+
let e = c.current;
|
|
633
|
+
return () => window.clearTimeout(e);
|
|
634
|
+
}, []), /* @__PURE__ */ O(Ye, {
|
|
635
|
+
scope: t,
|
|
636
|
+
isOpenDelayedRef: o,
|
|
637
|
+
delayDuration: n,
|
|
638
|
+
onOpen: w.useCallback(() => {
|
|
639
|
+
r <= 0 || (window.clearTimeout(c.current), o.current = !1);
|
|
640
|
+
}, [r]),
|
|
641
|
+
onClose: w.useCallback(() => {
|
|
642
|
+
r <= 0 || (window.clearTimeout(c.current), c.current = window.setTimeout(() => o.current = !0, r));
|
|
643
|
+
}, [r]),
|
|
644
|
+
isPointerInTransitRef: s,
|
|
645
|
+
onPointerInTransitChange: w.useCallback((e) => {
|
|
646
|
+
s.current = e;
|
|
647
|
+
}, []),
|
|
648
|
+
disableHoverableContent: i,
|
|
649
|
+
children: a
|
|
650
|
+
});
|
|
651
|
+
}, "TooltipProvider"), Qe = "Tooltip", [$e, Q] = We(Qe), et = /* @__PURE__ */ X((e) => {
|
|
652
|
+
let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = e, l = Xe(Qe, e.__scopeTooltip), u = Z(t), [f, p] = w.useState(null), [m, h] = w.useState(void 0), g = d(), _ = w.useRef(0), v = s ?? l.disableHoverableContent, y = c ?? l.delayDuration, b = w.useRef(!1), [x, S] = a({
|
|
653
|
+
prop: r,
|
|
654
|
+
defaultProp: i ?? !1,
|
|
655
|
+
onChange: /* @__PURE__ */ X((e) => {
|
|
656
|
+
e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(Je))) : l.onClose(), o?.(e);
|
|
657
|
+
}, "onChange"),
|
|
658
|
+
caller: Qe
|
|
659
|
+
}), C = w.useMemo(() => x ? b.current ? "delayed-open" : "instant-open" : "closed", [x]), T = w.useCallback(() => {
|
|
660
|
+
window.clearTimeout(_.current), _.current = 0, b.current = !1, S(!0);
|
|
661
|
+
}, [S]), E = w.useCallback(() => {
|
|
662
|
+
window.clearTimeout(_.current), _.current = 0, S(!1);
|
|
663
|
+
}, [S]), D = w.useCallback(() => {
|
|
664
|
+
window.clearTimeout(_.current), _.current = window.setTimeout(() => {
|
|
665
|
+
b.current = !0, S(!0), _.current = 0;
|
|
666
|
+
}, y);
|
|
667
|
+
}, [y, S]);
|
|
668
|
+
w.useEffect(() => () => {
|
|
669
|
+
_.current &&= (window.clearTimeout(_.current), 0);
|
|
670
|
+
}, []);
|
|
671
|
+
let k = m ?? g;
|
|
672
|
+
return /* @__PURE__ */ O(Re, {
|
|
673
|
+
...u,
|
|
674
|
+
children: /* @__PURE__ */ O($e, {
|
|
675
|
+
scope: t,
|
|
676
|
+
contentId: k,
|
|
677
|
+
setContentId: h,
|
|
678
|
+
open: x,
|
|
679
|
+
stateAttribute: C,
|
|
680
|
+
trigger: f,
|
|
681
|
+
onTriggerChange: p,
|
|
682
|
+
onTriggerEnter: w.useCallback(() => {
|
|
683
|
+
l.isOpenDelayedRef.current ? D() : T();
|
|
684
|
+
}, [
|
|
685
|
+
l.isOpenDelayedRef,
|
|
686
|
+
D,
|
|
687
|
+
T
|
|
688
|
+
]),
|
|
689
|
+
onTriggerLeave: w.useCallback(() => {
|
|
690
|
+
v ? E() : (window.clearTimeout(_.current), _.current = 0);
|
|
691
|
+
}, [E, v]),
|
|
692
|
+
onOpen: T,
|
|
693
|
+
onClose: E,
|
|
694
|
+
disableHoverableContent: v,
|
|
695
|
+
children: n
|
|
696
|
+
})
|
|
697
|
+
});
|
|
698
|
+
}, "Tooltip"), tt = "TooltipTrigger", nt = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
699
|
+
let { __scopeTooltip: n, ...r } = e, a = Q(tt, n), o = Xe(tt, n), s = Z(n), l = i(t, w.useRef(null), a.onTriggerChange), u = w.useRef(!1), d = w.useRef(!1), p = w.useCallback(() => u.current = !1, []);
|
|
700
|
+
return w.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ O(ze, {
|
|
701
|
+
asChild: !0,
|
|
702
|
+
...s,
|
|
703
|
+
children: /* @__PURE__ */ O(c.button, {
|
|
704
|
+
"aria-describedby": a.open ? a.contentId : void 0,
|
|
705
|
+
"data-state": a.stateAttribute,
|
|
706
|
+
...r,
|
|
707
|
+
ref: l,
|
|
708
|
+
onPointerMove: f(e.onPointerMove, (e) => {
|
|
709
|
+
e.pointerType !== "touch" && !d.current && !o.isPointerInTransitRef.current && (a.onTriggerEnter(), d.current = !0);
|
|
710
|
+
}),
|
|
711
|
+
onPointerLeave: f(e.onPointerLeave, () => {
|
|
712
|
+
a.onTriggerLeave(), d.current = !1;
|
|
713
|
+
}),
|
|
714
|
+
onPointerDown: f(e.onPointerDown, () => {
|
|
715
|
+
a.open && a.onClose(), u.current = !0, document.addEventListener("pointerup", p, { once: !0 });
|
|
716
|
+
}),
|
|
717
|
+
onFocus: f(e.onFocus, () => {
|
|
718
|
+
u.current || a.onOpen();
|
|
719
|
+
}),
|
|
720
|
+
onBlur: f(e.onBlur, a.onClose),
|
|
721
|
+
onClick: f(e.onClick, a.onClose)
|
|
722
|
+
})
|
|
723
|
+
});
|
|
724
|
+
}, "TooltipTrigger")), rt = "TooltipPortal", [it, at] = We(rt, { forceMount: void 0 }), ot = /* @__PURE__ */ X((e) => {
|
|
725
|
+
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = Q(rt, t);
|
|
726
|
+
return /* @__PURE__ */ O(it, {
|
|
727
|
+
scope: t,
|
|
728
|
+
forceMount: n,
|
|
729
|
+
children: /* @__PURE__ */ O(s, {
|
|
730
|
+
present: n || a.open,
|
|
731
|
+
children: /* @__PURE__ */ O(ae, {
|
|
732
|
+
asChild: !0,
|
|
733
|
+
container: i,
|
|
734
|
+
children: r
|
|
735
|
+
})
|
|
736
|
+
})
|
|
737
|
+
});
|
|
738
|
+
}, "TooltipPortal"), $ = "TooltipContent", st = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
739
|
+
let n = at($, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, o = Q($, e.__scopeTooltip);
|
|
740
|
+
return /* @__PURE__ */ O(s, {
|
|
741
|
+
present: r || o.open,
|
|
742
|
+
children: o.disableHoverableContent ? /* @__PURE__ */ O(ut, {
|
|
743
|
+
side: i,
|
|
744
|
+
...a,
|
|
745
|
+
ref: t
|
|
746
|
+
}) : /* @__PURE__ */ O(ct, {
|
|
747
|
+
side: i,
|
|
748
|
+
...a,
|
|
749
|
+
ref: t
|
|
750
|
+
})
|
|
751
|
+
});
|
|
752
|
+
}, "TooltipContent")), ct = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
753
|
+
let n = Q($, e.__scopeTooltip), r = Xe($, e.__scopeTooltip), a = w.useRef(null), o = i(t, a), [s, c] = w.useState(null), { trigger: l, onClose: u } = n, d = a.current, { onPointerInTransitChange: f } = r, p = w.useCallback(() => {
|
|
754
|
+
c(null), f(!1);
|
|
755
|
+
}, [f]), m = w.useCallback((e, t) => {
|
|
756
|
+
let n = e.currentTarget, r = {
|
|
757
|
+
x: e.clientX,
|
|
758
|
+
y: e.clientY
|
|
759
|
+
}, i = pt(r, ft(r, n.getBoundingClientRect())), a = mt(t.getBoundingClientRect()), o = gt([...i, ...a]);
|
|
760
|
+
c(o), f(!0);
|
|
761
|
+
}, [f]);
|
|
762
|
+
return w.useEffect(() => () => p(), [p]), w.useEffect(() => {
|
|
763
|
+
if (l && d) {
|
|
764
|
+
let e = /* @__PURE__ */ X((e) => m(e, d), "handleTriggerLeave"), t = /* @__PURE__ */ X((e) => m(e, l), "handleContentLeave");
|
|
765
|
+
return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
|
|
766
|
+
l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
|
|
767
|
+
};
|
|
768
|
+
}
|
|
769
|
+
}, [
|
|
770
|
+
l,
|
|
771
|
+
d,
|
|
772
|
+
m,
|
|
773
|
+
p
|
|
774
|
+
]), w.useEffect(() => {
|
|
775
|
+
if (s) {
|
|
776
|
+
let e = /* @__PURE__ */ X((e) => {
|
|
777
|
+
let t = e.target, n = {
|
|
778
|
+
x: e.clientX,
|
|
779
|
+
y: e.clientY
|
|
780
|
+
}, r = l?.contains(t) || d?.contains(t), i = !ht(n, s);
|
|
781
|
+
r ? p() : i && (p(), u());
|
|
782
|
+
}, "handleTrackPointerGrace");
|
|
783
|
+
return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
|
|
784
|
+
}
|
|
785
|
+
}, [
|
|
786
|
+
l,
|
|
787
|
+
d,
|
|
788
|
+
s,
|
|
789
|
+
u,
|
|
790
|
+
p
|
|
791
|
+
]), /* @__PURE__ */ O(ut, {
|
|
792
|
+
...e,
|
|
793
|
+
ref: o
|
|
794
|
+
});
|
|
795
|
+
}, "TooltipContentHoverable")), lt = r("TooltipContent"), ut = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
796
|
+
let { __scopeTooltip: n, children: r, "aria-label": i, id: a, onEscapeKeyDown: o, onPointerDownOutside: s, ...c } = e, l = Q($, n), d = Z(n), { onClose: f } = l;
|
|
797
|
+
w.useEffect(() => (document.addEventListener(Je, f), () => document.removeEventListener(Je, f)), [f]), w.useEffect(() => {
|
|
798
|
+
if (l.trigger) {
|
|
799
|
+
let e = /* @__PURE__ */ X((e) => {
|
|
800
|
+
e.target instanceof Node && e.target.contains(l.trigger) && f();
|
|
801
|
+
}, "handleScroll");
|
|
802
|
+
return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
|
|
803
|
+
}
|
|
804
|
+
}, [l.trigger, f]);
|
|
805
|
+
let { setContentId: p } = l;
|
|
806
|
+
return u(() => (p(a), () => {
|
|
807
|
+
p(void 0);
|
|
808
|
+
}), [a, p]), /* @__PURE__ */ O(V, {
|
|
809
|
+
asChild: !0,
|
|
810
|
+
disableOutsidePointerEvents: !1,
|
|
811
|
+
onEscapeKeyDown: o,
|
|
812
|
+
onPointerDownOutside: s,
|
|
813
|
+
onFocusOutside: (e) => e.preventDefault(),
|
|
814
|
+
onDismiss: f,
|
|
815
|
+
children: /* @__PURE__ */ k(Be, {
|
|
816
|
+
"data-state": l.stateAttribute,
|
|
817
|
+
role: i ? void 0 : "tooltip",
|
|
818
|
+
id: i ? void 0 : l.contentId,
|
|
819
|
+
...d,
|
|
820
|
+
...c,
|
|
821
|
+
ref: t,
|
|
822
|
+
style: {
|
|
823
|
+
...c.style,
|
|
824
|
+
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
825
|
+
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
826
|
+
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
827
|
+
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
828
|
+
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
829
|
+
},
|
|
830
|
+
children: [/* @__PURE__ */ O(lt, { children: r }), i ? /* @__PURE__ */ O(F, {
|
|
831
|
+
id: l.contentId,
|
|
832
|
+
role: "tooltip",
|
|
833
|
+
children: i
|
|
834
|
+
}) : null]
|
|
835
|
+
})
|
|
836
|
+
});
|
|
837
|
+
}, "TooltipContentImpl")), dt = /* @__PURE__ */ w.forwardRef(/* @__PURE__ */ X(function(e, t) {
|
|
838
|
+
let { __scopeTooltip: n, ...r } = e;
|
|
839
|
+
return /* @__PURE__ */ O(Ve, {
|
|
840
|
+
...Z(n),
|
|
841
|
+
...r,
|
|
842
|
+
ref: t
|
|
843
|
+
});
|
|
844
|
+
}, "TooltipArrow"));
|
|
845
|
+
function ft(e, t) {
|
|
846
|
+
let n = Math.abs(t.top - e.y), r = Math.abs(t.bottom - e.y), i = Math.abs(t.right - e.x), a = Math.abs(t.left - e.x);
|
|
847
|
+
switch (Math.min(n, r, i, a)) {
|
|
848
|
+
case a: return "left";
|
|
849
|
+
case i: return "right";
|
|
850
|
+
case n: return "top";
|
|
851
|
+
case r: return "bottom";
|
|
852
|
+
default: throw Error("unreachable");
|
|
853
|
+
}
|
|
854
|
+
}
|
|
855
|
+
X(ft, "getExitSideFromRect");
|
|
856
|
+
function pt(e, t, n = 5) {
|
|
857
|
+
let r = [];
|
|
858
|
+
switch (t) {
|
|
859
|
+
case "top":
|
|
860
|
+
r.push({
|
|
861
|
+
x: e.x - n,
|
|
862
|
+
y: e.y + n
|
|
863
|
+
}, {
|
|
864
|
+
x: e.x + n,
|
|
865
|
+
y: e.y + n
|
|
866
|
+
});
|
|
867
|
+
break;
|
|
868
|
+
case "bottom":
|
|
869
|
+
r.push({
|
|
870
|
+
x: e.x - n,
|
|
871
|
+
y: e.y - n
|
|
872
|
+
}, {
|
|
873
|
+
x: e.x + n,
|
|
874
|
+
y: e.y - n
|
|
875
|
+
});
|
|
876
|
+
break;
|
|
877
|
+
case "left":
|
|
878
|
+
r.push({
|
|
879
|
+
x: e.x + n,
|
|
880
|
+
y: e.y - n
|
|
881
|
+
}, {
|
|
882
|
+
x: e.x + n,
|
|
883
|
+
y: e.y + n
|
|
884
|
+
});
|
|
885
|
+
break;
|
|
886
|
+
case "right":
|
|
887
|
+
r.push({
|
|
888
|
+
x: e.x - n,
|
|
889
|
+
y: e.y - n
|
|
890
|
+
}, {
|
|
891
|
+
x: e.x - n,
|
|
892
|
+
y: e.y + n
|
|
893
|
+
});
|
|
894
|
+
break;
|
|
895
|
+
}
|
|
896
|
+
return r;
|
|
897
|
+
}
|
|
898
|
+
X(pt, "getPaddedExitPoints");
|
|
899
|
+
function mt(e) {
|
|
900
|
+
let { top: t, right: n, bottom: r, left: i } = e;
|
|
901
|
+
return [
|
|
902
|
+
{
|
|
903
|
+
x: i,
|
|
904
|
+
y: t
|
|
905
|
+
},
|
|
906
|
+
{
|
|
907
|
+
x: n,
|
|
908
|
+
y: t
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
x: n,
|
|
912
|
+
y: r
|
|
913
|
+
},
|
|
914
|
+
{
|
|
915
|
+
x: i,
|
|
916
|
+
y: r
|
|
917
|
+
}
|
|
918
|
+
];
|
|
919
|
+
}
|
|
920
|
+
X(mt, "getPointsFromRect");
|
|
921
|
+
function ht(e, t) {
|
|
922
|
+
let { x: n, y: r } = e, i = !1;
|
|
923
|
+
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
924
|
+
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
|
|
925
|
+
l > r != d > r && n < (u - c) * (r - l) / (d - l) + c && (i = !i);
|
|
926
|
+
}
|
|
927
|
+
return i;
|
|
928
|
+
}
|
|
929
|
+
X(ht, "isPointInPolygon");
|
|
930
|
+
function gt(e) {
|
|
931
|
+
let t = e.slice();
|
|
932
|
+
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), _t(t);
|
|
933
|
+
}
|
|
934
|
+
X(gt, "getHull");
|
|
935
|
+
function _t(e) {
|
|
936
|
+
if (e.length <= 1) return e.slice();
|
|
937
|
+
let t = [];
|
|
938
|
+
for (let n = 0; n < e.length; n++) {
|
|
939
|
+
let r = e[n];
|
|
940
|
+
for (; t.length >= 2;) {
|
|
941
|
+
let e = t[t.length - 1], n = t[t.length - 2];
|
|
942
|
+
if ((e.x - n.x) * (r.y - n.y) >= (e.y - n.y) * (r.x - n.x)) t.pop();
|
|
943
|
+
else break;
|
|
944
|
+
}
|
|
945
|
+
t.push(r);
|
|
946
|
+
}
|
|
947
|
+
t.pop();
|
|
948
|
+
let n = [];
|
|
949
|
+
for (let t = e.length - 1; t >= 0; t--) {
|
|
950
|
+
let r = e[t];
|
|
951
|
+
for (; n.length >= 2;) {
|
|
952
|
+
let e = n[n.length - 1], t = n[n.length - 2];
|
|
953
|
+
if ((e.x - t.x) * (r.y - t.y) >= (e.y - t.y) * (r.x - t.x)) n.pop();
|
|
954
|
+
else break;
|
|
955
|
+
}
|
|
956
|
+
n.push(r);
|
|
957
|
+
}
|
|
958
|
+
return n.pop(), t.length === 1 && n.length === 1 && t[0].x === n[0].x && t[0].y === n[0].y ? t : t.concat(n);
|
|
959
|
+
}
|
|
960
|
+
X(_t, "getHullPresorted");
|
|
961
|
+
var vt = Ze, yt = et, bt = nt, xt = ot, St = st, Ct = dt, wt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Tt = t, Et = (e, t) => (n) => {
|
|
962
|
+
if (t?.variants == null) return Tt(e, n?.class, n?.className);
|
|
963
|
+
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
964
|
+
let t = n?.[e], a = i?.[e];
|
|
965
|
+
if (t === null) return null;
|
|
966
|
+
let o = wt(t) || wt(a);
|
|
967
|
+
return r[e][o];
|
|
968
|
+
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
969
|
+
let [n, r] = t;
|
|
970
|
+
return r === void 0 || (e[n] = r), e;
|
|
971
|
+
}, {});
|
|
972
|
+
return Tt(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
973
|
+
let { class: n, className: r, ...a } = t;
|
|
974
|
+
return Object.entries(a).every((e) => {
|
|
975
|
+
let [t, n] = e;
|
|
976
|
+
return Array.isArray(n) ? n.includes({
|
|
977
|
+
...i,
|
|
978
|
+
...o
|
|
979
|
+
}[t]) : {
|
|
980
|
+
...i,
|
|
981
|
+
...o
|
|
982
|
+
}[t] === n;
|
|
983
|
+
}) ? [
|
|
984
|
+
...e,
|
|
985
|
+
n,
|
|
986
|
+
r
|
|
987
|
+
] : e;
|
|
988
|
+
}, []), n?.class, n?.className);
|
|
989
|
+
};
|
|
990
|
+
//#endregion
|
|
991
|
+
//#region lib/hooks/use-fullscreen-element.ts
|
|
992
|
+
function Dt(e) {
|
|
993
|
+
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
994
|
+
}
|
|
995
|
+
var Ot = /* @__PURE__ */ new Set([
|
|
996
|
+
"VIDEO",
|
|
997
|
+
"IFRAME",
|
|
998
|
+
"CANVAS",
|
|
999
|
+
"IMG",
|
|
1000
|
+
"EMBED"
|
|
1001
|
+
]);
|
|
1002
|
+
function kt(e) {
|
|
1003
|
+
let t = e.fullscreenElement;
|
|
1004
|
+
return t && !Ot.has(t.tagName) ? t : null;
|
|
1005
|
+
}
|
|
1006
|
+
function At() {
|
|
1007
|
+
return D(Dt, () => kt(document), () => null);
|
|
1008
|
+
}
|
|
1009
|
+
//#endregion
|
|
1010
|
+
//#region lib/components/ui/overlays/tooltip/tooltip.tsx
|
|
1011
|
+
function jt({ delayDuration: e = 0, ...t }) {
|
|
1012
|
+
return /* @__PURE__ */ O(vt, {
|
|
1013
|
+
"data-slot": "tooltip-provider",
|
|
1014
|
+
delayDuration: e,
|
|
1015
|
+
...t
|
|
1016
|
+
});
|
|
1017
|
+
}
|
|
1018
|
+
function Mt({ content: e, children: t, className: r, container: i, side: a, ...o }) {
|
|
1019
|
+
return /* @__PURE__ */ k(Nt, {
|
|
1020
|
+
...o,
|
|
1021
|
+
children: [/* @__PURE__ */ O(Pt, {
|
|
1022
|
+
asChild: !0,
|
|
1023
|
+
children: t
|
|
1024
|
+
}), /* @__PURE__ */ O(Ft, {
|
|
1025
|
+
className: n("max-w-sm text-wrap", r),
|
|
1026
|
+
container: i,
|
|
1027
|
+
side: a,
|
|
1028
|
+
children: e
|
|
1029
|
+
})]
|
|
1030
|
+
});
|
|
1031
|
+
}
|
|
1032
|
+
function Nt({ ...e }) {
|
|
1033
|
+
return /* @__PURE__ */ O(jt, { children: /* @__PURE__ */ O(yt, {
|
|
1034
|
+
"data-slot": "tooltip",
|
|
1035
|
+
...e
|
|
1036
|
+
}) });
|
|
1037
|
+
}
|
|
1038
|
+
function Pt({ ...e }) {
|
|
1039
|
+
return /* @__PURE__ */ O(bt, {
|
|
1040
|
+
"data-pw": e.name ?? "tooltip-trigger",
|
|
1041
|
+
"data-slot": "tooltip-trigger",
|
|
1042
|
+
...e
|
|
1043
|
+
});
|
|
1044
|
+
}
|
|
1045
|
+
function Ft({ className: e, sideOffset: t = 0, children: r, container: a, ref: o, onEscapeKeyDown: s, ...c }) {
|
|
1046
|
+
let l = At(), u = E(null), d = i(u, o);
|
|
1047
|
+
return /* @__PURE__ */ O(xt, {
|
|
1048
|
+
container: a ?? l,
|
|
1049
|
+
children: /* @__PURE__ */ k(St, {
|
|
1050
|
+
ref: d,
|
|
1051
|
+
onEscapeKeyDown: (e) => {
|
|
1052
|
+
s?.(e), j(u.current, e);
|
|
1053
|
+
},
|
|
1054
|
+
"data-slot": "tooltip-content",
|
|
1055
|
+
"data-pw": "tooltip-content",
|
|
1056
|
+
sideOffset: t,
|
|
1057
|
+
className: n("bg-tooltip text-tooltip-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--radix-tooltip-content-transform-origin) rounded px-3 py-1.5 text-xs text-balance", e),
|
|
1058
|
+
...c,
|
|
1059
|
+
children: [r, /* @__PURE__ */ O(Ct, { className: "bg-tooltip fill-tooltip z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
|
|
1060
|
+
})
|
|
1061
|
+
});
|
|
1062
|
+
}
|
|
1063
|
+
//#endregion
|
|
1064
|
+
export { P as C, H as S, fe as _, At as a, ae as b, ze as c, Re as d, Ce as f, de as g, pe as h, Pt as i, Ve as l, ge as m, Ft as n, Et as o, me as p, jt as r, He as s, Mt as t, Be as u, he as v, V as x, le as y };
|