@namuna-nur/ui-kit 1.0.9 → 1.2.2
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/lib/atoms/index.js +27 -27
- package/lib/index.js +90 -88
- package/lib/molecules/index.js +62 -60
- package/lib/shared/Avatar.tokens.js +1995 -1916
- package/lib/shared/TabDots.tokens.js +373 -452
- package/lib/shared/{MessageSettings.tokens.js → TabList.tokens.js} +1116 -1095
- package/lib/src/atoms/Notification/index.d.ts +1 -0
- package/lib/src/atoms/Tooltip/Tooltip.types.d.ts +1 -0
- package/lib/src/molecules/TabList/TabList.d.ts +2 -0
- package/lib/src/molecules/TabList/TabList.stories.d.ts +5 -0
- package/lib/src/molecules/TabList/TabList.test.d.ts +1 -0
- package/lib/src/molecules/TabList/TabList.tokens.d.ts +3 -0
- package/lib/src/molecules/TabList/TabList.types.d.ts +14 -0
- package/lib/src/molecules/TabList/index.d.ts +3 -0
- package/lib/src/molecules/Table/Table.d.ts +1 -1
- package/lib/src/molecules/Table/Table.types.d.ts +3 -2
- package/lib/src/molecules/index.d.ts +1 -0
- package/lib/style.css +1 -1
- package/package.json +169 -165
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { p as s, P as S, q as et, u as Ce, v as U, w as tt, x as Pe, y as ce, z as R, D as q, E as rt, F as Re, G as ot, J as nt, K as st, N as at, O as Ne, Q as it, U as ct, V as lt, W as dt, X as ut, Y as pt, Z as ft, _ as vt, $ as mt, a0 as xt } from "./Avatar.tokens.js";
|
|
2
2
|
import * as n from "react";
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
default: /* @__PURE__ */ s.jsx(be, { className: "text-success-10 fill-success-10" })
|
|
3
|
+
import * as ht from "react-dom";
|
|
4
|
+
import { b as wt, a as P } from "./twMerge.js";
|
|
5
|
+
const Tt = (e) => /* @__PURE__ */ n.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 19, fill: "currentFill", ...e }, /* @__PURE__ */ n.createElement("path", { fillOpacity: 0.8, d: "M1.6 8a.75.75 0 0 1-.75-.75v-6A.75.75 0 0 1 1.6.5h6a.75.75 0 0 1 .75.75v6A.75.75 0 0 1 7.6 8zm10.5 0a.75.75 0 0 1-.75-.75v-6A.75.75 0 0 1 12.1.5h6a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-.75.75zM1.6 18.5a.75.75 0 0 1-.75-.75v-6A.75.75 0 0 1 1.6 11h6a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-.75.75zm10.5 0a.75.75 0 0 1-.75-.75v-6a.75.75 0 0 1 .75-.75h6a.75.75 0 0 1 .75.75v6a.75.75 0 0 1-.75.75z" })), gt = (e) => /* @__PURE__ */ n.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 19, height: 13, fill: "currentFill", ...e }, /* @__PURE__ */ n.createElement("path", { fillOpacity: 0.8, d: "M1.45 12.45a1 1 0 0 1-.72-.28 1 1 0 0 1-.28-.72q0-.43.28-.7.3-.3.72-.3h16q.43 0 .7.3.3.27.3.7a1 1 0 0 1-1 1zm0-5a1 1 0 0 1-.72-.28 1 1 0 0 1-.28-.72q0-.42.28-.7.3-.3.72-.3h16q.43 0 .7.3.3.27.3.7a1 1 0 0 1-1 1zm0-5a1 1 0 0 1-.72-.28 1 1 0 0 1-.28-.72q0-.43.28-.7.3-.3.72-.3h16q.43 0 .7.3.3.28.3.7a1 1 0 0 1-1 1z" })), Te = (e) => /* @__PURE__ */ n.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 25, fill: "none", ...e }, /* @__PURE__ */ n.createElement("path", { fill: "currentFill", d: "M9.73 18.24a1.2 1.2 0 0 1-.85-.35l-4.53-4.53a1.2 1.2 0 0 1 0-1.7 1.2 1.2 0 0 1 1.7 0l3.68 3.69 8.23-8.23a1.2 1.2 0 0 1 1.7 0 1.2 1.2 0 0 1 0 1.7l-9.08 9.07a1.2 1.2 0 0 1-.85.35" })), yt = (e) => /* @__PURE__ */ n.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 25, fill: "none", ...e }, /* @__PURE__ */ n.createElement("path", { stroke: "currentColor", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2.36, d: "m7 17.5 10-10M17 17.5 7 7.5" })), bt = (e) => /* @__PURE__ */ n.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 25, fill: "none", ...e }, /* @__PURE__ */ n.createElement("path", { fill: "currentFill", d: "M12.37 9.49a1.4 1.4 0 0 0-1.4 1.39v9.73c0 .76.64 1.39 1.4 1.39a1.4 1.4 0 0 0 1.39-1.39v-9.73a1.4 1.4 0 0 0-1.4-1.4M12.37 3c-.5 0-.97.19-1.32.54q-.25.28-.4.6-.14.35-.14.71c0 .49.2.97.54 1.32.69.69 1.95.69 2.63 0a1.84 1.84 0 0 0 .39-2.02q-.14-.34-.39-.61A1.8 1.8 0 0 0 12.37 3" })), Et = (e) => /* @__PURE__ */ n.createElement("svg", { xmlns: "http://www.w3.org/2000/svg", width: 24, height: 25, fill: "none", ...e }, /* @__PURE__ */ n.createElement("path", { fill: "currentFill", d: "M12.37 15.51a1.4 1.4 0 0 1-1.4-1.39V4.4c0-.76.64-1.39 1.4-1.39s1.39.63 1.39 1.39v9.73a1.4 1.4 0 0 1-1.4 1.4M12.37 22c-.5 0-.97-.19-1.32-.54a3 3 0 0 1-.4-.6q-.14-.35-.14-.71c0-.49.2-.97.54-1.32a1.94 1.94 0 0 1 2.63 0 1.84 1.84 0 0 1 .39 2.02q-.14.33-.39.61-.54.53-1.31.54" })), Ct = {
|
|
6
|
+
success: /* @__PURE__ */ s.jsx(Te, { className: "text-success-10 fill-success-10" }),
|
|
7
|
+
danger: /* @__PURE__ */ s.jsx(yt, { className: "text-danger-10 fill-danger-10" }),
|
|
8
|
+
info: /* @__PURE__ */ s.jsx(bt, { className: "text-info-10 fill-info-10" }),
|
|
9
|
+
warning: /* @__PURE__ */ s.jsx(Et, { className: "text-sidebar-20 fill-sidebar-20" }),
|
|
10
|
+
default: /* @__PURE__ */ s.jsx(Te, { className: "text-success-10 fill-success-10" })
|
|
12
11
|
};
|
|
13
|
-
var
|
|
12
|
+
var Pt = "VisuallyHidden", G = n.forwardRef(
|
|
14
13
|
(e, r) => /* @__PURE__ */ s.jsx(
|
|
15
14
|
S.span,
|
|
16
15
|
{
|
|
@@ -33,103 +32,103 @@ var kt = "VisuallyHidden", X = n.forwardRef(
|
|
|
33
32
|
}
|
|
34
33
|
)
|
|
35
34
|
);
|
|
36
|
-
|
|
37
|
-
var
|
|
35
|
+
G.displayName = Pt;
|
|
36
|
+
var Rt = G, Nt = "ToastProvider", [je, jt, At] = et("Toast"), [Ae, jr] = Ce("Toast", [At]), [Ar, X] = Ae(Nt), ke = "ToastViewport", kt = ["F8"], oe = "toast.viewportPause", ne = "toast.viewportResume", Se = n.forwardRef(
|
|
38
37
|
(e, r) => {
|
|
39
38
|
const {
|
|
40
39
|
__scopeToast: t,
|
|
41
|
-
hotkey: o =
|
|
40
|
+
hotkey: o = kt,
|
|
42
41
|
label: a = "Notifications ({hotkey})",
|
|
43
42
|
...c
|
|
44
|
-
} = e, l =
|
|
43
|
+
} = e, l = X(ke, t), m = jt(t), u = n.useRef(null), i = n.useRef(null), p = n.useRef(null), x = n.useRef(null), g = U(r, x, l.onViewportChange), w = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), y = l.toastCount > 0;
|
|
45
44
|
n.useEffect(() => {
|
|
46
|
-
const
|
|
47
|
-
var
|
|
48
|
-
o.length !== 0 && o.every((E) =>
|
|
45
|
+
const d = (b) => {
|
|
46
|
+
var T;
|
|
47
|
+
o.length !== 0 && o.every((E) => b[E] || b.code === E) && ((T = x.current) == null || T.focus());
|
|
49
48
|
};
|
|
50
|
-
return document.addEventListener("keydown",
|
|
49
|
+
return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
|
|
51
50
|
}, [o]), n.useEffect(() => {
|
|
52
|
-
const
|
|
53
|
-
if (
|
|
51
|
+
const d = u.current, b = x.current;
|
|
52
|
+
if (y && d && b) {
|
|
54
53
|
const h = () => {
|
|
55
54
|
if (!l.isClosePausedRef.current) {
|
|
56
|
-
const
|
|
57
|
-
|
|
55
|
+
const N = new CustomEvent(oe);
|
|
56
|
+
b.dispatchEvent(N), l.isClosePausedRef.current = !0;
|
|
58
57
|
}
|
|
59
|
-
},
|
|
58
|
+
}, T = () => {
|
|
60
59
|
if (l.isClosePausedRef.current) {
|
|
61
|
-
const
|
|
62
|
-
|
|
60
|
+
const N = new CustomEvent(ne);
|
|
61
|
+
b.dispatchEvent(N), l.isClosePausedRef.current = !1;
|
|
63
62
|
}
|
|
64
|
-
}, E = (
|
|
65
|
-
!
|
|
66
|
-
},
|
|
67
|
-
|
|
63
|
+
}, E = (N) => {
|
|
64
|
+
!d.contains(N.relatedTarget) && T();
|
|
65
|
+
}, C = () => {
|
|
66
|
+
d.contains(document.activeElement) || T();
|
|
68
67
|
};
|
|
69
|
-
return
|
|
70
|
-
|
|
68
|
+
return d.addEventListener("focusin", h), d.addEventListener("focusout", E), d.addEventListener("pointermove", h), d.addEventListener("pointerleave", C), window.addEventListener("blur", h), window.addEventListener("focus", T), () => {
|
|
69
|
+
d.removeEventListener("focusin", h), d.removeEventListener("focusout", E), d.removeEventListener("pointermove", h), d.removeEventListener("pointerleave", C), window.removeEventListener("blur", h), window.removeEventListener("focus", T);
|
|
71
70
|
};
|
|
72
71
|
}
|
|
73
|
-
}, [
|
|
74
|
-
const
|
|
75
|
-
({ tabbingDirection:
|
|
76
|
-
const h =
|
|
77
|
-
const E =
|
|
78
|
-
return
|
|
72
|
+
}, [y, l.isClosePausedRef]);
|
|
73
|
+
const f = n.useCallback(
|
|
74
|
+
({ tabbingDirection: d }) => {
|
|
75
|
+
const h = m().map((T) => {
|
|
76
|
+
const E = T.ref.current, C = [E, ...Wt(E)];
|
|
77
|
+
return d === "forwards" ? C : C.reverse();
|
|
79
78
|
});
|
|
80
|
-
return (
|
|
79
|
+
return (d === "forwards" ? h.reverse() : h).flat();
|
|
81
80
|
},
|
|
82
|
-
[
|
|
81
|
+
[m]
|
|
83
82
|
);
|
|
84
83
|
return n.useEffect(() => {
|
|
85
|
-
const
|
|
86
|
-
if (
|
|
87
|
-
const
|
|
88
|
-
var
|
|
89
|
-
const
|
|
90
|
-
if (h.key === "Tab" && !
|
|
84
|
+
const d = x.current;
|
|
85
|
+
if (d) {
|
|
86
|
+
const b = (h) => {
|
|
87
|
+
var C, N, A;
|
|
88
|
+
const T = h.altKey || h.ctrlKey || h.metaKey;
|
|
89
|
+
if (h.key === "Tab" && !T) {
|
|
91
90
|
const F = document.activeElement, O = h.shiftKey;
|
|
92
|
-
if (h.target ===
|
|
93
|
-
(
|
|
91
|
+
if (h.target === d && O) {
|
|
92
|
+
(C = i.current) == null || C.focus();
|
|
94
93
|
return;
|
|
95
94
|
}
|
|
96
|
-
const _ =
|
|
97
|
-
|
|
95
|
+
const _ = f({ tabbingDirection: O ? "backwards" : "forwards" }), $ = _.findIndex((v) => v === F);
|
|
96
|
+
te(_.slice($ + 1)) ? h.preventDefault() : O ? (N = i.current) == null || N.focus() : (A = p.current) == null || A.focus();
|
|
98
97
|
}
|
|
99
98
|
};
|
|
100
|
-
return
|
|
99
|
+
return d.addEventListener("keydown", b), () => d.removeEventListener("keydown", b);
|
|
101
100
|
}
|
|
102
|
-
}, [
|
|
103
|
-
|
|
101
|
+
}, [m, f]), /* @__PURE__ */ s.jsxs(
|
|
102
|
+
tt,
|
|
104
103
|
{
|
|
105
|
-
ref:
|
|
104
|
+
ref: u,
|
|
106
105
|
role: "region",
|
|
107
106
|
"aria-label": a.replace("{hotkey}", w),
|
|
108
107
|
tabIndex: -1,
|
|
109
|
-
style: { pointerEvents:
|
|
108
|
+
style: { pointerEvents: y ? void 0 : "none" },
|
|
110
109
|
children: [
|
|
111
|
-
|
|
112
|
-
|
|
110
|
+
y && /* @__PURE__ */ s.jsx(
|
|
111
|
+
se,
|
|
113
112
|
{
|
|
114
113
|
ref: i,
|
|
115
114
|
onFocusFromOutsideViewport: () => {
|
|
116
|
-
const
|
|
115
|
+
const d = f({
|
|
117
116
|
tabbingDirection: "forwards"
|
|
118
117
|
});
|
|
119
|
-
|
|
118
|
+
te(d);
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
121
|
),
|
|
123
|
-
/* @__PURE__ */ s.jsx(je.Slot, { scope: t, children: /* @__PURE__ */ s.jsx(S.ol, { tabIndex: -1, ...c, ref:
|
|
124
|
-
|
|
125
|
-
|
|
122
|
+
/* @__PURE__ */ s.jsx(je.Slot, { scope: t, children: /* @__PURE__ */ s.jsx(S.ol, { tabIndex: -1, ...c, ref: g }) }),
|
|
123
|
+
y && /* @__PURE__ */ s.jsx(
|
|
124
|
+
se,
|
|
126
125
|
{
|
|
127
|
-
ref:
|
|
126
|
+
ref: p,
|
|
128
127
|
onFocusFromOutsideViewport: () => {
|
|
129
|
-
const
|
|
128
|
+
const d = f({
|
|
130
129
|
tabbingDirection: "backwards"
|
|
131
130
|
});
|
|
132
|
-
|
|
131
|
+
te(d);
|
|
133
132
|
}
|
|
134
133
|
}
|
|
135
134
|
)
|
|
@@ -138,12 +137,12 @@ var Nt = X, jt = "ToastProvider", [je, At, St] = tt("Toast"), [Ae, Sr] = Pe("Toa
|
|
|
138
137
|
);
|
|
139
138
|
}
|
|
140
139
|
);
|
|
141
|
-
|
|
142
|
-
var
|
|
140
|
+
Se.displayName = ke;
|
|
141
|
+
var _e = "ToastFocusProxy", se = n.forwardRef(
|
|
143
142
|
(e, r) => {
|
|
144
|
-
const { __scopeToast: t, onFocusFromOutsideViewport: o, ...a } = e, c =
|
|
143
|
+
const { __scopeToast: t, onFocusFromOutsideViewport: o, ...a } = e, c = X(_e, t);
|
|
145
144
|
return /* @__PURE__ */ s.jsx(
|
|
146
|
-
|
|
145
|
+
G,
|
|
147
146
|
{
|
|
148
147
|
"aria-hidden": !0,
|
|
149
148
|
tabIndex: 0,
|
|
@@ -152,53 +151,53 @@ var De = "ToastFocusProxy", ae = n.forwardRef(
|
|
|
152
151
|
style: { position: "fixed" },
|
|
153
152
|
onFocus: (l) => {
|
|
154
153
|
var i;
|
|
155
|
-
const
|
|
156
|
-
!((i = c.viewport) != null && i.contains(
|
|
154
|
+
const m = l.relatedTarget;
|
|
155
|
+
!((i = c.viewport) != null && i.contains(m)) && o();
|
|
157
156
|
}
|
|
158
157
|
}
|
|
159
158
|
);
|
|
160
159
|
}
|
|
161
160
|
);
|
|
162
|
-
|
|
163
|
-
var
|
|
161
|
+
se.displayName = _e;
|
|
162
|
+
var Y = "Toast", St = "toast.swipeStart", _t = "toast.swipeMove", Dt = "toast.swipeCancel", Ot = "toast.swipeEnd", De = n.forwardRef(
|
|
164
163
|
(e, r) => {
|
|
165
|
-
const { forceMount: t, open: o, defaultOpen: a, onOpenChange: c, ...l } = e, [
|
|
164
|
+
const { forceMount: t, open: o, defaultOpen: a, onOpenChange: c, ...l } = e, [m = !0, u] = Pe({
|
|
166
165
|
prop: o,
|
|
167
166
|
defaultProp: a,
|
|
168
167
|
onChange: c
|
|
169
168
|
});
|
|
170
|
-
return /* @__PURE__ */ s.jsx(
|
|
171
|
-
|
|
169
|
+
return /* @__PURE__ */ s.jsx(ce, { present: t || m, children: /* @__PURE__ */ s.jsx(
|
|
170
|
+
Ft,
|
|
172
171
|
{
|
|
173
|
-
open:
|
|
172
|
+
open: m,
|
|
174
173
|
...l,
|
|
175
174
|
ref: r,
|
|
176
|
-
onClose: () =>
|
|
177
|
-
onPause:
|
|
178
|
-
onResume:
|
|
175
|
+
onClose: () => u(!1),
|
|
176
|
+
onPause: q(e.onPause),
|
|
177
|
+
onResume: q(e.onResume),
|
|
179
178
|
onSwipeStart: R(e.onSwipeStart, (i) => {
|
|
180
179
|
i.currentTarget.setAttribute("data-swipe", "start");
|
|
181
180
|
}),
|
|
182
181
|
onSwipeMove: R(e.onSwipeMove, (i) => {
|
|
183
|
-
const { x:
|
|
184
|
-
i.currentTarget.setAttribute("data-swipe", "move"), i.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${
|
|
182
|
+
const { x: p, y: x } = i.detail.delta;
|
|
183
|
+
i.currentTarget.setAttribute("data-swipe", "move"), i.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${p}px`), i.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${x}px`);
|
|
185
184
|
}),
|
|
186
185
|
onSwipeCancel: R(e.onSwipeCancel, (i) => {
|
|
187
186
|
i.currentTarget.setAttribute("data-swipe", "cancel"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), i.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-end-y");
|
|
188
187
|
}),
|
|
189
188
|
onSwipeEnd: R(e.onSwipeEnd, (i) => {
|
|
190
|
-
const { x:
|
|
191
|
-
i.currentTarget.setAttribute("data-swipe", "end"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), i.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${
|
|
189
|
+
const { x: p, y: x } = i.detail.delta;
|
|
190
|
+
i.currentTarget.setAttribute("data-swipe", "end"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"), i.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"), i.currentTarget.style.setProperty("--radix-toast-swipe-end-x", `${p}px`), i.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${x}px`), u(!1);
|
|
192
191
|
})
|
|
193
192
|
}
|
|
194
193
|
) });
|
|
195
194
|
}
|
|
196
195
|
);
|
|
197
|
-
|
|
198
|
-
var [
|
|
196
|
+
De.displayName = Y;
|
|
197
|
+
var [Lt, It] = Ae(Y, {
|
|
199
198
|
onClose() {
|
|
200
199
|
}
|
|
201
|
-
}),
|
|
200
|
+
}), Ft = n.forwardRef(
|
|
202
201
|
(e, r) => {
|
|
203
202
|
const {
|
|
204
203
|
__scopeToast: t,
|
|
@@ -206,58 +205,58 @@ var [Ft, Mt] = Ae(B, {
|
|
|
206
205
|
duration: a,
|
|
207
206
|
open: c,
|
|
208
207
|
onClose: l,
|
|
209
|
-
onEscapeKeyDown:
|
|
210
|
-
onPause:
|
|
208
|
+
onEscapeKeyDown: m,
|
|
209
|
+
onPause: u,
|
|
211
210
|
onResume: i,
|
|
212
|
-
onSwipeStart:
|
|
211
|
+
onSwipeStart: p,
|
|
213
212
|
onSwipeMove: x,
|
|
214
|
-
onSwipeCancel:
|
|
213
|
+
onSwipeCancel: g,
|
|
215
214
|
onSwipeEnd: w,
|
|
216
|
-
...
|
|
217
|
-
} = e,
|
|
218
|
-
var
|
|
219
|
-
(
|
|
215
|
+
...y
|
|
216
|
+
} = e, f = X(Y, t), [d, b] = n.useState(null), h = U(r, (v) => b(v)), T = n.useRef(null), E = n.useRef(null), C = a || f.duration, N = n.useRef(0), A = n.useRef(C), F = n.useRef(0), { onToastAdd: O, onToastRemove: Z } = f, L = q(() => {
|
|
217
|
+
var j;
|
|
218
|
+
(d == null ? void 0 : d.contains(document.activeElement)) && ((j = f.viewport) == null || j.focus()), l();
|
|
220
219
|
}), _ = n.useCallback(
|
|
221
|
-
(
|
|
222
|
-
!
|
|
220
|
+
(v) => {
|
|
221
|
+
!v || v === 1 / 0 || (window.clearTimeout(F.current), N.current = (/* @__PURE__ */ new Date()).getTime(), F.current = window.setTimeout(L, v));
|
|
223
222
|
},
|
|
224
223
|
[L]
|
|
225
224
|
);
|
|
226
225
|
n.useEffect(() => {
|
|
227
|
-
const
|
|
228
|
-
if (
|
|
229
|
-
const
|
|
230
|
-
_(
|
|
231
|
-
},
|
|
232
|
-
const M = (/* @__PURE__ */ new Date()).getTime() -
|
|
233
|
-
|
|
226
|
+
const v = f.viewport;
|
|
227
|
+
if (v) {
|
|
228
|
+
const j = () => {
|
|
229
|
+
_(A.current), i == null || i();
|
|
230
|
+
}, k = () => {
|
|
231
|
+
const M = (/* @__PURE__ */ new Date()).getTime() - N.current;
|
|
232
|
+
A.current = A.current - M, window.clearTimeout(F.current), u == null || u();
|
|
234
233
|
};
|
|
235
|
-
return
|
|
236
|
-
|
|
234
|
+
return v.addEventListener(oe, k), v.addEventListener(ne, j), () => {
|
|
235
|
+
v.removeEventListener(oe, k), v.removeEventListener(ne, j);
|
|
237
236
|
};
|
|
238
237
|
}
|
|
239
|
-
}, [
|
|
240
|
-
c && !
|
|
241
|
-
}, [c,
|
|
242
|
-
const
|
|
243
|
-
return
|
|
244
|
-
|
|
245
|
-
|
|
238
|
+
}, [f.viewport, C, u, i, _]), n.useEffect(() => {
|
|
239
|
+
c && !f.isClosePausedRef.current && _(C);
|
|
240
|
+
}, [c, C, f.isClosePausedRef, _]), n.useEffect(() => (O(), () => Z()), [O, Z]);
|
|
241
|
+
const $ = n.useMemo(() => d ? He(d) : null, [d]);
|
|
242
|
+
return f.viewport ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
243
|
+
$ && /* @__PURE__ */ s.jsx(
|
|
244
|
+
Mt,
|
|
246
245
|
{
|
|
247
246
|
__scopeToast: t,
|
|
248
247
|
role: "status",
|
|
249
248
|
"aria-live": o === "foreground" ? "assertive" : "polite",
|
|
250
249
|
"aria-atomic": !0,
|
|
251
|
-
children:
|
|
250
|
+
children: $
|
|
252
251
|
}
|
|
253
252
|
),
|
|
254
|
-
/* @__PURE__ */ s.jsx(
|
|
253
|
+
/* @__PURE__ */ s.jsx(Lt, { scope: t, onClose: L, children: ht.createPortal(
|
|
255
254
|
/* @__PURE__ */ s.jsx(je.ItemSlot, { scope: t, children: /* @__PURE__ */ s.jsx(
|
|
256
|
-
|
|
255
|
+
rt,
|
|
257
256
|
{
|
|
258
257
|
asChild: !0,
|
|
259
|
-
onEscapeKeyDown: R(
|
|
260
|
-
|
|
258
|
+
onEscapeKeyDown: R(m, () => {
|
|
259
|
+
f.isFocusedToastEscapeKeyDownRef.current || L(), f.isFocusedToastEscapeKeyDownRef.current = !1;
|
|
261
260
|
}),
|
|
262
261
|
children: /* @__PURE__ */ s.jsx(
|
|
263
262
|
S.li,
|
|
@@ -267,39 +266,39 @@ var [Ft, Mt] = Ae(B, {
|
|
|
267
266
|
"aria-atomic": !0,
|
|
268
267
|
tabIndex: 0,
|
|
269
268
|
"data-state": c ? "open" : "closed",
|
|
270
|
-
"data-swipe-direction":
|
|
271
|
-
...
|
|
269
|
+
"data-swipe-direction": f.swipeDirection,
|
|
270
|
+
...y,
|
|
272
271
|
ref: h,
|
|
273
272
|
style: { userSelect: "none", touchAction: "none", ...e.style },
|
|
274
|
-
onKeyDown: R(e.onKeyDown, (
|
|
275
|
-
|
|
273
|
+
onKeyDown: R(e.onKeyDown, (v) => {
|
|
274
|
+
v.key === "Escape" && (m == null || m(v.nativeEvent), v.nativeEvent.defaultPrevented || (f.isFocusedToastEscapeKeyDownRef.current = !0, L()));
|
|
276
275
|
}),
|
|
277
|
-
onPointerDown: R(e.onPointerDown, (
|
|
278
|
-
|
|
276
|
+
onPointerDown: R(e.onPointerDown, (v) => {
|
|
277
|
+
v.button === 0 && (T.current = { x: v.clientX, y: v.clientY });
|
|
279
278
|
}),
|
|
280
|
-
onPointerMove: R(e.onPointerMove, (
|
|
281
|
-
if (!
|
|
282
|
-
const
|
|
283
|
-
M ? (E.current =
|
|
279
|
+
onPointerMove: R(e.onPointerMove, (v) => {
|
|
280
|
+
if (!T.current) return;
|
|
281
|
+
const j = v.clientX - T.current.x, k = v.clientY - T.current.y, M = !!E.current, V = ["left", "right"].includes(f.swipeDirection), K = ["left", "up"].includes(f.swipeDirection) ? Math.min : Math.max, Qe = V ? K(0, j) : 0, Ze = V ? 0 : K(0, k), ee = v.pointerType === "touch" ? 10 : 2, W = { x: Qe, y: Ze }, we = { originalEvent: v, delta: W };
|
|
282
|
+
M ? (E.current = W, z(_t, x, we, {
|
|
284
283
|
discrete: !1
|
|
285
|
-
})) :
|
|
284
|
+
})) : ge(W, f.swipeDirection, ee) ? (E.current = W, z(St, p, we, {
|
|
286
285
|
discrete: !1
|
|
287
|
-
}),
|
|
286
|
+
}), v.target.setPointerCapture(v.pointerId)) : (Math.abs(j) > ee || Math.abs(k) > ee) && (T.current = null);
|
|
288
287
|
}),
|
|
289
|
-
onPointerUp: R(e.onPointerUp, (
|
|
290
|
-
const
|
|
291
|
-
if (
|
|
292
|
-
const M =
|
|
293
|
-
|
|
288
|
+
onPointerUp: R(e.onPointerUp, (v) => {
|
|
289
|
+
const j = E.current, k = v.target;
|
|
290
|
+
if (k.hasPointerCapture(v.pointerId) && k.releasePointerCapture(v.pointerId), E.current = null, T.current = null, j) {
|
|
291
|
+
const M = v.currentTarget, V = { originalEvent: v, delta: j };
|
|
292
|
+
ge(j, f.swipeDirection, f.swipeThreshold) ? z(Ot, w, V, {
|
|
294
293
|
discrete: !0
|
|
295
|
-
}) :
|
|
296
|
-
|
|
297
|
-
|
|
294
|
+
}) : z(
|
|
295
|
+
Dt,
|
|
296
|
+
g,
|
|
298
297
|
V,
|
|
299
298
|
{
|
|
300
299
|
discrete: !0
|
|
301
300
|
}
|
|
302
|
-
), M.addEventListener("click", (
|
|
301
|
+
), M.addEventListener("click", (K) => K.preventDefault(), {
|
|
303
302
|
once: !0
|
|
304
303
|
});
|
|
305
304
|
}
|
|
@@ -308,47 +307,47 @@ var [Ft, Mt] = Ae(B, {
|
|
|
308
307
|
)
|
|
309
308
|
}
|
|
310
309
|
) }),
|
|
311
|
-
|
|
310
|
+
f.viewport
|
|
312
311
|
) })
|
|
313
312
|
] }) : null;
|
|
314
313
|
}
|
|
315
|
-
),
|
|
316
|
-
const { __scopeToast: r, children: t, ...o } = e, a = Y
|
|
317
|
-
return
|
|
318
|
-
const i = window.setTimeout(() =>
|
|
314
|
+
), Mt = (e) => {
|
|
315
|
+
const { __scopeToast: r, children: t, ...o } = e, a = X(Y, r), [c, l] = n.useState(!1), [m, u] = n.useState(!1);
|
|
316
|
+
return $t(() => l(!0)), n.useEffect(() => {
|
|
317
|
+
const i = window.setTimeout(() => u(!0), 1e3);
|
|
319
318
|
return () => window.clearTimeout(i);
|
|
320
|
-
}, []),
|
|
319
|
+
}, []), m ? null : /* @__PURE__ */ s.jsx(Re, { asChild: !0, children: /* @__PURE__ */ s.jsx(G, { ...o, children: c && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
|
|
321
320
|
a.label,
|
|
322
321
|
" ",
|
|
323
322
|
t
|
|
324
323
|
] }) }) });
|
|
325
|
-
},
|
|
324
|
+
}, Vt = "ToastTitle", Oe = n.forwardRef(
|
|
326
325
|
(e, r) => {
|
|
327
326
|
const { __scopeToast: t, ...o } = e;
|
|
328
327
|
return /* @__PURE__ */ s.jsx(S.div, { ...o, ref: r });
|
|
329
328
|
}
|
|
330
329
|
);
|
|
331
|
-
|
|
332
|
-
var
|
|
330
|
+
Oe.displayName = Vt;
|
|
331
|
+
var Ht = "ToastDescription", Le = n.forwardRef(
|
|
333
332
|
(e, r) => {
|
|
334
333
|
const { __scopeToast: t, ...o } = e;
|
|
335
334
|
return /* @__PURE__ */ s.jsx(S.div, { ...o, ref: r });
|
|
336
335
|
}
|
|
337
336
|
);
|
|
338
|
-
|
|
339
|
-
var
|
|
337
|
+
Le.displayName = Ht;
|
|
338
|
+
var Ie = "ToastAction", Fe = n.forwardRef(
|
|
340
339
|
(e, r) => {
|
|
341
340
|
const { altText: t, ...o } = e;
|
|
342
|
-
return t.trim() ? /* @__PURE__ */ s.jsx(
|
|
343
|
-
`Invalid prop \`altText\` supplied to \`${
|
|
341
|
+
return t.trim() ? /* @__PURE__ */ s.jsx(Ve, { altText: t, asChild: !0, children: /* @__PURE__ */ s.jsx(le, { ...o, ref: r }) }) : (console.error(
|
|
342
|
+
`Invalid prop \`altText\` supplied to \`${Ie}\`. Expected non-empty \`string\`.`
|
|
344
343
|
), null);
|
|
345
344
|
}
|
|
346
345
|
);
|
|
347
|
-
|
|
348
|
-
var
|
|
346
|
+
Fe.displayName = Ie;
|
|
347
|
+
var Me = "ToastClose", le = n.forwardRef(
|
|
349
348
|
(e, r) => {
|
|
350
|
-
const { __scopeToast: t, ...o } = e, a =
|
|
351
|
-
return /* @__PURE__ */ s.jsx(
|
|
349
|
+
const { __scopeToast: t, ...o } = e, a = It(Me, t);
|
|
350
|
+
return /* @__PURE__ */ s.jsx(Ve, { asChild: !0, children: /* @__PURE__ */ s.jsx(
|
|
352
351
|
S.button,
|
|
353
352
|
{
|
|
354
353
|
type: "button",
|
|
@@ -359,8 +358,8 @@ var Ve = "ToastClose", de = n.forwardRef(
|
|
|
359
358
|
) });
|
|
360
359
|
}
|
|
361
360
|
);
|
|
362
|
-
|
|
363
|
-
var
|
|
361
|
+
le.displayName = Me;
|
|
362
|
+
var Ve = n.forwardRef((e, r) => {
|
|
364
363
|
const { __scopeToast: t, altText: o, ...a } = e;
|
|
365
364
|
return /* @__PURE__ */ s.jsx(
|
|
366
365
|
S.div,
|
|
@@ -372,42 +371,42 @@ var He = n.forwardRef((e, r) => {
|
|
|
372
371
|
}
|
|
373
372
|
);
|
|
374
373
|
});
|
|
375
|
-
function
|
|
374
|
+
function He(e) {
|
|
376
375
|
const r = [];
|
|
377
376
|
return Array.from(e.childNodes).forEach((o) => {
|
|
378
|
-
if (o.nodeType === o.TEXT_NODE && o.textContent && r.push(o.textContent),
|
|
377
|
+
if (o.nodeType === o.TEXT_NODE && o.textContent && r.push(o.textContent), Kt(o)) {
|
|
379
378
|
const a = o.ariaHidden || o.hidden || o.style.display === "none", c = o.dataset.radixToastAnnounceExclude === "";
|
|
380
379
|
if (!a)
|
|
381
380
|
if (c) {
|
|
382
381
|
const l = o.dataset.radixToastAnnounceAlt;
|
|
383
382
|
l && r.push(l);
|
|
384
383
|
} else
|
|
385
|
-
r.push(
|
|
384
|
+
r.push(...He(o));
|
|
386
385
|
}
|
|
387
386
|
}), r;
|
|
388
387
|
}
|
|
389
|
-
function
|
|
388
|
+
function z(e, r, t, { discrete: o }) {
|
|
390
389
|
const a = t.originalEvent.currentTarget, c = new CustomEvent(e, { bubbles: !0, cancelable: !0, detail: t });
|
|
391
|
-
r && a.addEventListener(e, r, { once: !0 }), o ?
|
|
390
|
+
r && a.addEventListener(e, r, { once: !0 }), o ? ot(a, c) : a.dispatchEvent(c);
|
|
392
391
|
}
|
|
393
|
-
var
|
|
392
|
+
var ge = (e, r, t = 0) => {
|
|
394
393
|
const o = Math.abs(e.x), a = Math.abs(e.y), c = o > a;
|
|
395
394
|
return r === "left" || r === "right" ? c && o > t : !c && a > t;
|
|
396
395
|
};
|
|
397
|
-
function
|
|
396
|
+
function $t(e = () => {
|
|
398
397
|
}) {
|
|
399
|
-
const r =
|
|
400
|
-
|
|
398
|
+
const r = q(e);
|
|
399
|
+
nt(() => {
|
|
401
400
|
let t = 0, o = 0;
|
|
402
401
|
return t = window.requestAnimationFrame(() => o = window.requestAnimationFrame(r)), () => {
|
|
403
402
|
window.cancelAnimationFrame(t), window.cancelAnimationFrame(o);
|
|
404
403
|
};
|
|
405
404
|
}, [r]);
|
|
406
405
|
}
|
|
407
|
-
function
|
|
406
|
+
function Kt(e) {
|
|
408
407
|
return e.nodeType === e.ELEMENT_NODE;
|
|
409
408
|
}
|
|
410
|
-
function
|
|
409
|
+
function Wt(e) {
|
|
411
410
|
const r = [], t = document.createTreeWalker(e, NodeFilter.SHOW_ELEMENT, {
|
|
412
411
|
acceptNode: (o) => {
|
|
413
412
|
const a = o.tagName === "INPUT" && o.type === "hidden";
|
|
@@ -417,53 +416,53 @@ function qt(e) {
|
|
|
417
416
|
for (; t.nextNode(); ) r.push(t.currentNode);
|
|
418
417
|
return r;
|
|
419
418
|
}
|
|
420
|
-
function
|
|
419
|
+
function te(e) {
|
|
421
420
|
const r = document.activeElement;
|
|
422
421
|
return e.some((t) => t === r ? !0 : (t.focus(), document.activeElement !== r));
|
|
423
422
|
}
|
|
424
|
-
var Ke =
|
|
425
|
-
const ye = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e,
|
|
423
|
+
var $e = Se, Ke = De, We = Oe, ze = Le, qe = Fe, Ue = le;
|
|
424
|
+
const ye = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, be = wt, zt = (e, r) => (t) => {
|
|
426
425
|
var o;
|
|
427
|
-
if ((r == null ? void 0 : r.variants) == null) return
|
|
426
|
+
if ((r == null ? void 0 : r.variants) == null) return be(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
428
427
|
const { variants: a, defaultVariants: c } = r, l = Object.keys(a).map((i) => {
|
|
429
|
-
const
|
|
430
|
-
if (
|
|
431
|
-
const
|
|
432
|
-
return a[i][
|
|
433
|
-
}),
|
|
434
|
-
let [x,
|
|
435
|
-
return
|
|
436
|
-
}, {}),
|
|
437
|
-
let { class: x, className:
|
|
438
|
-
return Object.entries(w).every((
|
|
439
|
-
let [
|
|
440
|
-
return Array.isArray(
|
|
428
|
+
const p = t == null ? void 0 : t[i], x = c == null ? void 0 : c[i];
|
|
429
|
+
if (p === null) return null;
|
|
430
|
+
const g = ye(p) || ye(x);
|
|
431
|
+
return a[i][g];
|
|
432
|
+
}), m = t && Object.entries(t).reduce((i, p) => {
|
|
433
|
+
let [x, g] = p;
|
|
434
|
+
return g === void 0 || (i[x] = g), i;
|
|
435
|
+
}, {}), u = r == null || (o = r.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((i, p) => {
|
|
436
|
+
let { class: x, className: g, ...w } = p;
|
|
437
|
+
return Object.entries(w).every((y) => {
|
|
438
|
+
let [f, d] = y;
|
|
439
|
+
return Array.isArray(d) ? d.includes({
|
|
441
440
|
...c,
|
|
442
|
-
...
|
|
443
|
-
}[
|
|
441
|
+
...m
|
|
442
|
+
}[f]) : {
|
|
444
443
|
...c,
|
|
445
|
-
...
|
|
446
|
-
}[
|
|
444
|
+
...m
|
|
445
|
+
}[f] === d;
|
|
447
446
|
}) ? [
|
|
448
447
|
...i,
|
|
449
448
|
x,
|
|
450
|
-
|
|
449
|
+
g
|
|
451
450
|
] : i;
|
|
452
451
|
}, []);
|
|
453
|
-
return
|
|
454
|
-
},
|
|
455
|
-
|
|
452
|
+
return be(e, l, u, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
|
|
453
|
+
}, qt = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
|
|
454
|
+
$e,
|
|
456
455
|
{
|
|
457
456
|
ref: t,
|
|
458
|
-
className:
|
|
457
|
+
className: P(
|
|
459
458
|
"fixed top-0 z-[100] flex max-h-screen flex-col-reverse sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col min-w-64 max-w-[420px]",
|
|
460
459
|
e
|
|
461
460
|
),
|
|
462
461
|
...r
|
|
463
462
|
}
|
|
464
463
|
));
|
|
465
|
-
|
|
466
|
-
const
|
|
464
|
+
qt.displayName = $e.displayName;
|
|
465
|
+
const Ut = zt(
|
|
467
466
|
"group pointer-events-auto rounded-[10px] relative border-l-2 flex w-full items-center justify-between space-x-2 overflow-hidden py-3 px-5 transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full dark:border-neutral-800",
|
|
468
467
|
{
|
|
469
468
|
variants: {
|
|
@@ -479,60 +478,60 @@ const Xt = Ut(
|
|
|
479
478
|
variant: "default"
|
|
480
479
|
}
|
|
481
480
|
}
|
|
482
|
-
),
|
|
483
|
-
|
|
481
|
+
), Gt = n.forwardRef(({ className: e, variant: r, ...t }, o) => /* @__PURE__ */ s.jsx(
|
|
482
|
+
Ke,
|
|
484
483
|
{
|
|
485
484
|
ref: o,
|
|
486
|
-
className:
|
|
485
|
+
className: P(Ut({ variant: r }), e),
|
|
487
486
|
...t
|
|
488
487
|
}
|
|
489
488
|
));
|
|
490
|
-
|
|
491
|
-
const
|
|
492
|
-
|
|
489
|
+
Gt.displayName = Ke.displayName;
|
|
490
|
+
const Xt = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
|
|
491
|
+
qe,
|
|
493
492
|
{
|
|
494
493
|
ref: t,
|
|
495
|
-
className:
|
|
494
|
+
className: P(
|
|
496
495
|
"inline-flex h-8 shrink-0 items-center justify-center rounded-md border border-neutral-200 bg-transparent px-3 text-sm font-medium transition-colors hover:bg-neutral-100 focus:outline-none focus:ring-1 focus:ring-neutral-950 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-neutral-100/40 group-[.destructive]:hover:border-red-500/30 group-[.destructive]:hover:bg-red-500 group-[.destructive]:hover:text-neutral-50 group-[.destructive]:focus:ring-red-500 dark:border-neutral-800 dark:hover:bg-neutral-800 dark:focus:ring-neutral-300 dark:group-[.destructive]:border-neutral-800/40 dark:group-[.destructive]:hover:border-red-900/30 dark:group-[.destructive]:hover:bg-red-900 dark:group-[.destructive]:hover:text-neutral-50 dark:group-[.destructive]:focus:ring-red-900",
|
|
497
496
|
e
|
|
498
497
|
),
|
|
499
498
|
...r
|
|
500
499
|
}
|
|
501
500
|
));
|
|
502
|
-
|
|
503
|
-
const
|
|
504
|
-
|
|
501
|
+
Xt.displayName = qe.displayName;
|
|
502
|
+
const Yt = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
|
|
503
|
+
Ue,
|
|
505
504
|
{
|
|
506
505
|
ref: t,
|
|
507
|
-
className:
|
|
506
|
+
className: P(
|
|
508
507
|
"absolute right-3 top-2 rounded-md p-1 text-neutral-950/50 opacity-0 transition-opacity hover:text-neutral-950 focus:opacity-100 focus:outline-none focus:ring-1 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600 dark:text-neutral-50/50 dark:hover:text-neutral-50",
|
|
509
508
|
e
|
|
510
509
|
),
|
|
511
510
|
"toast-close": "",
|
|
512
511
|
...r,
|
|
513
|
-
children: /* @__PURE__ */ s.jsx(
|
|
512
|
+
children: /* @__PURE__ */ s.jsx(st, { className: "h-4 w-4" })
|
|
514
513
|
}
|
|
515
514
|
));
|
|
516
|
-
|
|
517
|
-
const
|
|
518
|
-
|
|
515
|
+
Yt.displayName = Ue.displayName;
|
|
516
|
+
const Ge = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
|
|
517
|
+
We,
|
|
519
518
|
{
|
|
520
519
|
ref: t,
|
|
521
|
-
className:
|
|
520
|
+
className: P("text-base font-semibold [&+div]:text-xs", e),
|
|
522
521
|
...r
|
|
523
522
|
}
|
|
524
523
|
));
|
|
525
|
-
|
|
526
|
-
const
|
|
527
|
-
|
|
524
|
+
Ge.displayName = We.displayName;
|
|
525
|
+
const Xe = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
|
|
526
|
+
ze,
|
|
528
527
|
{
|
|
529
528
|
ref: t,
|
|
530
|
-
className:
|
|
529
|
+
className: P("text-xs font-normal opacity-90", e),
|
|
531
530
|
...r
|
|
532
531
|
}
|
|
533
532
|
));
|
|
534
|
-
|
|
535
|
-
const
|
|
533
|
+
Xe.displayName = ze.displayName;
|
|
534
|
+
const kr = ({
|
|
536
535
|
type: e = "info",
|
|
537
536
|
title: r,
|
|
538
537
|
description: t,
|
|
@@ -540,34 +539,34 @@ const Dr = ({
|
|
|
540
539
|
}) => /* @__PURE__ */ s.jsxs(
|
|
541
540
|
"div",
|
|
542
541
|
{
|
|
543
|
-
className:
|
|
542
|
+
className: P(
|
|
544
543
|
o ? "items-start" : "justify-center",
|
|
545
544
|
"flex items-center gap-1.5"
|
|
546
545
|
),
|
|
547
546
|
children: [
|
|
548
|
-
o && /* @__PURE__ */ s.jsx("div", { "data-testid": "notification-icon", children: e &&
|
|
547
|
+
o && /* @__PURE__ */ s.jsx("div", { "data-testid": "notification-icon", children: e && Ct[e] }),
|
|
549
548
|
/* @__PURE__ */ s.jsxs("div", { className: "flex flex-col", children: [
|
|
550
|
-
/* @__PURE__ */ s.jsx(
|
|
551
|
-
/* @__PURE__ */ s.jsx(
|
|
549
|
+
/* @__PURE__ */ s.jsx(Ge, { className: o ? "text-left" : "text-center", children: r }),
|
|
550
|
+
/* @__PURE__ */ s.jsx(Xe, { className: o ? "text-left" : "text-center", children: t })
|
|
552
551
|
] })
|
|
553
552
|
]
|
|
554
553
|
}
|
|
555
|
-
), { Root:
|
|
554
|
+
), { Root: Bt, Thumb: Jt } = at, Sr = n.forwardRef(({ classNames: e, ...r }, t) => {
|
|
556
555
|
const o = r.checked ?? !1;
|
|
557
|
-
return /* @__PURE__ */ s.jsxs(
|
|
556
|
+
return /* @__PURE__ */ s.jsxs(Bt, { ref: t, className: P(D.base, e == null ? void 0 : e.root), ...r, children: [
|
|
558
557
|
/* @__PURE__ */ s.jsx(
|
|
559
558
|
"div",
|
|
560
559
|
{
|
|
561
|
-
className:
|
|
560
|
+
className: P(
|
|
562
561
|
D.iconWrapper.base,
|
|
563
562
|
"left-0",
|
|
564
563
|
!o && D.iconWrapper.checked
|
|
565
564
|
),
|
|
566
565
|
children: /* @__PURE__ */ s.jsx(
|
|
567
|
-
|
|
566
|
+
gt,
|
|
568
567
|
{
|
|
569
568
|
"data-testid": "list-icon",
|
|
570
|
-
className:
|
|
569
|
+
className: P(o ? "fill-dark-30/25" : "fill-dark-30/[.80]")
|
|
571
570
|
}
|
|
572
571
|
)
|
|
573
572
|
}
|
|
@@ -575,7 +574,7 @@ const Dr = ({
|
|
|
575
574
|
/* @__PURE__ */ s.jsx(
|
|
576
575
|
"div",
|
|
577
576
|
{
|
|
578
|
-
className:
|
|
577
|
+
className: P(
|
|
579
578
|
D.iconWrapper.base,
|
|
580
579
|
"right-0",
|
|
581
580
|
o && D.iconWrapper.checked
|
|
@@ -584,13 +583,13 @@ const Dr = ({
|
|
|
584
583
|
Tt,
|
|
585
584
|
{
|
|
586
585
|
"data-testid": "grid-icon",
|
|
587
|
-
className:
|
|
586
|
+
className: P(o ? "fill-dark-30/[.80]" : "fill-dark-30/25")
|
|
588
587
|
}
|
|
589
588
|
)
|
|
590
589
|
}
|
|
591
590
|
),
|
|
592
|
-
/* @__PURE__ */ s.jsx("div", { className:
|
|
593
|
-
/* @__PURE__ */ s.jsx(
|
|
591
|
+
/* @__PURE__ */ s.jsx("div", { className: P(D.borderLine) }),
|
|
592
|
+
/* @__PURE__ */ s.jsx(Jt, { tabIndex: 1, className: P(D.thumb, e == null ? void 0 : e.thumb) })
|
|
594
593
|
] });
|
|
595
594
|
}), D = {
|
|
596
595
|
base: "group relative inline-flex w-20 h-[38px] shrink-0 cursor-pointer items-center bg-gray-50 rounded-[10px] transition-colors duration-200 transition-colors",
|
|
@@ -600,123 +599,46 @@ const Dr = ({
|
|
|
600
599
|
checked: "bg-sidebar-10 rounded-[10px] overflow-hidden"
|
|
601
600
|
},
|
|
602
601
|
borderLine: "pointer-events-none absolute z-0 left-0 top-0 w-full h-full group-hover:border group-hover:border-primary-20/[.30] rounded-[10px] transition-colors duration-200"
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
small: {
|
|
606
|
-
base: "flex items-center justify-center min-w-32 bg-sidebar-10 text-xs font-medium leading-none border-[1px] rounded-md py-[7px] px-5",
|
|
607
|
-
default: "text-dark-30/25 border-dark-30/25",
|
|
608
|
-
active: "bg-gray-50 text-dark-30 border-dark-30/[.40]",
|
|
609
|
-
hover: "hover:text-dark-30/[.40] hover:border-dark-30/[.40]",
|
|
610
|
-
disabled: "bg-dark-30/[.08] text-dark-30/25 border-dark-30/25 cursor-not-allowed"
|
|
611
|
-
},
|
|
612
|
-
medium: {
|
|
613
|
-
base: "flex items-center gap-1 pl-4 pr-5 py-2.5 bg-gray-50 text-sm font-semibold leading-none rounded-[10px] border",
|
|
614
|
-
default: "border-gray-50 text-dark-30",
|
|
615
|
-
active: "bg-primary-10 border-primary-10 text-white",
|
|
616
|
-
hover: "hover:border-primary-10/[.30]",
|
|
617
|
-
disabled: "bg-dark-30/[.08] text-dark-30/25 cursor-not-allowed"
|
|
618
|
-
},
|
|
619
|
-
large: {
|
|
620
|
-
base: "flex items-center bg-gray-50 px-8 py-3.5 text-sm font-regular leading-none border rounded-[10px] focus:outline-none focus:ring focus:ring-transparent",
|
|
621
|
-
default: "text-dark-40/50 border-dark-30/[.15]",
|
|
622
|
-
active: "bg-primary-10/[.10] text-dark-30 font-semibold border border-primary-10/[.20]",
|
|
623
|
-
hover: "hover:border-primary-20/[.20]",
|
|
624
|
-
disabled: "bg-dark-30/[.08] text-dark-30/25 border-dark-30/25 cursor-not-allowed"
|
|
625
|
-
}
|
|
626
|
-
},
|
|
627
|
-
focus: "focus:outline-none focus:ring focus:ring-primary-10/[.20]",
|
|
628
|
-
icon: {
|
|
629
|
-
default: "fill-dark-30",
|
|
630
|
-
active: "fill-white",
|
|
631
|
-
disabled: "fill-dark-30/25"
|
|
632
|
-
}
|
|
633
|
-
}, Lr = wt(
|
|
634
|
-
({
|
|
635
|
-
variant: e = "small",
|
|
636
|
-
active: r,
|
|
637
|
-
icon: t,
|
|
638
|
-
disabled: o,
|
|
639
|
-
children: a,
|
|
640
|
-
className: c,
|
|
641
|
-
iconDimensions: l,
|
|
642
|
-
...v
|
|
643
|
-
}, d) => {
|
|
644
|
-
const i = H.sizes[e];
|
|
645
|
-
return /* @__PURE__ */ s.jsxs(
|
|
646
|
-
"button",
|
|
647
|
-
{
|
|
648
|
-
role: "tab",
|
|
649
|
-
"aria-selected": r,
|
|
650
|
-
ref: d,
|
|
651
|
-
className: C(
|
|
652
|
-
i.base,
|
|
653
|
-
i.default,
|
|
654
|
-
!o && !r && i.hover,
|
|
655
|
-
r && !o && i.active,
|
|
656
|
-
r && !o && H.focus,
|
|
657
|
-
o && i.disabled,
|
|
658
|
-
c
|
|
659
|
-
),
|
|
660
|
-
...v,
|
|
661
|
-
children: [
|
|
662
|
-
!!t && /* @__PURE__ */ s.jsx(
|
|
663
|
-
t,
|
|
664
|
-
{
|
|
665
|
-
"aria-label": "icon",
|
|
666
|
-
"aria-hidden": !0,
|
|
667
|
-
className: C(
|
|
668
|
-
H.icon.default,
|
|
669
|
-
r && H.icon.active,
|
|
670
|
-
o && H.icon.disabled
|
|
671
|
-
),
|
|
672
|
-
...l
|
|
673
|
-
}
|
|
674
|
-
),
|
|
675
|
-
a
|
|
676
|
-
]
|
|
677
|
-
}
|
|
678
|
-
);
|
|
679
|
-
}
|
|
680
|
-
);
|
|
681
|
-
var [J, er] = Pe("Tooltip", [
|
|
602
|
+
};
|
|
603
|
+
var [B, Qt] = Ce("Tooltip", [
|
|
682
604
|
Ne
|
|
683
|
-
]),
|
|
605
|
+
]), J = Ne(), Ye = "TooltipProvider", Zt = 700, ae = "tooltip.open", [er, de] = B(Ye), ue = (e) => {
|
|
684
606
|
const {
|
|
685
607
|
__scopeTooltip: r,
|
|
686
|
-
delayDuration: t =
|
|
608
|
+
delayDuration: t = Zt,
|
|
687
609
|
skipDelayDuration: o = 300,
|
|
688
610
|
disableHoverableContent: a = !1,
|
|
689
611
|
children: c
|
|
690
|
-
} = e, [l,
|
|
612
|
+
} = e, [l, m] = n.useState(!0), u = n.useRef(!1), i = n.useRef(0);
|
|
691
613
|
return n.useEffect(() => {
|
|
692
|
-
const
|
|
693
|
-
return () => window.clearTimeout(
|
|
614
|
+
const p = i.current;
|
|
615
|
+
return () => window.clearTimeout(p);
|
|
694
616
|
}, []), /* @__PURE__ */ s.jsx(
|
|
695
|
-
|
|
617
|
+
er,
|
|
696
618
|
{
|
|
697
619
|
scope: r,
|
|
698
620
|
isOpenDelayed: l,
|
|
699
621
|
delayDuration: t,
|
|
700
622
|
onOpen: n.useCallback(() => {
|
|
701
|
-
window.clearTimeout(i.current),
|
|
623
|
+
window.clearTimeout(i.current), m(!1);
|
|
702
624
|
}, []),
|
|
703
625
|
onClose: n.useCallback(() => {
|
|
704
626
|
window.clearTimeout(i.current), i.current = window.setTimeout(
|
|
705
|
-
() =>
|
|
627
|
+
() => m(!0),
|
|
706
628
|
o
|
|
707
629
|
);
|
|
708
630
|
}, [o]),
|
|
709
|
-
isPointerInTransitRef:
|
|
710
|
-
onPointerInTransitChange: n.useCallback((
|
|
711
|
-
|
|
631
|
+
isPointerInTransitRef: u,
|
|
632
|
+
onPointerInTransitChange: n.useCallback((p) => {
|
|
633
|
+
u.current = p;
|
|
712
634
|
}, []),
|
|
713
635
|
disableHoverableContent: a,
|
|
714
636
|
children: c
|
|
715
637
|
}
|
|
716
638
|
);
|
|
717
639
|
};
|
|
718
|
-
|
|
719
|
-
var
|
|
640
|
+
ue.displayName = Ye;
|
|
641
|
+
var Q = "Tooltip", [tr, H] = B(Q), pe = (e) => {
|
|
720
642
|
const {
|
|
721
643
|
__scopeTooltip: r,
|
|
722
644
|
children: t,
|
|
@@ -724,62 +646,62 @@ var Z = "Tooltip", [or, $] = J(Z), pe = (e) => {
|
|
|
724
646
|
defaultOpen: a = !1,
|
|
725
647
|
onOpenChange: c,
|
|
726
648
|
disableHoverableContent: l,
|
|
727
|
-
delayDuration:
|
|
728
|
-
} = e,
|
|
649
|
+
delayDuration: m
|
|
650
|
+
} = e, u = de(Q, e.__scopeTooltip), i = J(r), [p, x] = n.useState(null), g = ct(), w = n.useRef(0), y = l ?? u.disableHoverableContent, f = m ?? u.delayDuration, d = n.useRef(!1), [b = !1, h] = Pe({
|
|
729
651
|
prop: o,
|
|
730
652
|
defaultProp: a,
|
|
731
|
-
onChange: (
|
|
732
|
-
|
|
653
|
+
onChange: (A) => {
|
|
654
|
+
A ? (u.onOpen(), document.dispatchEvent(new CustomEvent(ae))) : u.onClose(), c == null || c(A);
|
|
733
655
|
}
|
|
734
|
-
}),
|
|
735
|
-
window.clearTimeout(w.current), w.current = 0,
|
|
736
|
-
}, [h]),
|
|
656
|
+
}), T = n.useMemo(() => b ? d.current ? "delayed-open" : "instant-open" : "closed", [b]), E = n.useCallback(() => {
|
|
657
|
+
window.clearTimeout(w.current), w.current = 0, d.current = !1, h(!0);
|
|
658
|
+
}, [h]), C = n.useCallback(() => {
|
|
737
659
|
window.clearTimeout(w.current), w.current = 0, h(!1);
|
|
738
|
-
}, [h]),
|
|
660
|
+
}, [h]), N = n.useCallback(() => {
|
|
739
661
|
window.clearTimeout(w.current), w.current = window.setTimeout(() => {
|
|
740
|
-
|
|
741
|
-
},
|
|
742
|
-
}, [
|
|
662
|
+
d.current = !0, h(!0), w.current = 0;
|
|
663
|
+
}, f);
|
|
664
|
+
}, [f, h]);
|
|
743
665
|
return n.useEffect(() => () => {
|
|
744
666
|
w.current && (window.clearTimeout(w.current), w.current = 0);
|
|
745
|
-
}, []), /* @__PURE__ */ s.jsx(
|
|
746
|
-
|
|
667
|
+
}, []), /* @__PURE__ */ s.jsx(lt, { ...i, children: /* @__PURE__ */ s.jsx(
|
|
668
|
+
tr,
|
|
747
669
|
{
|
|
748
670
|
scope: r,
|
|
749
|
-
contentId:
|
|
750
|
-
open:
|
|
751
|
-
stateAttribute:
|
|
752
|
-
trigger:
|
|
671
|
+
contentId: g,
|
|
672
|
+
open: b,
|
|
673
|
+
stateAttribute: T,
|
|
674
|
+
trigger: p,
|
|
753
675
|
onTriggerChange: x,
|
|
754
676
|
onTriggerEnter: n.useCallback(() => {
|
|
755
|
-
|
|
756
|
-
}, [
|
|
677
|
+
u.isOpenDelayed ? N() : E();
|
|
678
|
+
}, [u.isOpenDelayed, N, E]),
|
|
757
679
|
onTriggerLeave: n.useCallback(() => {
|
|
758
|
-
|
|
759
|
-
}, [
|
|
680
|
+
y ? C() : (window.clearTimeout(w.current), w.current = 0);
|
|
681
|
+
}, [C, y]),
|
|
760
682
|
onOpen: E,
|
|
761
|
-
onClose:
|
|
762
|
-
disableHoverableContent:
|
|
683
|
+
onClose: C,
|
|
684
|
+
disableHoverableContent: y,
|
|
763
685
|
children: t
|
|
764
686
|
}
|
|
765
687
|
) });
|
|
766
688
|
};
|
|
767
|
-
pe.displayName =
|
|
768
|
-
var
|
|
689
|
+
pe.displayName = Q;
|
|
690
|
+
var ie = "TooltipTrigger", fe = n.forwardRef(
|
|
769
691
|
(e, r) => {
|
|
770
|
-
const { __scopeTooltip: t, ...o } = e, a =
|
|
771
|
-
return n.useEffect(() => () => document.removeEventListener("pointerup", x), [x]), /* @__PURE__ */ s.jsx(
|
|
692
|
+
const { __scopeTooltip: t, ...o } = e, a = H(ie, t), c = de(ie, t), l = J(t), m = n.useRef(null), u = U(r, m, a.onTriggerChange), i = n.useRef(!1), p = n.useRef(!1), x = n.useCallback(() => i.current = !1, []);
|
|
693
|
+
return n.useEffect(() => () => document.removeEventListener("pointerup", x), [x]), /* @__PURE__ */ s.jsx(dt, { asChild: !0, ...l, children: /* @__PURE__ */ s.jsx(
|
|
772
694
|
S.button,
|
|
773
695
|
{
|
|
774
696
|
"aria-describedby": a.open ? a.contentId : void 0,
|
|
775
697
|
"data-state": a.stateAttribute,
|
|
776
698
|
...o,
|
|
777
|
-
ref:
|
|
778
|
-
onPointerMove: R(e.onPointerMove, (
|
|
779
|
-
|
|
699
|
+
ref: u,
|
|
700
|
+
onPointerMove: R(e.onPointerMove, (g) => {
|
|
701
|
+
g.pointerType !== "touch" && !p.current && !c.isPointerInTransitRef.current && (a.onTriggerEnter(), p.current = !0);
|
|
780
702
|
}),
|
|
781
703
|
onPointerLeave: R(e.onPointerLeave, () => {
|
|
782
|
-
a.onTriggerLeave(),
|
|
704
|
+
a.onTriggerLeave(), p.current = !1;
|
|
783
705
|
}),
|
|
784
706
|
onPointerDown: R(e.onPointerDown, () => {
|
|
785
707
|
i.current = !0, document.addEventListener("pointerup", x, { once: !0 });
|
|
@@ -793,46 +715,46 @@ var ce = "TooltipTrigger", ve = n.forwardRef(
|
|
|
793
715
|
) });
|
|
794
716
|
}
|
|
795
717
|
);
|
|
796
|
-
|
|
797
|
-
var
|
|
718
|
+
fe.displayName = ie;
|
|
719
|
+
var ve = "TooltipPortal", [rr, or] = B(ve, {
|
|
798
720
|
forceMount: void 0
|
|
799
|
-
}),
|
|
800
|
-
const { __scopeTooltip: r, forceMount: t, children: o, container: a } = e, c =
|
|
801
|
-
return /* @__PURE__ */ s.jsx(
|
|
721
|
+
}), me = (e) => {
|
|
722
|
+
const { __scopeTooltip: r, forceMount: t, children: o, container: a } = e, c = H(ve, r);
|
|
723
|
+
return /* @__PURE__ */ s.jsx(rr, { scope: r, forceMount: t, children: /* @__PURE__ */ s.jsx(ce, { present: t || c.open, children: /* @__PURE__ */ s.jsx(Re, { asChild: !0, container: a, children: o }) }) });
|
|
802
724
|
};
|
|
803
|
-
|
|
804
|
-
var I = "TooltipContent",
|
|
725
|
+
me.displayName = ve;
|
|
726
|
+
var I = "TooltipContent", xe = n.forwardRef(
|
|
805
727
|
(e, r) => {
|
|
806
|
-
const t =
|
|
807
|
-
return /* @__PURE__ */ s.jsx(
|
|
728
|
+
const t = or(I, e.__scopeTooltip), { forceMount: o = t.forceMount, side: a = "top", ...c } = e, l = H(I, e.__scopeTooltip);
|
|
729
|
+
return /* @__PURE__ */ s.jsx(ce, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ s.jsx(Be, { side: a, ...c, ref: r }) : /* @__PURE__ */ s.jsx(nr, { side: a, ...c, ref: r }) });
|
|
808
730
|
}
|
|
809
|
-
),
|
|
810
|
-
const t =
|
|
811
|
-
|
|
731
|
+
), nr = n.forwardRef((e, r) => {
|
|
732
|
+
const t = H(I, e.__scopeTooltip), o = de(I, e.__scopeTooltip), a = n.useRef(null), c = U(r, a), [l, m] = n.useState(null), { trigger: u, onClose: i } = t, p = a.current, { onPointerInTransitChange: x } = o, g = n.useCallback(() => {
|
|
733
|
+
m(null), x(!1);
|
|
812
734
|
}, [x]), w = n.useCallback(
|
|
813
|
-
(
|
|
814
|
-
const
|
|
815
|
-
|
|
735
|
+
(y, f) => {
|
|
736
|
+
const d = y.currentTarget, b = { x: y.clientX, y: y.clientY }, h = ir(b, d.getBoundingClientRect()), T = cr(b, h), E = lr(f.getBoundingClientRect()), C = ur([...T, ...E]);
|
|
737
|
+
m(C), x(!0);
|
|
816
738
|
},
|
|
817
739
|
[x]
|
|
818
740
|
);
|
|
819
|
-
return n.useEffect(() => () =>
|
|
820
|
-
if (
|
|
821
|
-
const
|
|
822
|
-
return
|
|
823
|
-
|
|
741
|
+
return n.useEffect(() => () => g(), [g]), n.useEffect(() => {
|
|
742
|
+
if (u && p) {
|
|
743
|
+
const y = (d) => w(d, p), f = (d) => w(d, u);
|
|
744
|
+
return u.addEventListener("pointerleave", y), p.addEventListener("pointerleave", f), () => {
|
|
745
|
+
u.removeEventListener("pointerleave", y), p.removeEventListener("pointerleave", f);
|
|
824
746
|
};
|
|
825
747
|
}
|
|
826
|
-
}, [
|
|
748
|
+
}, [u, p, w, g]), n.useEffect(() => {
|
|
827
749
|
if (l) {
|
|
828
|
-
const
|
|
829
|
-
const
|
|
830
|
-
h ?
|
|
750
|
+
const y = (f) => {
|
|
751
|
+
const d = f.target, b = { x: f.clientX, y: f.clientY }, h = (u == null ? void 0 : u.contains(d)) || (p == null ? void 0 : p.contains(d)), T = !dr(b, l);
|
|
752
|
+
h ? g() : T && (g(), i());
|
|
831
753
|
};
|
|
832
|
-
return document.addEventListener("pointermove",
|
|
754
|
+
return document.addEventListener("pointermove", y), () => document.removeEventListener("pointermove", y);
|
|
833
755
|
}
|
|
834
|
-
}, [
|
|
835
|
-
}), [
|
|
756
|
+
}, [u, p, l, i, g]), /* @__PURE__ */ s.jsx(Be, { ...e, ref: c });
|
|
757
|
+
}), [sr, ar] = B(Q, { isInside: !1 }), Be = n.forwardRef(
|
|
836
758
|
(e, r) => {
|
|
837
759
|
const {
|
|
838
760
|
__scopeTooltip: t,
|
|
@@ -840,34 +762,34 @@ var I = "TooltipContent", he = n.forwardRef(
|
|
|
840
762
|
"aria-label": a,
|
|
841
763
|
onEscapeKeyDown: c,
|
|
842
764
|
onPointerDownOutside: l,
|
|
843
|
-
...
|
|
844
|
-
} = e,
|
|
845
|
-
return n.useEffect(() => (document.addEventListener(
|
|
846
|
-
if (
|
|
847
|
-
const x = (
|
|
848
|
-
const w =
|
|
849
|
-
w != null && w.contains(
|
|
765
|
+
...m
|
|
766
|
+
} = e, u = H(I, t), i = J(t), { onClose: p } = u;
|
|
767
|
+
return n.useEffect(() => (document.addEventListener(ae, p), () => document.removeEventListener(ae, p)), [p]), n.useEffect(() => {
|
|
768
|
+
if (u.trigger) {
|
|
769
|
+
const x = (g) => {
|
|
770
|
+
const w = g.target;
|
|
771
|
+
w != null && w.contains(u.trigger) && p();
|
|
850
772
|
};
|
|
851
773
|
return window.addEventListener("scroll", x, { capture: !0 }), () => window.removeEventListener("scroll", x, { capture: !0 });
|
|
852
774
|
}
|
|
853
|
-
}, [
|
|
854
|
-
|
|
775
|
+
}, [u.trigger, p]), /* @__PURE__ */ s.jsx(
|
|
776
|
+
ut,
|
|
855
777
|
{
|
|
856
778
|
asChild: !0,
|
|
857
779
|
disableOutsidePointerEvents: !1,
|
|
858
780
|
onEscapeKeyDown: c,
|
|
859
781
|
onPointerDownOutside: l,
|
|
860
782
|
onFocusOutside: (x) => x.preventDefault(),
|
|
861
|
-
onDismiss:
|
|
783
|
+
onDismiss: p,
|
|
862
784
|
children: /* @__PURE__ */ s.jsxs(
|
|
863
785
|
pt,
|
|
864
786
|
{
|
|
865
|
-
"data-state":
|
|
787
|
+
"data-state": u.stateAttribute,
|
|
866
788
|
...i,
|
|
867
|
-
...
|
|
789
|
+
...m,
|
|
868
790
|
ref: r,
|
|
869
791
|
style: {
|
|
870
|
-
...
|
|
792
|
+
...m.style,
|
|
871
793
|
"--radix-tooltip-content-transform-origin": "var(--radix-popper-transform-origin)",
|
|
872
794
|
"--radix-tooltip-content-available-width": "var(--radix-popper-available-width)",
|
|
873
795
|
"--radix-tooltip-content-available-height": "var(--radix-popper-available-height)",
|
|
@@ -875,8 +797,8 @@ var I = "TooltipContent", he = n.forwardRef(
|
|
|
875
797
|
"--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
|
|
876
798
|
},
|
|
877
799
|
children: [
|
|
878
|
-
/* @__PURE__ */ s.jsx(
|
|
879
|
-
/* @__PURE__ */ s.jsx(
|
|
800
|
+
/* @__PURE__ */ s.jsx(ft, { children: o }),
|
|
801
|
+
/* @__PURE__ */ s.jsx(sr, { scope: t, isInside: !0, children: /* @__PURE__ */ s.jsx(Rt, { id: u.contentId, role: "tooltip", children: a || o }) })
|
|
880
802
|
]
|
|
881
803
|
}
|
|
882
804
|
)
|
|
@@ -884,18 +806,18 @@ var I = "TooltipContent", he = n.forwardRef(
|
|
|
884
806
|
);
|
|
885
807
|
}
|
|
886
808
|
);
|
|
887
|
-
|
|
888
|
-
var
|
|
809
|
+
xe.displayName = I;
|
|
810
|
+
var Je = "TooltipArrow", he = n.forwardRef(
|
|
889
811
|
(e, r) => {
|
|
890
|
-
const { __scopeTooltip: t, ...o } = e, a =
|
|
891
|
-
return
|
|
892
|
-
|
|
812
|
+
const { __scopeTooltip: t, ...o } = e, a = J(t);
|
|
813
|
+
return ar(
|
|
814
|
+
Je,
|
|
893
815
|
t
|
|
894
|
-
).isInside ? null : /* @__PURE__ */ s.jsx(
|
|
816
|
+
).isInside ? null : /* @__PURE__ */ s.jsx(it, { ...a, ...o, ref: r });
|
|
895
817
|
}
|
|
896
818
|
);
|
|
897
|
-
|
|
898
|
-
function
|
|
819
|
+
he.displayName = Je;
|
|
820
|
+
function ir(e, r) {
|
|
899
821
|
const t = Math.abs(r.top - e.y), o = Math.abs(r.bottom - e.y), a = Math.abs(r.right - e.x), c = Math.abs(r.left - e.x);
|
|
900
822
|
switch (Math.min(t, o, a, c)) {
|
|
901
823
|
case c:
|
|
@@ -910,7 +832,7 @@ function lr(e, r) {
|
|
|
910
832
|
throw new Error("unreachable");
|
|
911
833
|
}
|
|
912
834
|
}
|
|
913
|
-
function
|
|
835
|
+
function cr(e, r, t = 5) {
|
|
914
836
|
const o = [];
|
|
915
837
|
switch (r) {
|
|
916
838
|
case "top":
|
|
@@ -940,7 +862,7 @@ function dr(e, r, t = 5) {
|
|
|
940
862
|
}
|
|
941
863
|
return o;
|
|
942
864
|
}
|
|
943
|
-
function
|
|
865
|
+
function lr(e) {
|
|
944
866
|
const { top: r, right: t, bottom: o, left: a } = e;
|
|
945
867
|
return [
|
|
946
868
|
{ x: a, y: r },
|
|
@@ -949,20 +871,20 @@ function ur(e) {
|
|
|
949
871
|
{ x: a, y: o }
|
|
950
872
|
];
|
|
951
873
|
}
|
|
952
|
-
function
|
|
874
|
+
function dr(e, r) {
|
|
953
875
|
const { x: t, y: o } = e;
|
|
954
876
|
let a = !1;
|
|
955
877
|
for (let c = 0, l = r.length - 1; c < r.length; l = c++) {
|
|
956
|
-
const
|
|
957
|
-
|
|
878
|
+
const m = r[c].x, u = r[c].y, i = r[l].x, p = r[l].y;
|
|
879
|
+
u > o != p > o && t < (i - m) * (o - u) / (p - u) + m && (a = !a);
|
|
958
880
|
}
|
|
959
881
|
return a;
|
|
960
882
|
}
|
|
961
|
-
function
|
|
883
|
+
function ur(e) {
|
|
962
884
|
const r = e.slice();
|
|
963
|
-
return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0),
|
|
885
|
+
return r.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), pr(r);
|
|
964
886
|
}
|
|
965
|
-
function
|
|
887
|
+
function pr(e) {
|
|
966
888
|
if (e.length <= 1) return e.slice();
|
|
967
889
|
const r = [];
|
|
968
890
|
for (let o = 0; o < e.length; o++) {
|
|
@@ -987,45 +909,46 @@ function vr(e) {
|
|
|
987
909
|
}
|
|
988
910
|
return t.pop(), r.length === 1 && t.length === 1 && r[0].x === t[0].x && r[0].y === t[0].y ? r : r.concat(t);
|
|
989
911
|
}
|
|
990
|
-
var
|
|
912
|
+
var fr = ue, vr = pe, mr = fe, xr = me, hr = xe, wr = he;
|
|
991
913
|
const Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
992
914
|
__proto__: null,
|
|
993
|
-
Arrow:
|
|
994
|
-
Content:
|
|
995
|
-
Portal:
|
|
996
|
-
Provider:
|
|
997
|
-
Root:
|
|
915
|
+
Arrow: wr,
|
|
916
|
+
Content: hr,
|
|
917
|
+
Portal: xr,
|
|
918
|
+
Provider: fr,
|
|
919
|
+
Root: vr,
|
|
998
920
|
Tooltip: pe,
|
|
999
|
-
TooltipArrow:
|
|
1000
|
-
TooltipContent:
|
|
1001
|
-
TooltipPortal:
|
|
1002
|
-
TooltipProvider:
|
|
1003
|
-
TooltipTrigger:
|
|
1004
|
-
Trigger:
|
|
1005
|
-
createTooltipScope:
|
|
1006
|
-
}, Symbol.toStringTag, { value: "Module" })), { Provider:
|
|
921
|
+
TooltipArrow: he,
|
|
922
|
+
TooltipContent: xe,
|
|
923
|
+
TooltipPortal: me,
|
|
924
|
+
TooltipProvider: ue,
|
|
925
|
+
TooltipTrigger: fe,
|
|
926
|
+
Trigger: mr,
|
|
927
|
+
createTooltipScope: Qt
|
|
928
|
+
}, Symbol.toStringTag, { value: "Module" })), { Provider: gr, Root: yr, Trigger: br, Portal: Er, Content: Cr, Arrow: Pr } = Tr, _r = ({
|
|
1007
929
|
children: e,
|
|
1008
930
|
className: r,
|
|
1009
931
|
defaultOpen: t,
|
|
1010
932
|
side: o,
|
|
1011
933
|
content: a,
|
|
1012
|
-
delayDuration: c = 0
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
/* @__PURE__ */ s.jsx(
|
|
1016
|
-
|
|
934
|
+
delayDuration: c = 0,
|
|
935
|
+
isDisabled: l = !1
|
|
936
|
+
}) => /* @__PURE__ */ s.jsx(gr, { children: /* @__PURE__ */ s.jsxs(yr, { defaultOpen: t, delayDuration: c, children: [
|
|
937
|
+
/* @__PURE__ */ s.jsx(br, { asChild: !0, children: /* @__PURE__ */ s.jsx("div", { children: e }) }),
|
|
938
|
+
!l && /* @__PURE__ */ s.jsx(Er, { children: /* @__PURE__ */ s.jsxs(
|
|
939
|
+
Cr,
|
|
1017
940
|
{
|
|
1018
941
|
side: o,
|
|
1019
942
|
sideOffset: 5,
|
|
1020
|
-
className:
|
|
943
|
+
className: P(Ee.content, r),
|
|
1021
944
|
children: [
|
|
1022
945
|
a,
|
|
1023
|
-
/* @__PURE__ */ s.jsx(
|
|
946
|
+
/* @__PURE__ */ s.jsx(Pr, { className: Ee.arrow })
|
|
1024
947
|
]
|
|
1025
948
|
}
|
|
1026
949
|
) })
|
|
1027
|
-
] }) }),
|
|
1028
|
-
content:
|
|
950
|
+
] }) }), Ee = {
|
|
951
|
+
content: P(
|
|
1029
952
|
"font-mono select-none w-auto h-auto max-size-32 rounded-[5px] bg-dark-30 px-4 py-2 text-[10px] text-start leading-none text-sidebar-10 z-50",
|
|
1030
953
|
"animate-tooltipFade data-[state=delayed-open]:data-[side=bottom]:animate-slideUpAndFade",
|
|
1031
954
|
"data-[state=delayed-open]:data-[side=left]:animate-slideRightAndFade",
|
|
@@ -1033,43 +956,41 @@ const Tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1033
956
|
"data-[state=delayed-open]:data-[side=top]:animate-slideDownAndFade"
|
|
1034
957
|
),
|
|
1035
958
|
arrow: "fill-dark-30"
|
|
1036
|
-
},
|
|
959
|
+
}, Dr = ({
|
|
1037
960
|
value: e,
|
|
1038
961
|
onValueChange: r,
|
|
1039
962
|
classNames: t = {},
|
|
1040
963
|
count: o = 3,
|
|
1041
964
|
...a
|
|
1042
|
-
}) => /* @__PURE__ */ s.jsx(
|
|
1043
|
-
|
|
965
|
+
}) => /* @__PURE__ */ s.jsx(vt, { value: e, onValueChange: r, children: /* @__PURE__ */ s.jsx(
|
|
966
|
+
mt,
|
|
1044
967
|
{
|
|
1045
|
-
className:
|
|
968
|
+
className: P(re.container, t.container),
|
|
1046
969
|
...a,
|
|
1047
970
|
children: Array.from({ length: o }).map((c, l) => /* @__PURE__ */ s.jsx(
|
|
1048
|
-
|
|
971
|
+
xt,
|
|
1049
972
|
{
|
|
1050
973
|
value: String(l),
|
|
1051
|
-
className:
|
|
1052
|
-
|
|
1053
|
-
l <= Number(e) &&
|
|
974
|
+
className: P(
|
|
975
|
+
re.dot,
|
|
976
|
+
l <= Number(e) && re.dotActive,
|
|
1054
977
|
t.trigger
|
|
1055
978
|
)
|
|
1056
979
|
},
|
|
1057
980
|
l
|
|
1058
981
|
))
|
|
1059
982
|
}
|
|
1060
|
-
) }),
|
|
983
|
+
) }), re = {
|
|
1061
984
|
container: "flex items-center gap-1",
|
|
1062
985
|
dot: "size-2 rounded-full bg-dark-30/[.20] transition-colors focus:outline-none focus:ring-offset-0 focus:ring-primary-10",
|
|
1063
986
|
dotActive: "bg-primary-10"
|
|
1064
987
|
};
|
|
1065
988
|
export {
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
Fr as c,
|
|
1072
|
-
oe as d,
|
|
989
|
+
kr as N,
|
|
990
|
+
Sr as S,
|
|
991
|
+
_r as T,
|
|
992
|
+
Dr as a,
|
|
993
|
+
re as b,
|
|
1073
994
|
D as s,
|
|
1074
|
-
|
|
995
|
+
Ee as t
|
|
1075
996
|
};
|