@nxgt/material 3.49.0 → 3.51.0
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 +34 -0
- package/README.md +1 -1
- package/dist/{async-slice-DlvKCKAa.js → async-slice-BGtmF3K5.js} +2 -2
- package/dist/{button-DJgaQbBD.js → button-BWcr2b49.js} +45 -76
- package/dist/charts.js +3 -3
- package/dist/{chip-DN44R1vW.js → chip-CmLW6ZrT.js} +3 -3
- package/dist/{code-editor-BJ9ewxSC.js → code-editor-BKMaeIF6.js} +6 -6
- package/dist/code-editor.js +5 -5
- package/dist/{code-language-items-BJE3VuQg.js → code-language-items-Cs1Pwd1h.js} +2 -2
- package/dist/components/ui/layout/app-shell/activity-backdrop-shapes.css +14 -9
- package/dist/components/ui/layout/auth-card/auth-card-backdrop.css +2 -2
- package/dist/{components-AtBccCir.js → components-CuwU9Sux.js} +11878 -11614
- package/dist/components.js +26 -27
- package/dist/{dialog-ODql4vH7.js → dialog-TdT_5iUc.js} +7 -7
- package/dist/dnd.js +1 -1
- package/dist/{dropdown-menu-DRXYP9ta.js → dropdown-menu-BozV6Ikw.js} +25 -26
- package/dist/editor.js +9 -9
- package/dist/{empty-state-C9QqvBU1.js → empty-state-gzBPimAo.js} +2 -2
- package/dist/{escape-owner-DCrlERLM.js → escape-owner-Bu-aDEEO.js} +1 -1
- package/dist/{field-blur-DYGyIdfD.js → field-blur-47zmuDkH.js} +1 -1
- package/dist/{field-blur-context-B-fSpl1H.js → field-blur-context-6McYOnM8.js} +1 -1
- package/dist/hooks.js +2 -2
- package/dist/{hover-card-EO_CckIx.js → hover-card-zHdZJpBG.js} +14 -14
- package/dist/{i18n-provider-C0fB0sEL.js → i18n-provider-Ang2f31m.js} +1 -1
- package/dist/i18n.js +5 -5
- package/dist/{icon-badge-BQYj_LE6.js → icon-badge-CRFGIQPX.js} +3 -3
- package/dist/{icon-button-B481L2TP.js → icon-button-CtG3Snfm.js} +119 -87
- package/dist/lib/components/ui/actions/icon-button/icon-button-busy.d.ts +22 -0
- package/dist/lib/components/ui/actions/icon-button/icon-button-shape.d.ts +2 -0
- package/dist/lib/components/ui/actions/icon-button/icon-button.d.ts +7 -0
- package/dist/lib/components/ui/collections/data-table/data-table-selection-host.d.ts +7 -0
- package/dist/lib/components/ui/collections/data-table/internal.d.ts +1 -0
- package/dist/lib/components/ui/collections/data-table/partials/layouts/data-table-list-bar.d.ts +2 -1
- package/dist/lib/components/ui/collections/filter/bar/partials/filter-quick-toggle.d.ts +3 -2
- package/dist/lib/components/ui/collections/filter/sections/filter-sections-classes.d.ts +7 -1
- package/dist/lib/components/ui/collections/page-footer/page-footer.d.ts +6 -1
- package/dist/lib/components/ui/collections/row-menu/row-menu-trigger.d.ts +5 -2
- package/dist/lib/components/ui/collections/server-table/index.d.ts +1 -1
- package/dist/lib/components/ui/collections/server-table/partials/filtered-server-table.d.ts +8 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-band.d.ts +10 -1
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-buttons.d.ts +3 -2
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk-more.d.ts +4 -2
- package/dist/lib/components/ui/collections/server-table/partials/server-table-bulk.d.ts +2 -1
- package/dist/lib/components/ui/collections/server-table/partials/server-table-controls.d.ts +16 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-empty-chips.d.ts +5 -3
- package/dist/lib/components/ui/collections/server-table/partials/server-table-grid.d.ts +3 -1
- package/dist/lib/components/ui/collections/server-table/partials/server-table-selection-bar.d.ts +17 -0
- package/dist/lib/components/ui/collections/server-table/partials/server-table-view.d.ts +15 -0
- package/dist/lib/components/ui/collections/server-table/partials/use-server-table-phone-row.d.ts +14 -0
- package/dist/lib/components/ui/collections/server-table/partials/use-server-table-selection-slots.d.ts +24 -0
- package/dist/lib/components/ui/collections/server-table/types-paging.d.ts +17 -0
- package/dist/lib/components/ui/collections/server-table/types.d.ts +3 -10
- package/dist/lib/components/ui/collections/server-table/use-selection-band.d.ts +14 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-body.d.ts +5 -3
- package/dist/lib/components/ui/feedback/step-up-dialog/partials/step-up-request-error.d.ts +15 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/step-up-dialog.d.ts +6 -3
- package/dist/lib/components/ui/feedback/step-up-dialog/types.d.ts +12 -1
- package/dist/lib/components/ui/feedback/step-up-dialog/use-retry-focus.d.ts +27 -0
- package/dist/lib/components/ui/feedback/step-up-dialog/use-retry.d.ts +11 -0
- package/dist/lib/components/ui/fields/contacts/placeholders.d.ts +1 -1
- package/dist/lib/components/ui/fields/verification-code/use-settled-focus.d.ts +10 -0
- package/dist/lib/components/ui/layout/app-shell/use-keep-shapes-inside.d.ts +12 -1
- package/dist/lib/i18n/resources/en/en.d.ts +4 -0
- package/dist/lib/i18n/resources/en/material.json.d.ts +6 -2
- package/dist/lib/i18n/resources/fr/fr.d.ts +4 -0
- package/dist/lib/i18n/resources/fr/material.json.d.ts +6 -2
- package/dist/lib/i18n/resources/resources.d.ts +8 -0
- package/dist/lib/i18n/translator.d.ts +1 -1
- package/dist/lib.js +1 -1
- package/dist/main.js +43 -44
- package/dist/map.js +8 -8
- package/dist/material.css +1 -1
- package/dist/pdf-reader.js +1 -1
- package/dist/print.js +2 -2
- package/dist/{public-CZBz4JVu.js → public-CTZ5RK_Y.js} +20 -20
- package/dist/{rich-code-block-597e0_Qm.js → rich-code-block-oTgL-s4W.js} +5 -5
- package/dist/{sortable-provider-CK_xAk2H.js → sortable-provider-CpA5NYgD.js} +2 -2
- package/dist/{dist-B61_o9Mg.js → spinner-UvqlDsV8.js} +478 -256
- package/dist/{stored-language-IaL1Ftn_.js → stored-language-Cb9FMEwk.js} +12 -4
- package/dist/theme-picker.js +2 -2
- package/dist/{theme-toggle-Dnjn83TJ.js → theme-toggle-BZVz6O5q.js} +1 -1
- package/dist/{toolbar-items-CCwIu7fE.js → toolbar-items-C09bJphe.js} +106 -106
- package/dist/{translate-material-v9u-e7Kd.js → translate-material-D6KCK21i.js} +2 -2
- package/dist/{translator-Dk4_qE6U.js → translator-BnQXtpSZ.js} +1 -1
- package/dist/{use-chat-composer-Ot5XUbdn.js → use-chat-composer-AZAj4tFJ.js} +4881 -4882
- package/dist/{button-tones-BwuVvAmd.js → use-click-lock-BZYtTmVt.js} +37 -7
- package/dist/{use-heading-spy-DjKixjLm.js → use-heading-spy-C9-A2md2.js} +1 -1
- package/dist/{use-material-translation-DOkTaWK_.js → use-material-translation-pLgSqqLw.js} +2 -2
- package/docs/components/buttons-and-actions.md +2 -1
- package/docs/components/data-table-filter-and-lists.md +67 -14
- package/docs/components/feedback-and-status.md +22 -3
- package/docs/components/form-fields.md +7 -0
- package/docs/guides/backgrounds.md +3 -1
- package/docs/guides/cards-and-tiles.md +3 -0
- package/docs/guides/server-lists-url.md +3 -2
- package/lib/components/ui/layout/app-shell/activity-backdrop-shapes.css +14 -9
- package/lib/components/ui/layout/auth-card/auth-card-backdrop.css +2 -2
- package/package.json +1 -1
- package/dist/spinner-BhuZuHK1.js +0 -229
|
@@ -3,16 +3,17 @@ import { n as t, t as n } from "./utils-BLfntITJ.js";
|
|
|
3
3
|
import { i as r, o as i } from "./dist-DVRQkaTK.js";
|
|
4
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
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
|
|
7
|
-
import
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import
|
|
6
|
+
import { t as w } from "./use-material-translation-pLgSqqLw.js";
|
|
7
|
+
import * as T from "react";
|
|
8
|
+
import { useLayoutEffect as E, useRef as D, useSyncExternalStore as O } from "react";
|
|
9
|
+
import { jsx as k, jsxs as A } from "react/jsx-runtime";
|
|
10
|
+
import { forwardEscape as j } from "@nxgt/material-core/escape-forward";
|
|
11
|
+
import * as M from "react-dom";
|
|
11
12
|
//#region ../../node_modules/@radix-ui/react-visually-hidden/dist/index.mjs
|
|
12
|
-
var
|
|
13
|
+
var N = Object.defineProperty, P = (e, t) => N(e, "name", {
|
|
13
14
|
value: t,
|
|
14
15
|
configurable: !0
|
|
15
|
-
}),
|
|
16
|
+
}), F = Object.freeze({
|
|
16
17
|
position: "absolute",
|
|
17
18
|
border: 0,
|
|
18
19
|
width: 1,
|
|
@@ -23,32 +24,32 @@ var M = Object.defineProperty, N = (e, t) => M(e, "name", {
|
|
|
23
24
|
clip: "rect(0, 0, 0, 0)",
|
|
24
25
|
whiteSpace: "nowrap",
|
|
25
26
|
wordWrap: "normal"
|
|
26
|
-
}),
|
|
27
|
-
return /* @__PURE__ */
|
|
27
|
+
}), I = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ P(function(e, t) {
|
|
28
|
+
return /* @__PURE__ */ k(c.span, {
|
|
28
29
|
...e,
|
|
29
30
|
ref: t,
|
|
30
31
|
style: {
|
|
31
|
-
...
|
|
32
|
+
...F,
|
|
32
33
|
...e.style
|
|
33
34
|
}
|
|
34
35
|
});
|
|
35
|
-
}, "VisuallyHidden")),
|
|
36
|
+
}, "VisuallyHidden")), L = Object.defineProperty, R = (e, t) => L(e, "name", {
|
|
36
37
|
value: t,
|
|
37
38
|
configurable: !0
|
|
38
|
-
}),
|
|
39
|
+
}), z = "dismissableLayer.update", ee = "dismissableLayer.pointerDownOutside", B = "dismissableLayer.focusOutside", V, H = T.createContext({
|
|
39
40
|
layers: /* @__PURE__ */ new Set(),
|
|
40
41
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
41
42
|
branches: /* @__PURE__ */ new Set(),
|
|
42
43
|
dismissableSurfaces: /* @__PURE__ */ new Set()
|
|
43
|
-
}),
|
|
44
|
-
let { disableOutsidePointerEvents: n = !1, deferPointerDownOutside: r = !1, onEscapeKeyDown: a, onPointerDownOutside: o, onFocusOutside: s, onInteractOutside: u, onDismiss: d, ...p } = e, m =
|
|
44
|
+
}), U = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ R(function(e, t) {
|
|
45
|
+
let { disableOutsidePointerEvents: n = !1, deferPointerDownOutside: r = !1, onEscapeKeyDown: a, onPointerDownOutside: o, onFocusOutside: s, onInteractOutside: u, onDismiss: d, ...p } = e, m = T.useContext(H), [h, g] = T.useState(null), _ = h?.ownerDocument ?? globalThis?.document, [, v] = T.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, w = m.layersWithOutsidePointerEventsDisabled.size > 0, E = C >= S, D = T.useRef(!1), O = ne((e) => {
|
|
45
46
|
o?.(e), u?.(e), e.defaultPrevented || d?.();
|
|
46
47
|
}, {
|
|
47
48
|
ownerDocument: _,
|
|
48
49
|
deferPointerDownOutside: r,
|
|
49
50
|
isDeferredPointerDownOutsideRef: D,
|
|
50
51
|
dismissableSurfaces: m.dismissableSurfaces,
|
|
51
|
-
shouldHandlePointerDownOutside:
|
|
52
|
+
shouldHandlePointerDownOutside: T.useCallback((e) => {
|
|
52
53
|
if (!(e instanceof Node)) return !1;
|
|
53
54
|
let t = [...m.branches].some((t) => t.contains(e));
|
|
54
55
|
return E && !t;
|
|
@@ -60,59 +61,59 @@ var M = Object.defineProperty, N = (e, t) => M(e, "name", {
|
|
|
60
61
|
}, _), j = h ? C === b.length - 1 : !1, M = l((e) => {
|
|
61
62
|
e.key === "Escape" && (a?.(e), !e.defaultPrevented && d && (e.preventDefault(), d()));
|
|
62
63
|
});
|
|
63
|
-
return
|
|
64
|
+
return T.useEffect(() => {
|
|
64
65
|
if (j) return _.addEventListener("keydown", M, { capture: !0 }), () => _.removeEventListener("keydown", M, { capture: !0 });
|
|
65
66
|
}, [
|
|
66
67
|
_,
|
|
67
68
|
j,
|
|
68
69
|
M
|
|
69
|
-
]),
|
|
70
|
-
if (h) return n && (m.layersWithOutsidePointerEventsDisabled.size === 0 && (
|
|
71
|
-
n && (m.layersWithOutsidePointerEventsDisabled.delete(h), m.layersWithOutsidePointerEventsDisabled.size === 0 && (_.body.style.pointerEvents =
|
|
70
|
+
]), T.useEffect(() => {
|
|
71
|
+
if (h) return n && (m.layersWithOutsidePointerEventsDisabled.size === 0 && (V = _.body.style.pointerEvents, _.body.style.pointerEvents = "none"), m.layersWithOutsidePointerEventsDisabled.add(h)), m.layers.add(h), G(), () => {
|
|
72
|
+
n && (m.layersWithOutsidePointerEventsDisabled.delete(h), m.layersWithOutsidePointerEventsDisabled.size === 0 && (_.body.style.pointerEvents = V));
|
|
72
73
|
};
|
|
73
74
|
}, [
|
|
74
75
|
h,
|
|
75
76
|
_,
|
|
76
77
|
n,
|
|
77
78
|
m
|
|
78
|
-
]),
|
|
79
|
-
h && (m.layers.delete(h), m.layersWithOutsidePointerEventsDisabled.delete(h),
|
|
80
|
-
}, [h, m]),
|
|
81
|
-
let e = /* @__PURE__ */
|
|
82
|
-
return document.addEventListener(
|
|
83
|
-
}, []), /* @__PURE__ */
|
|
79
|
+
]), T.useEffect(() => () => {
|
|
80
|
+
h && (m.layers.delete(h), m.layersWithOutsidePointerEventsDisabled.delete(h), G());
|
|
81
|
+
}, [h, m]), T.useEffect(() => {
|
|
82
|
+
let e = /* @__PURE__ */ R(() => v({}), "handleUpdate");
|
|
83
|
+
return document.addEventListener(z, e), () => document.removeEventListener(z, e);
|
|
84
|
+
}, []), /* @__PURE__ */ k(c.div, {
|
|
84
85
|
...p,
|
|
85
86
|
ref: y,
|
|
86
87
|
style: {
|
|
87
|
-
pointerEvents:
|
|
88
|
+
pointerEvents: w ? E ? "auto" : "none" : void 0,
|
|
88
89
|
...e.style
|
|
89
90
|
},
|
|
90
91
|
onFocusCapture: f(e.onFocusCapture, A.onFocusCapture),
|
|
91
92
|
onBlurCapture: f(e.onBlurCapture, A.onBlurCapture),
|
|
92
|
-
onPointerDownCapture: f(e.onPointerDownCapture,
|
|
93
|
+
onPointerDownCapture: f(e.onPointerDownCapture, O.onPointerDownCapture)
|
|
93
94
|
});
|
|
94
95
|
}, "DismissableLayer"));
|
|
95
|
-
function
|
|
96
|
-
let e =
|
|
97
|
-
return
|
|
96
|
+
function W() {
|
|
97
|
+
let e = T.useContext(H), [t, n] = T.useState(null);
|
|
98
|
+
return T.useEffect(() => {
|
|
98
99
|
if (t) return e.dismissableSurfaces.add(t), () => {
|
|
99
100
|
e.dismissableSurfaces.delete(t);
|
|
100
101
|
};
|
|
101
102
|
}, [t, e.dismissableSurfaces]), n;
|
|
102
103
|
}
|
|
103
|
-
|
|
104
|
-
var
|
|
105
|
-
function
|
|
106
|
-
let { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: i, dismissableSurfaces: a, shouldHandlePointerDownOutside: o =
|
|
107
|
-
return
|
|
104
|
+
R(W, "useDismissableLayerSurface");
|
|
105
|
+
var te = /* @__PURE__ */ R(() => !0, "IS_TRUE");
|
|
106
|
+
function ne(e, t) {
|
|
107
|
+
let { ownerDocument: n = globalThis?.document, deferPointerDownOutside: r = !1, isDeferredPointerDownOutsideRef: i, dismissableSurfaces: a, shouldHandlePointerDownOutside: o = te } = t, s = l(e), c = T.useRef(!1), u = T.useRef(!1), d = T.useRef(/* @__PURE__ */ new Map()), f = T.useRef(() => {});
|
|
108
|
+
return T.useEffect(() => {
|
|
108
109
|
function e() {
|
|
109
110
|
u.current = !1, i.current = !1, d.current.clear();
|
|
110
111
|
}
|
|
111
|
-
|
|
112
|
+
R(e, "resetOutsideInteraction");
|
|
112
113
|
function t() {
|
|
113
114
|
return Array.from(d.current.values()).some(Boolean);
|
|
114
115
|
}
|
|
115
|
-
|
|
116
|
+
R(t, "isOutsideInteractionIntercepted");
|
|
116
117
|
function l(e) {
|
|
117
118
|
if (!u.current) return;
|
|
118
119
|
let t = e.target;
|
|
@@ -120,19 +121,19 @@ function U(e, t) {
|
|
|
120
121
|
u.current && f.current();
|
|
121
122
|
}, 0);
|
|
122
123
|
}
|
|
123
|
-
|
|
124
|
+
R(l, "handleInteractionCapture");
|
|
124
125
|
function p(e) {
|
|
125
126
|
u.current && d.current.set(e.type, !1);
|
|
126
127
|
}
|
|
127
|
-
|
|
128
|
-
let m = /* @__PURE__ */
|
|
128
|
+
R(p, "handleInteractionBubble");
|
|
129
|
+
let m = /* @__PURE__ */ R((a) => {
|
|
129
130
|
if (a.target && !c.current) {
|
|
130
131
|
let l = function() {
|
|
131
132
|
n.removeEventListener("click", f.current);
|
|
132
133
|
let r = t();
|
|
133
|
-
e(), r ||
|
|
134
|
+
e(), r || K(ee, s, p, { discrete: !0 });
|
|
134
135
|
};
|
|
135
|
-
if (
|
|
136
|
+
if (R(l, "handleAndDispatchPointerDownOutsideEvent"), !o(a.target)) {
|
|
136
137
|
n.removeEventListener("click", f.current), e(), c.current = !1;
|
|
137
138
|
return;
|
|
138
139
|
}
|
|
@@ -163,28 +164,28 @@ function U(e, t) {
|
|
|
163
164
|
i,
|
|
164
165
|
a,
|
|
165
166
|
o
|
|
166
|
-
]), { onPointerDownCapture: /* @__PURE__ */
|
|
167
|
+
]), { onPointerDownCapture: /* @__PURE__ */ R(() => c.current = !0, "onPointerDownCapture") };
|
|
167
168
|
}
|
|
168
|
-
|
|
169
|
+
R(ne, "usePointerDownOutside");
|
|
169
170
|
function re(e, t = globalThis?.document) {
|
|
170
|
-
let n = l(e), r =
|
|
171
|
-
return
|
|
172
|
-
let e = /* @__PURE__ */
|
|
173
|
-
e.target && !r.current &&
|
|
171
|
+
let n = l(e), r = T.useRef(!1);
|
|
172
|
+
return T.useEffect(() => {
|
|
173
|
+
let e = /* @__PURE__ */ R((e) => {
|
|
174
|
+
e.target && !r.current && K(B, n, { originalEvent: e }, { discrete: !1 });
|
|
174
175
|
}, "handleFocus");
|
|
175
176
|
return t.addEventListener("focusin", e), () => t.removeEventListener("focusin", e);
|
|
176
177
|
}, [t, n]), {
|
|
177
|
-
onFocusCapture: /* @__PURE__ */
|
|
178
|
-
onBlurCapture: /* @__PURE__ */
|
|
178
|
+
onFocusCapture: /* @__PURE__ */ R(() => r.current = !0, "onFocusCapture"),
|
|
179
|
+
onBlurCapture: /* @__PURE__ */ R(() => r.current = !1, "onBlurCapture")
|
|
179
180
|
};
|
|
180
181
|
}
|
|
181
|
-
|
|
182
|
-
function
|
|
183
|
-
let e = new CustomEvent(
|
|
182
|
+
R(re, "useFocusOutside");
|
|
183
|
+
function G() {
|
|
184
|
+
let e = new CustomEvent(z);
|
|
184
185
|
document.dispatchEvent(e);
|
|
185
186
|
}
|
|
186
|
-
|
|
187
|
-
function
|
|
187
|
+
R(G, "dispatchUpdate");
|
|
188
|
+
function K(e, t, n, { discrete: r }) {
|
|
188
189
|
let i = n.originalEvent.target, a = new CustomEvent(e, {
|
|
189
190
|
bubbles: !1,
|
|
190
191
|
cancelable: !0,
|
|
@@ -192,22 +193,22 @@ function G(e, t, n, { discrete: r }) {
|
|
|
192
193
|
});
|
|
193
194
|
t && i.addEventListener(e, t, { once: !0 }), r ? m(i, a) : i.dispatchEvent(a);
|
|
194
195
|
}
|
|
195
|
-
|
|
196
|
+
R(K, "handleAndDispatchCustomEvent");
|
|
196
197
|
//#endregion
|
|
197
198
|
//#region ../../node_modules/@radix-ui/react-portal/dist/index.mjs
|
|
198
|
-
var ie = Object.defineProperty, ae = /* @__PURE__ */
|
|
199
|
+
var ie = Object.defineProperty, ae = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ ((e, t) => ie(e, "name", {
|
|
199
200
|
value: t,
|
|
200
201
|
configurable: !0
|
|
201
202
|
}))(function(e, t) {
|
|
202
|
-
let { container: n, ...r } = e, [i, a] =
|
|
203
|
+
let { container: n, ...r } = e, [i, a] = T.useState(!1);
|
|
203
204
|
u(() => a(!0), []);
|
|
204
205
|
let o = n || i && globalThis?.document?.body;
|
|
205
|
-
return o ?
|
|
206
|
+
return o ? M.createPortal(/* @__PURE__ */ k(c.div, {
|
|
206
207
|
...r,
|
|
207
208
|
ref: t
|
|
208
209
|
}), o) : null;
|
|
209
|
-
}, "Portal")),
|
|
210
|
-
function
|
|
210
|
+
}, "Portal")), q = typeof document < "u" ? E : function() {};
|
|
211
|
+
function J(e, t) {
|
|
211
212
|
if (e === t) return !0;
|
|
212
213
|
if (typeof e != typeof t) return !1;
|
|
213
214
|
if (typeof e == "function" && e.toString() === t.toString()) return !0;
|
|
@@ -215,14 +216,14 @@ function q(e, t) {
|
|
|
215
216
|
if (e && t && typeof e == "object") {
|
|
216
217
|
if (Array.isArray(e)) {
|
|
217
218
|
if (n = e.length, n !== t.length) return !1;
|
|
218
|
-
for (r = n; r-- !== 0;) if (!
|
|
219
|
+
for (r = n; r-- !== 0;) if (!J(e[r], t[r])) return !1;
|
|
219
220
|
return !0;
|
|
220
221
|
}
|
|
221
222
|
if (i = Object.keys(e), n = i.length, n !== Object.keys(t).length) return !1;
|
|
222
223
|
for (r = n; r-- !== 0;) if (!{}.hasOwnProperty.call(t, i[r])) return !1;
|
|
223
224
|
for (r = n; r-- !== 0;) {
|
|
224
225
|
let n = i[r];
|
|
225
|
-
if (!(n === "_owner" && e.$$typeof) && !
|
|
226
|
+
if (!(n === "_owner" && e.$$typeof) && !J(e[n], t[n])) return !1;
|
|
226
227
|
}
|
|
227
228
|
return !0;
|
|
228
229
|
}
|
|
@@ -236,39 +237,39 @@ function se(e, t) {
|
|
|
236
237
|
return Math.round(t * n) / n;
|
|
237
238
|
}
|
|
238
239
|
function ce(e) {
|
|
239
|
-
let t =
|
|
240
|
-
return
|
|
240
|
+
let t = T.useRef(e);
|
|
241
|
+
return q(() => {
|
|
241
242
|
t.current = e;
|
|
242
243
|
}), t;
|
|
243
244
|
}
|
|
244
245
|
function le(e) {
|
|
245
246
|
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] =
|
|
247
|
+
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] = T.useState({
|
|
247
248
|
x: 0,
|
|
248
249
|
y: 0,
|
|
249
250
|
strategy: n,
|
|
250
251
|
placement: t,
|
|
251
252
|
middlewareData: {},
|
|
252
253
|
isPositioned: !1
|
|
253
|
-
}), [f, p] =
|
|
254
|
-
|
|
255
|
-
let [m, h] =
|
|
254
|
+
}), [f, p] = T.useState(r);
|
|
255
|
+
J(f, r) || p(r);
|
|
256
|
+
let [m, h] = T.useState(null), [g, _] = T.useState(null), y = T.useCallback((e) => {
|
|
256
257
|
e !== C.current && (C.current = e, h(e));
|
|
257
|
-
}, []), b =
|
|
258
|
-
e !==
|
|
259
|
-
}, []), x = a || m, S = o || g, C =
|
|
260
|
-
if (!C.current || !
|
|
258
|
+
}, []), b = T.useCallback((e) => {
|
|
259
|
+
e !== w.current && (w.current = e, _(e));
|
|
260
|
+
}, []), x = a || m, S = o || g, C = T.useRef(null), w = T.useRef(null), E = T.useRef(u), D = c != null, O = ce(c), k = ce(i), A = ce(l), j = T.useCallback(() => {
|
|
261
|
+
if (!C.current || !w.current) return;
|
|
261
262
|
let e = {
|
|
262
263
|
placement: t,
|
|
263
264
|
strategy: n,
|
|
264
265
|
middleware: f
|
|
265
266
|
};
|
|
266
|
-
k.current && (e.platform = k.current), v(C.current,
|
|
267
|
+
k.current && (e.platform = k.current), v(C.current, w.current, e).then((e) => {
|
|
267
268
|
let t = {
|
|
268
269
|
...e,
|
|
269
270
|
isPositioned: A.current !== !1
|
|
270
271
|
};
|
|
271
|
-
N.current && !
|
|
272
|
+
N.current && !J(E.current, t) && (E.current = t, M.flushSync(() => {
|
|
272
273
|
d(t);
|
|
273
274
|
}));
|
|
274
275
|
});
|
|
@@ -279,36 +280,36 @@ function le(e) {
|
|
|
279
280
|
k,
|
|
280
281
|
A
|
|
281
282
|
]);
|
|
282
|
-
|
|
283
|
+
q(() => {
|
|
283
284
|
l === !1 && E.current.isPositioned && (E.current.isPositioned = !1, d((e) => ({
|
|
284
285
|
...e,
|
|
285
286
|
isPositioned: !1
|
|
286
287
|
})));
|
|
287
288
|
}, [l]);
|
|
288
|
-
let N =
|
|
289
|
-
|
|
289
|
+
let N = T.useRef(!1);
|
|
290
|
+
q(() => (N.current = !0, () => {
|
|
290
291
|
N.current = !1;
|
|
291
|
-
}), []),
|
|
292
|
-
if (x && (C.current = x), S && (
|
|
293
|
-
if (O.current) return O.current(x, S,
|
|
294
|
-
|
|
292
|
+
}), []), q(() => {
|
|
293
|
+
if (x && (C.current = x), S && (w.current = S), x && S) {
|
|
294
|
+
if (O.current) return O.current(x, S, j);
|
|
295
|
+
j();
|
|
295
296
|
}
|
|
296
297
|
}, [
|
|
297
298
|
x,
|
|
298
299
|
S,
|
|
299
|
-
|
|
300
|
+
j,
|
|
300
301
|
O,
|
|
301
302
|
D
|
|
302
303
|
]);
|
|
303
|
-
let P =
|
|
304
|
+
let P = T.useMemo(() => ({
|
|
304
305
|
reference: C,
|
|
305
|
-
floating:
|
|
306
|
+
floating: w,
|
|
306
307
|
setReference: y,
|
|
307
308
|
setFloating: b
|
|
308
|
-
}), [y, b]), F =
|
|
309
|
+
}), [y, b]), F = T.useMemo(() => ({
|
|
309
310
|
reference: x,
|
|
310
311
|
floating: S
|
|
311
|
-
}), [x, S]), I =
|
|
312
|
+
}), [x, S]), I = T.useMemo(() => {
|
|
312
313
|
let e = {
|
|
313
314
|
position: n,
|
|
314
315
|
left: 0,
|
|
@@ -332,15 +333,15 @@ function le(e) {
|
|
|
332
333
|
u.x,
|
|
333
334
|
u.y
|
|
334
335
|
]);
|
|
335
|
-
return
|
|
336
|
+
return T.useMemo(() => ({
|
|
336
337
|
...u,
|
|
337
|
-
update:
|
|
338
|
+
update: j,
|
|
338
339
|
refs: P,
|
|
339
340
|
elements: F,
|
|
340
341
|
floatingStyles: I
|
|
341
342
|
}), [
|
|
342
343
|
u,
|
|
343
|
-
|
|
344
|
+
j,
|
|
344
345
|
P,
|
|
345
346
|
F,
|
|
346
347
|
I
|
|
@@ -409,26 +410,26 @@ var ue = (e) => {
|
|
|
409
410
|
fn: n.fn,
|
|
410
411
|
options: [e, t]
|
|
411
412
|
};
|
|
412
|
-
}, ve = Object.defineProperty, ye = /* @__PURE__ */
|
|
413
|
+
}, ve = Object.defineProperty, ye = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ ((e, t) => ve(e, "name", {
|
|
413
414
|
value: t,
|
|
414
415
|
configurable: !0
|
|
415
416
|
}))(function(e, t) {
|
|
416
417
|
let { children: n, width: r = 10, height: i = 5, ...a } = e;
|
|
417
|
-
return /* @__PURE__ */
|
|
418
|
+
return /* @__PURE__ */ k(c.svg, {
|
|
418
419
|
...a,
|
|
419
420
|
ref: t,
|
|
420
421
|
width: r,
|
|
421
422
|
height: i,
|
|
422
423
|
viewBox: "0 0 30 10",
|
|
423
424
|
preserveAspectRatio: "none",
|
|
424
|
-
children: e.asChild ? n : /* @__PURE__ */
|
|
425
|
+
children: e.asChild ? n : /* @__PURE__ */ k("polygon", { points: "0,0 30,0 15,10" })
|
|
425
426
|
});
|
|
426
|
-
}, "Arrow")), be = Object.defineProperty,
|
|
427
|
+
}, "Arrow")), be = Object.defineProperty, Y = (e, t) => be(e, "name", {
|
|
427
428
|
value: t,
|
|
428
429
|
configurable: !0
|
|
429
|
-
}), xe = "Popper", [Se, Ce] = o(xe), [we, Te] = Se(xe), Ee = /* @__PURE__ */
|
|
430
|
-
let { __scopePopper: t, children: n } = e, [r, i] =
|
|
431
|
-
return /* @__PURE__ */
|
|
430
|
+
}), xe = "Popper", [Se, Ce] = o(xe), [we, Te] = Se(xe), Ee = /* @__PURE__ */ Y((e) => {
|
|
431
|
+
let { __scopePopper: t, children: n } = e, [r, i] = T.useState(null), [a, o] = T.useState(void 0);
|
|
432
|
+
return /* @__PURE__ */ k(we, {
|
|
432
433
|
scope: t,
|
|
433
434
|
anchor: r,
|
|
434
435
|
onAnchorChange: i,
|
|
@@ -436,24 +437,24 @@ var ue = (e) => {
|
|
|
436
437
|
setPlacementState: o,
|
|
437
438
|
children: n
|
|
438
439
|
});
|
|
439
|
-
}, "Popper"), De = "PopperAnchor", Oe = /* @__PURE__ */
|
|
440
|
-
let { __scopePopper: n, virtualRef: r, ...a } = e, o = Te(De, n), s =
|
|
440
|
+
}, "Popper"), De = "PopperAnchor", Oe = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
441
|
+
let { __scopePopper: n, virtualRef: r, ...a } = e, o = Te(De, n), s = T.useRef(null), l = o.onAnchorChange, u = i(t, T.useCallback((e) => {
|
|
441
442
|
s.current = e, e && l(e);
|
|
442
|
-
}, [l])), d =
|
|
443
|
-
|
|
443
|
+
}, [l])), d = T.useRef(null);
|
|
444
|
+
T.useEffect(() => {
|
|
444
445
|
if (!r) return;
|
|
445
446
|
let e = d.current;
|
|
446
447
|
d.current = r.current, e !== d.current && l(d.current);
|
|
447
448
|
});
|
|
448
|
-
let f = o.placementState &&
|
|
449
|
-
return r ? null : /* @__PURE__ */
|
|
449
|
+
let f = o.placementState && X(o.placementState), p = f?.[0], m = f?.[1];
|
|
450
|
+
return r ? null : /* @__PURE__ */ k(c.div, {
|
|
450
451
|
"data-radix-popper-side": p,
|
|
451
452
|
"data-radix-popper-align": m,
|
|
452
453
|
...a,
|
|
453
454
|
ref: u
|
|
454
455
|
});
|
|
455
|
-
}, "PopperAnchor")), ke = "PopperContent", [Ae, je] = Se(ke), Me = /* @__PURE__ */
|
|
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,
|
|
456
|
+
}, "PopperAnchor")), ke = "PopperContent", [Ae, je] = Se(ke), Me = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
457
|
+
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, w] = T.useState(null), E = i(t, w), [D, O] = T.useState(null), A = p(D), j = A?.width ?? 0, M = A?.height ?? 0, N = r + (o === "center" ? "" : "-" + o), P = typeof h == "number" ? h : {
|
|
457
458
|
top: 0,
|
|
458
459
|
right: 0,
|
|
459
460
|
bottom: 0,
|
|
@@ -463,10 +464,10 @@ var ue = (e) => {
|
|
|
463
464
|
padding: P,
|
|
464
465
|
boundary: F.filter(Ie),
|
|
465
466
|
altBoundary: I
|
|
466
|
-
}, { refs:
|
|
467
|
+
}, { refs: R, floatingStyles: z, placement: ee, isPositioned: B, middlewareData: V } = le({
|
|
467
468
|
strategy: "fixed",
|
|
468
469
|
placement: N,
|
|
469
|
-
whileElementsMounted: /* @__PURE__ */
|
|
470
|
+
whileElementsMounted: /* @__PURE__ */ Y((...e) => x(...e, { animationFrame: v === "always" }), "whileElementsMounted"),
|
|
470
471
|
elements: { reference: S.anchor },
|
|
471
472
|
middleware: [
|
|
472
473
|
de({
|
|
@@ -482,7 +483,7 @@ var ue = (e) => {
|
|
|
482
483
|
f && me({ ...L }),
|
|
483
484
|
he({
|
|
484
485
|
...L,
|
|
485
|
-
apply: /* @__PURE__ */
|
|
486
|
+
apply: /* @__PURE__ */ Y(({ elements: e, rects: t, availableWidth: n, availableHeight: r }) => {
|
|
486
487
|
let { width: i, height: a } = t.reference, o = e.floating.style;
|
|
487
488
|
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
489
|
}, "apply")
|
|
@@ -501,48 +502,48 @@ var ue = (e) => {
|
|
|
501
502
|
boundary: I ? L.boundary : void 0
|
|
502
503
|
})
|
|
503
504
|
]
|
|
504
|
-
}),
|
|
505
|
-
u(() => (
|
|
506
|
-
|
|
507
|
-
}), [
|
|
508
|
-
let [
|
|
505
|
+
}), H = S.setPlacementState;
|
|
506
|
+
u(() => (H(ee), () => {
|
|
507
|
+
H(void 0);
|
|
508
|
+
}), [ee, H]);
|
|
509
|
+
let [U, W] = X(ee), te = l(y);
|
|
509
510
|
u(() => {
|
|
510
|
-
|
|
511
|
-
}, [
|
|
512
|
-
let
|
|
511
|
+
B && te?.();
|
|
512
|
+
}, [B, te]);
|
|
513
|
+
let ne = V.arrow?.x, re = V.arrow?.y, G = V.arrow?.centerOffset !== 0, [K, ie] = T.useState();
|
|
513
514
|
return u(() => {
|
|
514
|
-
C &&
|
|
515
|
-
}, [C]), /* @__PURE__ */
|
|
516
|
-
ref:
|
|
515
|
+
C && ie(window.getComputedStyle(C).zIndex);
|
|
516
|
+
}, [C]), /* @__PURE__ */ k("div", {
|
|
517
|
+
ref: R.setFloating,
|
|
517
518
|
"data-radix-popper-content-wrapper": "",
|
|
518
519
|
style: {
|
|
519
|
-
...
|
|
520
|
-
transform:
|
|
520
|
+
...z,
|
|
521
|
+
transform: B ? z.transform : "translate(0, -200%)",
|
|
521
522
|
minWidth: "max-content",
|
|
522
|
-
zIndex:
|
|
523
|
-
"--radix-popper-transform-origin": [
|
|
524
|
-
...
|
|
523
|
+
zIndex: K,
|
|
524
|
+
"--radix-popper-transform-origin": [V.transformOrigin?.x, V.transformOrigin?.y].join(" "),
|
|
525
|
+
...V.hide?.referenceHidden && {
|
|
525
526
|
visibility: "hidden",
|
|
526
527
|
pointerEvents: "none"
|
|
527
528
|
}
|
|
528
529
|
},
|
|
529
530
|
dir: e.dir,
|
|
530
|
-
children: /* @__PURE__ */
|
|
531
|
+
children: /* @__PURE__ */ k(Ae, {
|
|
531
532
|
scope: n,
|
|
532
|
-
placedSide:
|
|
533
|
-
placedAlign:
|
|
534
|
-
onArrowChange:
|
|
535
|
-
arrowX:
|
|
536
|
-
arrowY:
|
|
533
|
+
placedSide: U,
|
|
534
|
+
placedAlign: W,
|
|
535
|
+
onArrowChange: O,
|
|
536
|
+
arrowX: ne,
|
|
537
|
+
arrowY: re,
|
|
537
538
|
shouldHideArrow: G,
|
|
538
|
-
children: /* @__PURE__ */
|
|
539
|
-
"data-side":
|
|
540
|
-
"data-align":
|
|
539
|
+
children: /* @__PURE__ */ k(c.div, {
|
|
540
|
+
"data-side": U,
|
|
541
|
+
"data-align": W,
|
|
541
542
|
...b,
|
|
542
543
|
ref: E,
|
|
543
544
|
style: {
|
|
544
545
|
...b.style,
|
|
545
|
-
animation:
|
|
546
|
+
animation: B ? b.style?.animation : "none"
|
|
546
547
|
}
|
|
547
548
|
})
|
|
548
549
|
})
|
|
@@ -552,9 +553,9 @@ var ue = (e) => {
|
|
|
552
553
|
right: "left",
|
|
553
554
|
bottom: "top",
|
|
554
555
|
left: "right"
|
|
555
|
-
}, Fe = /* @__PURE__ */
|
|
556
|
+
}, Fe = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Y(function(e, t) {
|
|
556
557
|
let { __scopePopper: n, ...r } = e, i = je(Ne, n), a = Pe[i.placedSide];
|
|
557
|
-
return /* @__PURE__ */
|
|
558
|
+
return /* @__PURE__ */ k("span", {
|
|
558
559
|
ref: i.onArrowChange,
|
|
559
560
|
style: {
|
|
560
561
|
position: "absolute",
|
|
@@ -575,7 +576,7 @@ var ue = (e) => {
|
|
|
575
576
|
}[i.placedSide],
|
|
576
577
|
visibility: i.shouldHideArrow ? "hidden" : void 0
|
|
577
578
|
},
|
|
578
|
-
children: /* @__PURE__ */
|
|
579
|
+
children: /* @__PURE__ */ k(ye, {
|
|
579
580
|
...r,
|
|
580
581
|
ref: t,
|
|
581
582
|
style: {
|
|
@@ -588,12 +589,12 @@ var ue = (e) => {
|
|
|
588
589
|
function Ie(e) {
|
|
589
590
|
return e !== null;
|
|
590
591
|
}
|
|
591
|
-
|
|
592
|
-
var Le = /* @__PURE__ */
|
|
592
|
+
Y(Ie, "isNotNull");
|
|
593
|
+
var Le = /* @__PURE__ */ Y((e) => ({
|
|
593
594
|
name: "transformOrigin",
|
|
594
595
|
options: e,
|
|
595
596
|
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] =
|
|
597
|
+
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] = X(n), u = {
|
|
597
598
|
start: "0%",
|
|
598
599
|
center: "50%",
|
|
599
600
|
end: "100%"
|
|
@@ -604,103 +605,103 @@ var Le = /* @__PURE__ */ J((e) => ({
|
|
|
604
605
|
} };
|
|
605
606
|
}
|
|
606
607
|
}), "transformOrigin");
|
|
607
|
-
function
|
|
608
|
+
function X(e) {
|
|
608
609
|
let [t, n = "center"] = e.split("-");
|
|
609
610
|
return [t, n];
|
|
610
611
|
}
|
|
611
|
-
|
|
612
|
+
Y(X, "getSideAndAlignFromPlacement");
|
|
612
613
|
var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
613
|
-
Arrow: () =>
|
|
614
|
-
Content: () =>
|
|
615
|
-
Portal: () =>
|
|
616
|
-
Provider: () =>
|
|
617
|
-
Root: () =>
|
|
618
|
-
Tooltip: () =>
|
|
619
|
-
TooltipArrow: () =>
|
|
620
|
-
TooltipContent: () =>
|
|
621
|
-
TooltipPortal: () =>
|
|
622
|
-
TooltipProvider: () =>
|
|
623
|
-
TooltipTrigger: () =>
|
|
624
|
-
Trigger: () =>
|
|
614
|
+
Arrow: () => wt,
|
|
615
|
+
Content: () => Ct,
|
|
616
|
+
Portal: () => St,
|
|
617
|
+
Provider: () => yt,
|
|
618
|
+
Root: () => bt,
|
|
619
|
+
Tooltip: () => tt,
|
|
620
|
+
TooltipArrow: () => ft,
|
|
621
|
+
TooltipContent: () => ct,
|
|
622
|
+
TooltipPortal: () => st,
|
|
623
|
+
TooltipProvider: () => Qe,
|
|
624
|
+
TooltipTrigger: () => rt,
|
|
625
|
+
Trigger: () => xt,
|
|
625
626
|
createTooltipScope: () => Ge
|
|
626
|
-
}), Ue = Object.defineProperty,
|
|
627
|
+
}), Ue = Object.defineProperty, Z = (e, t) => Ue(e, "name", {
|
|
627
628
|
value: t,
|
|
628
629
|
configurable: !0
|
|
629
|
-
}), [We, Ge] = o("Tooltip", [Ce]),
|
|
630
|
-
let { __scopeTooltip: t, delayDuration: n =
|
|
631
|
-
return
|
|
630
|
+
}), [We, Ge] = o("Tooltip", [Ce]), Ke = Ce(), qe = "TooltipProvider", Je = 700, Ye = "tooltip.open", [Xe, Ze] = We(qe), Qe = /* @__PURE__ */ Z((e) => {
|
|
631
|
+
let { __scopeTooltip: t, delayDuration: n = Je, skipDelayDuration: r = 300, disableHoverableContent: i = !1, children: a } = e, o = T.useRef(!0), s = T.useRef(!1), c = T.useRef(0);
|
|
632
|
+
return T.useEffect(() => {
|
|
632
633
|
let e = c.current;
|
|
633
634
|
return () => window.clearTimeout(e);
|
|
634
|
-
}, []), /* @__PURE__ */
|
|
635
|
+
}, []), /* @__PURE__ */ k(Xe, {
|
|
635
636
|
scope: t,
|
|
636
637
|
isOpenDelayedRef: o,
|
|
637
638
|
delayDuration: n,
|
|
638
|
-
onOpen:
|
|
639
|
+
onOpen: T.useCallback(() => {
|
|
639
640
|
r <= 0 || (window.clearTimeout(c.current), o.current = !1);
|
|
640
641
|
}, [r]),
|
|
641
|
-
onClose:
|
|
642
|
+
onClose: T.useCallback(() => {
|
|
642
643
|
r <= 0 || (window.clearTimeout(c.current), c.current = window.setTimeout(() => o.current = !0, r));
|
|
643
644
|
}, [r]),
|
|
644
645
|
isPointerInTransitRef: s,
|
|
645
|
-
onPointerInTransitChange:
|
|
646
|
+
onPointerInTransitChange: T.useCallback((e) => {
|
|
646
647
|
s.current = e;
|
|
647
648
|
}, []),
|
|
648
649
|
disableHoverableContent: i,
|
|
649
650
|
children: a
|
|
650
651
|
});
|
|
651
|
-
}, "TooltipProvider"),
|
|
652
|
-
let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = e, l =
|
|
652
|
+
}, "TooltipProvider"), $e = "Tooltip", [et, Q] = We($e), tt = /* @__PURE__ */ Z((e) => {
|
|
653
|
+
let { __scopeTooltip: t, children: n, open: r, defaultOpen: i, onOpenChange: o, disableHoverableContent: s, delayDuration: c } = e, l = Ze($e, e.__scopeTooltip), u = Ke(t), [f, p] = T.useState(null), [m, h] = T.useState(void 0), g = d(), _ = T.useRef(0), v = s ?? l.disableHoverableContent, y = c ?? l.delayDuration, b = T.useRef(!1), [x, S] = a({
|
|
653
654
|
prop: r,
|
|
654
655
|
defaultProp: i ?? !1,
|
|
655
|
-
onChange: /* @__PURE__ */
|
|
656
|
-
e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(
|
|
656
|
+
onChange: /* @__PURE__ */ Z((e) => {
|
|
657
|
+
e ? (l.onOpen(), document.dispatchEvent(new CustomEvent(Ye))) : l.onClose(), o?.(e);
|
|
657
658
|
}, "onChange"),
|
|
658
|
-
caller:
|
|
659
|
-
}), C =
|
|
659
|
+
caller: $e
|
|
660
|
+
}), C = T.useMemo(() => x ? b.current ? "delayed-open" : "instant-open" : "closed", [x]), w = T.useCallback(() => {
|
|
660
661
|
window.clearTimeout(_.current), _.current = 0, b.current = !1, S(!0);
|
|
661
|
-
}, [S]), E =
|
|
662
|
+
}, [S]), E = T.useCallback(() => {
|
|
662
663
|
window.clearTimeout(_.current), _.current = 0, S(!1);
|
|
663
|
-
}, [S]), D =
|
|
664
|
+
}, [S]), D = T.useCallback(() => {
|
|
664
665
|
window.clearTimeout(_.current), _.current = window.setTimeout(() => {
|
|
665
666
|
b.current = !0, S(!0), _.current = 0;
|
|
666
667
|
}, y);
|
|
667
668
|
}, [y, S]);
|
|
668
|
-
|
|
669
|
+
T.useEffect(() => () => {
|
|
669
670
|
_.current &&= (window.clearTimeout(_.current), 0);
|
|
670
671
|
}, []);
|
|
671
|
-
let
|
|
672
|
-
return /* @__PURE__ */
|
|
672
|
+
let O = m ?? g;
|
|
673
|
+
return /* @__PURE__ */ k(Re, {
|
|
673
674
|
...u,
|
|
674
|
-
children: /* @__PURE__ */
|
|
675
|
+
children: /* @__PURE__ */ k(et, {
|
|
675
676
|
scope: t,
|
|
676
|
-
contentId:
|
|
677
|
+
contentId: O,
|
|
677
678
|
setContentId: h,
|
|
678
679
|
open: x,
|
|
679
680
|
stateAttribute: C,
|
|
680
681
|
trigger: f,
|
|
681
682
|
onTriggerChange: p,
|
|
682
|
-
onTriggerEnter:
|
|
683
|
-
l.isOpenDelayedRef.current ? D() :
|
|
683
|
+
onTriggerEnter: T.useCallback(() => {
|
|
684
|
+
l.isOpenDelayedRef.current ? D() : w();
|
|
684
685
|
}, [
|
|
685
686
|
l.isOpenDelayedRef,
|
|
686
687
|
D,
|
|
687
|
-
|
|
688
|
+
w
|
|
688
689
|
]),
|
|
689
|
-
onTriggerLeave:
|
|
690
|
+
onTriggerLeave: T.useCallback(() => {
|
|
690
691
|
v ? E() : (window.clearTimeout(_.current), _.current = 0);
|
|
691
692
|
}, [E, v]),
|
|
692
|
-
onOpen:
|
|
693
|
+
onOpen: w,
|
|
693
694
|
onClose: E,
|
|
694
695
|
disableHoverableContent: v,
|
|
695
696
|
children: n
|
|
696
697
|
})
|
|
697
698
|
});
|
|
698
|
-
}, "Tooltip"),
|
|
699
|
-
let { __scopeTooltip: n, ...r } = e, a = Q(
|
|
700
|
-
return
|
|
699
|
+
}, "Tooltip"), nt = "TooltipTrigger", rt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
700
|
+
let { __scopeTooltip: n, ...r } = e, a = Q(nt, n), o = Ze(nt, n), s = Ke(n), l = i(t, T.useRef(null), a.onTriggerChange), u = T.useRef(!1), d = T.useRef(!1), p = T.useCallback(() => u.current = !1, []);
|
|
701
|
+
return T.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ k(ze, {
|
|
701
702
|
asChild: !0,
|
|
702
703
|
...s,
|
|
703
|
-
children: /* @__PURE__ */
|
|
704
|
+
children: /* @__PURE__ */ k(c.button, {
|
|
704
705
|
"aria-describedby": a.open ? a.contentId : void 0,
|
|
705
706
|
"data-state": a.stateAttribute,
|
|
706
707
|
...r,
|
|
@@ -721,47 +722,47 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
721
722
|
onClick: f(e.onClick, a.onClose)
|
|
722
723
|
})
|
|
723
724
|
});
|
|
724
|
-
}, "TooltipTrigger")),
|
|
725
|
-
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = Q(
|
|
726
|
-
return /* @__PURE__ */
|
|
725
|
+
}, "TooltipTrigger")), it = "TooltipPortal", [at, ot] = We(it, { forceMount: void 0 }), st = /* @__PURE__ */ Z((e) => {
|
|
726
|
+
let { __scopeTooltip: t, forceMount: n, children: r, container: i } = e, a = Q(it, t);
|
|
727
|
+
return /* @__PURE__ */ k(at, {
|
|
727
728
|
scope: t,
|
|
728
729
|
forceMount: n,
|
|
729
|
-
children: /* @__PURE__ */
|
|
730
|
+
children: /* @__PURE__ */ k(s, {
|
|
730
731
|
present: n || a.open,
|
|
731
|
-
children: /* @__PURE__ */
|
|
732
|
+
children: /* @__PURE__ */ k(ae, {
|
|
732
733
|
asChild: !0,
|
|
733
734
|
container: i,
|
|
734
735
|
children: r
|
|
735
736
|
})
|
|
736
737
|
})
|
|
737
738
|
});
|
|
738
|
-
}, "TooltipPortal"), $ = "TooltipContent",
|
|
739
|
-
let n =
|
|
740
|
-
return /* @__PURE__ */
|
|
739
|
+
}, "TooltipPortal"), $ = "TooltipContent", ct = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
740
|
+
let n = ot($, e.__scopeTooltip), { forceMount: r = n.forceMount, side: i = "top", ...a } = e, o = Q($, e.__scopeTooltip);
|
|
741
|
+
return /* @__PURE__ */ k(s, {
|
|
741
742
|
present: r || o.open,
|
|
742
|
-
children: o.disableHoverableContent ? /* @__PURE__ */
|
|
743
|
+
children: o.disableHoverableContent ? /* @__PURE__ */ k(dt, {
|
|
743
744
|
side: i,
|
|
744
745
|
...a,
|
|
745
746
|
ref: t
|
|
746
|
-
}) : /* @__PURE__ */
|
|
747
|
+
}) : /* @__PURE__ */ k(lt, {
|
|
747
748
|
side: i,
|
|
748
749
|
...a,
|
|
749
750
|
ref: t
|
|
750
751
|
})
|
|
751
752
|
});
|
|
752
|
-
}, "TooltipContent")),
|
|
753
|
-
let n = Q($, e.__scopeTooltip), r =
|
|
753
|
+
}, "TooltipContent")), lt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
754
|
+
let n = Q($, e.__scopeTooltip), r = Ze($, e.__scopeTooltip), a = T.useRef(null), o = i(t, a), [s, c] = T.useState(null), { trigger: l, onClose: u } = n, d = a.current, { onPointerInTransitChange: f } = r, p = T.useCallback(() => {
|
|
754
755
|
c(null), f(!1);
|
|
755
|
-
}, [f]), m =
|
|
756
|
+
}, [f]), m = T.useCallback((e, t) => {
|
|
756
757
|
let n = e.currentTarget, r = {
|
|
757
758
|
x: e.clientX,
|
|
758
759
|
y: e.clientY
|
|
759
|
-
}, i =
|
|
760
|
+
}, i = mt(r, pt(r, n.getBoundingClientRect())), a = ht(t.getBoundingClientRect()), o = _t([...i, ...a]);
|
|
760
761
|
c(o), f(!0);
|
|
761
762
|
}, [f]);
|
|
762
|
-
return
|
|
763
|
+
return T.useEffect(() => () => p(), [p]), T.useEffect(() => {
|
|
763
764
|
if (l && d) {
|
|
764
|
-
let e = /* @__PURE__ */
|
|
765
|
+
let e = /* @__PURE__ */ Z((e) => m(e, d), "handleTriggerLeave"), t = /* @__PURE__ */ Z((e) => m(e, l), "handleContentLeave");
|
|
765
766
|
return l.addEventListener("pointerleave", e), d.addEventListener("pointerleave", t), () => {
|
|
766
767
|
l.removeEventListener("pointerleave", e), d.removeEventListener("pointerleave", t);
|
|
767
768
|
};
|
|
@@ -771,13 +772,13 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
771
772
|
d,
|
|
772
773
|
m,
|
|
773
774
|
p
|
|
774
|
-
]),
|
|
775
|
+
]), T.useEffect(() => {
|
|
775
776
|
if (s) {
|
|
776
|
-
let e = /* @__PURE__ */
|
|
777
|
+
let e = /* @__PURE__ */ Z((e) => {
|
|
777
778
|
let t = e.target, n = {
|
|
778
779
|
x: e.clientX,
|
|
779
780
|
y: e.clientY
|
|
780
|
-
}, r = l?.contains(t) || d?.contains(t), i = !
|
|
781
|
+
}, r = l?.contains(t) || d?.contains(t), i = !gt(n, s);
|
|
781
782
|
r ? p() : i && (p(), u());
|
|
782
783
|
}, "handleTrackPointerGrace");
|
|
783
784
|
return document.addEventListener("pointermove", e), () => document.removeEventListener("pointermove", e);
|
|
@@ -788,15 +789,15 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
788
789
|
s,
|
|
789
790
|
u,
|
|
790
791
|
p
|
|
791
|
-
]), /* @__PURE__ */
|
|
792
|
+
]), /* @__PURE__ */ k(dt, {
|
|
792
793
|
...e,
|
|
793
794
|
ref: o
|
|
794
795
|
});
|
|
795
|
-
}, "TooltipContentHoverable")),
|
|
796
|
-
let { __scopeTooltip: n, children: r, "aria-label": i, id: a, onEscapeKeyDown: o, onPointerDownOutside: s, ...c } = e, l = Q($, n), d =
|
|
797
|
-
|
|
796
|
+
}, "TooltipContentHoverable")), ut = r("TooltipContent"), dt = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
797
|
+
let { __scopeTooltip: n, children: r, "aria-label": i, id: a, onEscapeKeyDown: o, onPointerDownOutside: s, ...c } = e, l = Q($, n), d = Ke(n), { onClose: f } = l;
|
|
798
|
+
T.useEffect(() => (document.addEventListener(Ye, f), () => document.removeEventListener(Ye, f)), [f]), T.useEffect(() => {
|
|
798
799
|
if (l.trigger) {
|
|
799
|
-
let e = /* @__PURE__ */
|
|
800
|
+
let e = /* @__PURE__ */ Z((e) => {
|
|
800
801
|
e.target instanceof Node && e.target.contains(l.trigger) && f();
|
|
801
802
|
}, "handleScroll");
|
|
802
803
|
return window.addEventListener("scroll", e, { capture: !0 }), () => window.removeEventListener("scroll", e, { capture: !0 });
|
|
@@ -805,14 +806,14 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
805
806
|
let { setContentId: p } = l;
|
|
806
807
|
return u(() => (p(a), () => {
|
|
807
808
|
p(void 0);
|
|
808
|
-
}), [a, p]), /* @__PURE__ */
|
|
809
|
+
}), [a, p]), /* @__PURE__ */ k(U, {
|
|
809
810
|
asChild: !0,
|
|
810
811
|
disableOutsidePointerEvents: !1,
|
|
811
812
|
onEscapeKeyDown: o,
|
|
812
813
|
onPointerDownOutside: s,
|
|
813
814
|
onFocusOutside: (e) => e.preventDefault(),
|
|
814
815
|
onDismiss: f,
|
|
815
|
-
children: /* @__PURE__ */
|
|
816
|
+
children: /* @__PURE__ */ A(Be, {
|
|
816
817
|
"data-state": l.stateAttribute,
|
|
817
818
|
role: i ? void 0 : "tooltip",
|
|
818
819
|
id: i ? void 0 : l.contentId,
|
|
@@ -827,22 +828,22 @@ var Re = Ee, ze = Oe, Be = Me, Ve = Fe, He = /* @__PURE__ */ e({
|
|
|
827
828
|
"--radix-tooltip-trigger-width": "var(--radix-popper-anchor-width)",
|
|
828
829
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
829
830
|
},
|
|
830
|
-
children: [/* @__PURE__ */
|
|
831
|
+
children: [/* @__PURE__ */ k(ut, { children: r }), i ? /* @__PURE__ */ k(I, {
|
|
831
832
|
id: l.contentId,
|
|
832
833
|
role: "tooltip",
|
|
833
834
|
children: i
|
|
834
835
|
}) : null]
|
|
835
836
|
})
|
|
836
837
|
});
|
|
837
|
-
}, "TooltipContentImpl")),
|
|
838
|
+
}, "TooltipContentImpl")), ft = /* @__PURE__ */ T.forwardRef(/* @__PURE__ */ Z(function(e, t) {
|
|
838
839
|
let { __scopeTooltip: n, ...r } = e;
|
|
839
|
-
return /* @__PURE__ */
|
|
840
|
-
...
|
|
840
|
+
return /* @__PURE__ */ k(Ve, {
|
|
841
|
+
...Ke(n),
|
|
841
842
|
...r,
|
|
842
843
|
ref: t
|
|
843
844
|
});
|
|
844
845
|
}, "TooltipArrow"));
|
|
845
|
-
function
|
|
846
|
+
function pt(e, t) {
|
|
846
847
|
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
848
|
switch (Math.min(n, r, i, a)) {
|
|
848
849
|
case a: return "left";
|
|
@@ -852,8 +853,8 @@ function ft(e, t) {
|
|
|
852
853
|
default: throw Error("unreachable");
|
|
853
854
|
}
|
|
854
855
|
}
|
|
855
|
-
|
|
856
|
-
function
|
|
856
|
+
Z(pt, "getExitSideFromRect");
|
|
857
|
+
function mt(e, t, n = 5) {
|
|
857
858
|
let r = [];
|
|
858
859
|
switch (t) {
|
|
859
860
|
case "top":
|
|
@@ -895,8 +896,8 @@ function pt(e, t, n = 5) {
|
|
|
895
896
|
}
|
|
896
897
|
return r;
|
|
897
898
|
}
|
|
898
|
-
|
|
899
|
-
function
|
|
899
|
+
Z(mt, "getPaddedExitPoints");
|
|
900
|
+
function ht(e) {
|
|
900
901
|
let { top: t, right: n, bottom: r, left: i } = e;
|
|
901
902
|
return [
|
|
902
903
|
{
|
|
@@ -917,8 +918,8 @@ function mt(e) {
|
|
|
917
918
|
}
|
|
918
919
|
];
|
|
919
920
|
}
|
|
920
|
-
|
|
921
|
-
function
|
|
921
|
+
Z(ht, "getPointsFromRect");
|
|
922
|
+
function gt(e, t) {
|
|
922
923
|
let { x: n, y: r } = e, i = !1;
|
|
923
924
|
for (let e = 0, a = t.length - 1; e < t.length; a = e++) {
|
|
924
925
|
let o = t[e], s = t[a], c = o.x, l = o.y, u = s.x, d = s.y;
|
|
@@ -926,13 +927,13 @@ function ht(e, t) {
|
|
|
926
927
|
}
|
|
927
928
|
return i;
|
|
928
929
|
}
|
|
929
|
-
|
|
930
|
-
function
|
|
930
|
+
Z(gt, "isPointInPolygon");
|
|
931
|
+
function _t(e) {
|
|
931
932
|
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)),
|
|
933
|
+
return t.sort((e, t) => e.x < t.x ? -1 : e.x > t.x ? 1 : e.y < t.y ? -1 : +(e.y > t.y)), vt(t);
|
|
933
934
|
}
|
|
934
|
-
|
|
935
|
-
function
|
|
935
|
+
Z(_t, "getHull");
|
|
936
|
+
function vt(e) {
|
|
936
937
|
if (e.length <= 1) return e.slice();
|
|
937
938
|
let t = [];
|
|
938
939
|
for (let n = 0; n < e.length; n++) {
|
|
@@ -957,43 +958,43 @@ function _t(e) {
|
|
|
957
958
|
}
|
|
958
959
|
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
|
}
|
|
960
|
-
|
|
961
|
-
var
|
|
961
|
+
Z(vt, "getHullPresorted");
|
|
962
|
+
var yt = Qe, bt = tt, xt = rt, St = st, Ct = ct, wt = ft;
|
|
962
963
|
//#endregion
|
|
963
964
|
//#region lib/hooks/use-fullscreen-element.ts
|
|
964
|
-
function
|
|
965
|
+
function Tt(e) {
|
|
965
966
|
return document.addEventListener("fullscreenchange", e), () => document.removeEventListener("fullscreenchange", e);
|
|
966
967
|
}
|
|
967
|
-
var
|
|
968
|
+
var Et = /* @__PURE__ */ new Set([
|
|
968
969
|
"VIDEO",
|
|
969
970
|
"IFRAME",
|
|
970
971
|
"CANVAS",
|
|
971
972
|
"IMG",
|
|
972
973
|
"EMBED"
|
|
973
974
|
]);
|
|
974
|
-
function
|
|
975
|
+
function Dt(e) {
|
|
975
976
|
let t = e.fullscreenElement;
|
|
976
|
-
return t && !
|
|
977
|
+
return t && !Et.has(t.tagName) ? t : null;
|
|
977
978
|
}
|
|
978
|
-
function
|
|
979
|
-
return
|
|
979
|
+
function Ot() {
|
|
980
|
+
return O(Tt, () => Dt(document), () => null);
|
|
980
981
|
}
|
|
981
982
|
//#endregion
|
|
982
983
|
//#region lib/components/ui/overlays/tooltip/tooltip.tsx
|
|
983
|
-
function
|
|
984
|
-
return /* @__PURE__ */
|
|
984
|
+
function kt({ delayDuration: e = 0, ...t }) {
|
|
985
|
+
return /* @__PURE__ */ k(yt, {
|
|
985
986
|
"data-slot": "tooltip-provider",
|
|
986
987
|
delayDuration: e,
|
|
987
988
|
...t
|
|
988
989
|
});
|
|
989
990
|
}
|
|
990
|
-
function
|
|
991
|
-
return /* @__PURE__ */
|
|
991
|
+
function At({ content: e, children: t, className: r, container: i, side: a, ...o }) {
|
|
992
|
+
return /* @__PURE__ */ A(jt, {
|
|
992
993
|
...o,
|
|
993
|
-
children: [/* @__PURE__ */
|
|
994
|
+
children: [/* @__PURE__ */ k(Mt, {
|
|
994
995
|
asChild: !0,
|
|
995
996
|
children: t
|
|
996
|
-
}), /* @__PURE__ */
|
|
997
|
+
}), /* @__PURE__ */ k(Nt, {
|
|
997
998
|
className: n("max-w-sm text-wrap", r),
|
|
998
999
|
container: i,
|
|
999
1000
|
side: a,
|
|
@@ -1001,51 +1002,51 @@ function kt({ content: e, children: t, className: r, container: i, side: a, ...o
|
|
|
1001
1002
|
})]
|
|
1002
1003
|
});
|
|
1003
1004
|
}
|
|
1004
|
-
function
|
|
1005
|
-
return /* @__PURE__ */
|
|
1005
|
+
function jt({ ...e }) {
|
|
1006
|
+
return /* @__PURE__ */ k(kt, { children: /* @__PURE__ */ k(bt, {
|
|
1006
1007
|
"data-slot": "tooltip",
|
|
1007
1008
|
...e
|
|
1008
1009
|
}) });
|
|
1009
1010
|
}
|
|
1010
|
-
function
|
|
1011
|
-
return /* @__PURE__ */
|
|
1011
|
+
function Mt({ ...e }) {
|
|
1012
|
+
return /* @__PURE__ */ k(xt, {
|
|
1012
1013
|
"data-pw": e.name ?? "tooltip-trigger",
|
|
1013
1014
|
"data-slot": "tooltip-trigger",
|
|
1014
1015
|
...e
|
|
1015
1016
|
});
|
|
1016
1017
|
}
|
|
1017
|
-
function
|
|
1018
|
-
let l =
|
|
1019
|
-
return /* @__PURE__ */
|
|
1018
|
+
function Nt({ className: e, sideOffset: t = 0, children: r, container: a, ref: o, onEscapeKeyDown: s, ...c }) {
|
|
1019
|
+
let l = Ot(), u = D(null), d = i(u, o);
|
|
1020
|
+
return /* @__PURE__ */ k(St, {
|
|
1020
1021
|
container: a ?? l,
|
|
1021
|
-
children: /* @__PURE__ */
|
|
1022
|
+
children: /* @__PURE__ */ A(Ct, {
|
|
1022
1023
|
ref: d,
|
|
1023
1024
|
onEscapeKeyDown: (e) => {
|
|
1024
|
-
s?.(e),
|
|
1025
|
+
s?.(e), j(u.current, e);
|
|
1025
1026
|
},
|
|
1026
1027
|
"data-slot": "tooltip-content",
|
|
1027
1028
|
"data-pw": "tooltip-content",
|
|
1028
1029
|
sideOffset: t,
|
|
1029
1030
|
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),
|
|
1030
1031
|
...c,
|
|
1031
|
-
children: [r, /* @__PURE__ */
|
|
1032
|
+
children: [r, /* @__PURE__ */ k(wt, { className: "bg-tooltip fill-tooltip z-50 size-2.5 translate-y-[calc(-50%_-_2px)] rotate-45 rounded-[2px]" })]
|
|
1032
1033
|
})
|
|
1033
1034
|
});
|
|
1034
1035
|
}
|
|
1035
1036
|
//#endregion
|
|
1036
1037
|
//#region ../../node_modules/class-variance-authority/dist/index.mjs
|
|
1037
|
-
var
|
|
1038
|
-
if (t?.variants == null) return
|
|
1038
|
+
var Pt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ft = t, It = (e, t) => (n) => {
|
|
1039
|
+
if (t?.variants == null) return Ft(e, n?.class, n?.className);
|
|
1039
1040
|
let { variants: r, defaultVariants: i } = t, a = Object.keys(r).map((e) => {
|
|
1040
1041
|
let t = n?.[e], a = i?.[e];
|
|
1041
1042
|
if (t === null) return null;
|
|
1042
|
-
let o =
|
|
1043
|
+
let o = Pt(t) || Pt(a);
|
|
1043
1044
|
return r[e][o];
|
|
1044
1045
|
}), o = n && Object.entries(n).reduce((e, t) => {
|
|
1045
1046
|
let [n, r] = t;
|
|
1046
1047
|
return r === void 0 || (e[n] = r), e;
|
|
1047
1048
|
}, {});
|
|
1048
|
-
return
|
|
1049
|
+
return Ft(e, a, t?.compoundVariants?.reduce((e, t) => {
|
|
1049
1050
|
let { class: n, className: r, ...a } = t;
|
|
1050
1051
|
return Object.entries(a).every((e) => {
|
|
1051
1052
|
let [t, n] = e;
|
|
@@ -1062,6 +1063,227 @@ var Nt = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Pt = t, Ft =
|
|
|
1062
1063
|
r
|
|
1063
1064
|
] : e;
|
|
1064
1065
|
}, []), n?.class, n?.className);
|
|
1065
|
-
}
|
|
1066
|
+
}, Lt = It("transition-all duration-500", {
|
|
1067
|
+
variants: {
|
|
1068
|
+
variant: {
|
|
1069
|
+
1: "",
|
|
1070
|
+
2: "",
|
|
1071
|
+
3: "",
|
|
1072
|
+
4: ""
|
|
1073
|
+
},
|
|
1074
|
+
color: {
|
|
1075
|
+
primary: null,
|
|
1076
|
+
secondary: null,
|
|
1077
|
+
info: null,
|
|
1078
|
+
warning: null,
|
|
1079
|
+
default: null,
|
|
1080
|
+
error: null,
|
|
1081
|
+
success: null,
|
|
1082
|
+
light: null
|
|
1083
|
+
}
|
|
1084
|
+
},
|
|
1085
|
+
defaultVariants: {
|
|
1086
|
+
variant: "1",
|
|
1087
|
+
color: "primary"
|
|
1088
|
+
},
|
|
1089
|
+
compoundVariants: [
|
|
1090
|
+
{
|
|
1091
|
+
variant: "1",
|
|
1092
|
+
color: "primary",
|
|
1093
|
+
className: "border-primary/10 border-t-primary-indicator"
|
|
1094
|
+
},
|
|
1095
|
+
{
|
|
1096
|
+
variant: "1",
|
|
1097
|
+
color: "secondary",
|
|
1098
|
+
className: "border-secondary/10 border-t-secondary"
|
|
1099
|
+
},
|
|
1100
|
+
{
|
|
1101
|
+
variant: "1",
|
|
1102
|
+
color: "success",
|
|
1103
|
+
className: "border-success/10 border-t-success"
|
|
1104
|
+
},
|
|
1105
|
+
{
|
|
1106
|
+
variant: "1",
|
|
1107
|
+
color: "info",
|
|
1108
|
+
className: "border-info/10 border-t-info"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
variant: "1",
|
|
1112
|
+
color: "warning",
|
|
1113
|
+
className: "border-warning/10 border-t-warning"
|
|
1114
|
+
},
|
|
1115
|
+
{
|
|
1116
|
+
variant: "1",
|
|
1117
|
+
color: "error",
|
|
1118
|
+
className: "border-error/10 border-t-error"
|
|
1119
|
+
},
|
|
1120
|
+
{
|
|
1121
|
+
variant: "1",
|
|
1122
|
+
color: "default",
|
|
1123
|
+
className: "border-foreground/10 border-t-foreground"
|
|
1124
|
+
},
|
|
1125
|
+
{
|
|
1126
|
+
variant: "1",
|
|
1127
|
+
color: "light",
|
|
1128
|
+
className: "border-white/10 border-t-white"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
variant: "2",
|
|
1132
|
+
color: "primary",
|
|
1133
|
+
className: "border-primary/10 border-b-primary-indicator border-t-primary-indicator"
|
|
1134
|
+
},
|
|
1135
|
+
{
|
|
1136
|
+
variant: "2",
|
|
1137
|
+
color: "secondary",
|
|
1138
|
+
className: "border-secondary/10 border-b-secondary border-t-secondary"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
variant: "2",
|
|
1142
|
+
color: "success",
|
|
1143
|
+
className: "border-success/10 border-b-success border-t-success"
|
|
1144
|
+
},
|
|
1145
|
+
{
|
|
1146
|
+
variant: "2",
|
|
1147
|
+
color: "info",
|
|
1148
|
+
className: "border-info/10 border-b-info border-t-info"
|
|
1149
|
+
},
|
|
1150
|
+
{
|
|
1151
|
+
variant: "2",
|
|
1152
|
+
color: "warning",
|
|
1153
|
+
className: "border-warning/10 border-b-warning border-t-warning"
|
|
1154
|
+
},
|
|
1155
|
+
{
|
|
1156
|
+
variant: "2",
|
|
1157
|
+
color: "error",
|
|
1158
|
+
className: "border-error/10 border-b-error border-t-error"
|
|
1159
|
+
},
|
|
1160
|
+
{
|
|
1161
|
+
variant: "2",
|
|
1162
|
+
color: "default",
|
|
1163
|
+
className: "border-foreground/10 border-b-foreground border-t-foreground"
|
|
1164
|
+
},
|
|
1165
|
+
{
|
|
1166
|
+
variant: "2",
|
|
1167
|
+
color: "light",
|
|
1168
|
+
className: "border-white/10 border-b-white border-t-white"
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
variant: "3",
|
|
1172
|
+
color: "primary",
|
|
1173
|
+
className: "border-primary/10 border-b-primary-indicator border-t-primary-indicator border-r-primary-indicator"
|
|
1174
|
+
},
|
|
1175
|
+
{
|
|
1176
|
+
variant: "3",
|
|
1177
|
+
color: "secondary",
|
|
1178
|
+
className: "border-secondary/10 border-b-secondary border-t-secondary border-r-secondary"
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
variant: "3",
|
|
1182
|
+
color: "success",
|
|
1183
|
+
className: "border-success/10 border-b-success border-t-success border-r-success"
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
variant: "3",
|
|
1187
|
+
color: "info",
|
|
1188
|
+
className: "border-info/10 border-b-info border-t-info border-r-info"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
variant: "3",
|
|
1192
|
+
color: "warning",
|
|
1193
|
+
className: "border-warning/10 border-b-warning border-t-warning border-r-warning"
|
|
1194
|
+
},
|
|
1195
|
+
{
|
|
1196
|
+
variant: "3",
|
|
1197
|
+
color: "error",
|
|
1198
|
+
className: "border-error/10 border-b-error border-t-error border-r-error"
|
|
1199
|
+
},
|
|
1200
|
+
{
|
|
1201
|
+
variant: "3",
|
|
1202
|
+
color: "default",
|
|
1203
|
+
className: "border-foreground/10 border-b-foreground border-t-foreground border-r-foreground"
|
|
1204
|
+
},
|
|
1205
|
+
{
|
|
1206
|
+
variant: "3",
|
|
1207
|
+
color: "light",
|
|
1208
|
+
className: "border-white/10 border-b-white border-t-white border-r-white"
|
|
1209
|
+
},
|
|
1210
|
+
{
|
|
1211
|
+
variant: "4",
|
|
1212
|
+
color: "primary",
|
|
1213
|
+
className: "stroke-primary-indicator"
|
|
1214
|
+
},
|
|
1215
|
+
{
|
|
1216
|
+
variant: "4",
|
|
1217
|
+
color: "secondary",
|
|
1218
|
+
className: "stroke-secondary"
|
|
1219
|
+
},
|
|
1220
|
+
{
|
|
1221
|
+
variant: "4",
|
|
1222
|
+
color: "success",
|
|
1223
|
+
className: "stroke-success"
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
variant: "4",
|
|
1227
|
+
color: "info",
|
|
1228
|
+
className: "stroke-info"
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
variant: "4",
|
|
1232
|
+
color: "warning",
|
|
1233
|
+
className: "stroke-warning"
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
variant: "4",
|
|
1237
|
+
color: "error",
|
|
1238
|
+
className: "stroke-error"
|
|
1239
|
+
},
|
|
1240
|
+
{
|
|
1241
|
+
variant: "4",
|
|
1242
|
+
color: "default",
|
|
1243
|
+
className: "stroke-foreground"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
variant: "4",
|
|
1247
|
+
color: "light",
|
|
1248
|
+
className: "stroke-white"
|
|
1249
|
+
}
|
|
1250
|
+
]
|
|
1251
|
+
});
|
|
1252
|
+
function Rt({ variant: e = "1", color: t, className: r, ...i }) {
|
|
1253
|
+
let { t: a } = w();
|
|
1254
|
+
return e === "4" ? /* @__PURE__ */ k("svg", {
|
|
1255
|
+
viewBox: "0 0 800 800",
|
|
1256
|
+
"data-slot": "spinner",
|
|
1257
|
+
"data-variant": e,
|
|
1258
|
+
"data-color": t,
|
|
1259
|
+
className: n("size-14", r),
|
|
1260
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1261
|
+
role: "img",
|
|
1262
|
+
"aria-label": i["aria-label"] ?? a("material.spinner.loading", "Loading..."),
|
|
1263
|
+
children: /* @__PURE__ */ k("circle", {
|
|
1264
|
+
className: n("spin2", Lt({
|
|
1265
|
+
variant: e,
|
|
1266
|
+
color: t
|
|
1267
|
+
})),
|
|
1268
|
+
cx: "400",
|
|
1269
|
+
cy: "400",
|
|
1270
|
+
fill: "none",
|
|
1271
|
+
r: "200",
|
|
1272
|
+
strokeWidth: "50",
|
|
1273
|
+
strokeDasharray: "700 1400",
|
|
1274
|
+
strokeLinecap: "round"
|
|
1275
|
+
})
|
|
1276
|
+
}) : /* @__PURE__ */ k("div", {
|
|
1277
|
+
"data-slot": "spinner",
|
|
1278
|
+
"data-variant": e,
|
|
1279
|
+
"data-color": t,
|
|
1280
|
+
className: n("size-12 border-[2px] rounded-full animate-spin", Lt({
|
|
1281
|
+
variant: e,
|
|
1282
|
+
color: t,
|
|
1283
|
+
className: r
|
|
1284
|
+
})),
|
|
1285
|
+
...i
|
|
1286
|
+
});
|
|
1287
|
+
}
|
|
1066
1288
|
//#endregion
|
|
1067
|
-
export {
|
|
1289
|
+
export { U as C, ae as S, F as T, pe as _, kt as a, he as b, bt as c, Ve as d, Be as f, ge as g, me as h, Nt as i, He as l, Ce as m, It as n, Mt as o, Re as p, At as r, Ot as s, Rt as t, ze as u, de as v, W as w, le as x, fe as y };
|