@namuna-nur/ui-kit 1.1.2 → 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.
@@ -1,16 +1,15 @@
1
- import { n as s, P as S, o as tt, p as Pe, u as G, q as rt, v as Re, w as le, x as R, y as U, z as ot, D as ke, E as nt, F as st, G as at, J as it, K as Ne, N as ct, O as lt, Q as dt, U as ut, V as ft, W as pt, X as vt, Y as mt, Z as xt, _ as ht } from "./Avatar.tokens.js";
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 { forwardRef as wt } from "react";
4
- import * as gt from "react-dom";
5
- import { b as bt, a as C } from "./twMerge.js";
6
- 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" })), yt = (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" })), be = (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" })), Et = (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" })), Ct = (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" })), Pt = (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" })), Rt = {
7
- success: /* @__PURE__ */ s.jsx(be, { className: "text-success-10 fill-success-10" }),
8
- danger: /* @__PURE__ */ s.jsx(Et, { className: "text-danger-10 fill-danger-10" }),
9
- info: /* @__PURE__ */ s.jsx(Ct, { className: "text-info-10 fill-info-10" }),
10
- warning: /* @__PURE__ */ s.jsx(Pt, { className: "text-sidebar-20 fill-sidebar-20" }),
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 kt = "VisuallyHidden", X = n.forwardRef(
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
- X.displayName = kt;
37
- var Nt = X, jt = "ToastProvider", [je, At, St] = tt("Toast"), [Ae, Sr] = Pe("Toast", [St]), [_r, Y] = Ae(jt), Se = "ToastViewport", _t = ["F8"], ne = "toast.viewportPause", se = "toast.viewportResume", _e = n.forwardRef(
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 = _t,
40
+ hotkey: o = kt,
42
41
  label: a = "Notifications ({hotkey})",
43
42
  ...c
44
- } = e, l = Y(Se, t), v = At(t), d = n.useRef(null), i = n.useRef(null), f = n.useRef(null), x = n.useRef(null), b = G(r, x, l.onViewportChange), w = o.join("+").replace(/Key/g, "").replace(/Digit/g, ""), T = l.toastCount > 0;
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 u = (y) => {
47
- var g;
48
- o.length !== 0 && o.every((E) => y[E] || y.code === E) && ((g = x.current) == null || g.focus());
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", u), () => document.removeEventListener("keydown", u);
49
+ return document.addEventListener("keydown", d), () => document.removeEventListener("keydown", d);
51
50
  }, [o]), n.useEffect(() => {
52
- const u = d.current, y = x.current;
53
- if (T && u && y) {
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 k = new CustomEvent(ne);
57
- y.dispatchEvent(k), l.isClosePausedRef.current = !0;
55
+ const N = new CustomEvent(oe);
56
+ b.dispatchEvent(N), l.isClosePausedRef.current = !0;
58
57
  }
59
- }, g = () => {
58
+ }, T = () => {
60
59
  if (l.isClosePausedRef.current) {
61
- const k = new CustomEvent(se);
62
- y.dispatchEvent(k), l.isClosePausedRef.current = !1;
60
+ const N = new CustomEvent(ne);
61
+ b.dispatchEvent(N), l.isClosePausedRef.current = !1;
63
62
  }
64
- }, E = (k) => {
65
- !u.contains(k.relatedTarget) && g();
66
- }, P = () => {
67
- u.contains(document.activeElement) || g();
63
+ }, E = (N) => {
64
+ !d.contains(N.relatedTarget) && T();
65
+ }, C = () => {
66
+ d.contains(document.activeElement) || T();
68
67
  };
69
- return u.addEventListener("focusin", h), u.addEventListener("focusout", E), u.addEventListener("pointermove", h), u.addEventListener("pointerleave", P), window.addEventListener("blur", h), window.addEventListener("focus", g), () => {
70
- u.removeEventListener("focusin", h), u.removeEventListener("focusout", E), u.removeEventListener("pointermove", h), u.removeEventListener("pointerleave", P), window.removeEventListener("blur", h), window.removeEventListener("focus", g);
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
- }, [T, l.isClosePausedRef]);
74
- const p = n.useCallback(
75
- ({ tabbingDirection: u }) => {
76
- const h = v().map((g) => {
77
- const E = g.ref.current, P = [E, ...qt(E)];
78
- return u === "forwards" ? P : P.reverse();
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 (u === "forwards" ? h.reverse() : h).flat();
79
+ return (d === "forwards" ? h.reverse() : h).flat();
81
80
  },
82
- [v]
81
+ [m]
83
82
  );
84
83
  return n.useEffect(() => {
85
- const u = x.current;
86
- if (u) {
87
- const y = (h) => {
88
- var P, k, j;
89
- const g = h.altKey || h.ctrlKey || h.metaKey;
90
- if (h.key === "Tab" && !g) {
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 === u && O) {
93
- (P = i.current) == null || P.focus();
91
+ if (h.target === d && O) {
92
+ (C = i.current) == null || C.focus();
94
93
  return;
95
94
  }
96
- const _ = p({ tabbingDirection: O ? "backwards" : "forwards" }), K = _.findIndex((m) => m === F);
97
- re(_.slice(K + 1)) ? h.preventDefault() : O ? (k = i.current) == null || k.focus() : (j = f.current) == null || j.focus();
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 u.addEventListener("keydown", y), () => u.removeEventListener("keydown", y);
99
+ return d.addEventListener("keydown", b), () => d.removeEventListener("keydown", b);
101
100
  }
102
- }, [v, p]), /* @__PURE__ */ s.jsxs(
103
- rt,
101
+ }, [m, f]), /* @__PURE__ */ s.jsxs(
102
+ tt,
104
103
  {
105
- ref: d,
104
+ ref: u,
106
105
  role: "region",
107
106
  "aria-label": a.replace("{hotkey}", w),
108
107
  tabIndex: -1,
109
- style: { pointerEvents: T ? void 0 : "none" },
108
+ style: { pointerEvents: y ? void 0 : "none" },
110
109
  children: [
111
- T && /* @__PURE__ */ s.jsx(
112
- ae,
110
+ y && /* @__PURE__ */ s.jsx(
111
+ se,
113
112
  {
114
113
  ref: i,
115
114
  onFocusFromOutsideViewport: () => {
116
- const u = p({
115
+ const d = f({
117
116
  tabbingDirection: "forwards"
118
117
  });
119
- re(u);
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: b }) }),
124
- T && /* @__PURE__ */ s.jsx(
125
- ae,
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: f,
126
+ ref: p,
128
127
  onFocusFromOutsideViewport: () => {
129
- const u = p({
128
+ const d = f({
130
129
  tabbingDirection: "backwards"
131
130
  });
132
- re(u);
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
- _e.displayName = Se;
142
- var De = "ToastFocusProxy", ae = n.forwardRef(
140
+ Se.displayName = ke;
141
+ var _e = "ToastFocusProxy", se = n.forwardRef(
143
142
  (e, r) => {
144
- const { __scopeToast: t, onFocusFromOutsideViewport: o, ...a } = e, c = Y(De, t);
143
+ const { __scopeToast: t, onFocusFromOutsideViewport: o, ...a } = e, c = X(_e, t);
145
144
  return /* @__PURE__ */ s.jsx(
146
- X,
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 v = l.relatedTarget;
156
- !((i = c.viewport) != null && i.contains(v)) && o();
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
- ae.displayName = De;
163
- var B = "Toast", Dt = "toast.swipeStart", Ot = "toast.swipeMove", Lt = "toast.swipeCancel", It = "toast.swipeEnd", Oe = n.forwardRef(
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, [v = !0, d] = Re({
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(le, { present: t || v, children: /* @__PURE__ */ s.jsx(
171
- Vt,
169
+ return /* @__PURE__ */ s.jsx(ce, { present: t || m, children: /* @__PURE__ */ s.jsx(
170
+ Ft,
172
171
  {
173
- open: v,
172
+ open: m,
174
173
  ...l,
175
174
  ref: r,
176
- onClose: () => d(!1),
177
- onPause: U(e.onPause),
178
- onResume: U(e.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: f, y: x } = i.detail.delta;
184
- i.currentTarget.setAttribute("data-swipe", "move"), i.currentTarget.style.setProperty("--radix-toast-swipe-move-x", `${f}px`), i.currentTarget.style.setProperty("--radix-toast-swipe-move-y", `${x}px`);
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: f, y: x } = i.detail.delta;
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", `${f}px`), i.currentTarget.style.setProperty("--radix-toast-swipe-end-y", `${x}px`), d(!1);
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
- Oe.displayName = B;
198
- var [Ft, Mt] = Ae(B, {
196
+ De.displayName = Y;
197
+ var [Lt, It] = Ae(Y, {
199
198
  onClose() {
200
199
  }
201
- }), Vt = n.forwardRef(
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: v,
210
- onPause: d,
208
+ onEscapeKeyDown: m,
209
+ onPause: u,
211
210
  onResume: i,
212
- onSwipeStart: f,
211
+ onSwipeStart: p,
213
212
  onSwipeMove: x,
214
- onSwipeCancel: b,
213
+ onSwipeCancel: g,
215
214
  onSwipeEnd: w,
216
- ...T
217
- } = e, p = Y(B, t), [u, y] = n.useState(null), h = G(r, (m) => y(m)), g = n.useRef(null), E = n.useRef(null), P = a || p.duration, k = n.useRef(0), j = n.useRef(P), F = n.useRef(0), { onToastAdd: O, onToastRemove: ee } = p, L = U(() => {
218
- var N;
219
- (u == null ? void 0 : u.contains(document.activeElement)) && ((N = p.viewport) == null || N.focus()), l();
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
- (m) => {
222
- !m || m === 1 / 0 || (window.clearTimeout(F.current), k.current = (/* @__PURE__ */ new Date()).getTime(), F.current = window.setTimeout(L, m));
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 m = p.viewport;
228
- if (m) {
229
- const N = () => {
230
- _(j.current), i == null || i();
231
- }, A = () => {
232
- const M = (/* @__PURE__ */ new Date()).getTime() - k.current;
233
- j.current = j.current - M, window.clearTimeout(F.current), d == null || d();
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 m.addEventListener(ne, A), m.addEventListener(se, N), () => {
236
- m.removeEventListener(ne, A), m.removeEventListener(se, N);
234
+ return v.addEventListener(oe, k), v.addEventListener(ne, j), () => {
235
+ v.removeEventListener(oe, k), v.removeEventListener(ne, j);
237
236
  };
238
237
  }
239
- }, [p.viewport, P, d, i, _]), n.useEffect(() => {
240
- c && !p.isClosePausedRef.current && _(P);
241
- }, [c, P, p.isClosePausedRef, _]), n.useEffect(() => (O(), () => ee()), [O, ee]);
242
- const K = n.useMemo(() => u ? $e(u) : null, [u]);
243
- return p.viewport ? /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
244
- K && /* @__PURE__ */ s.jsx(
245
- Ht,
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: K
250
+ children: $
252
251
  }
253
252
  ),
254
- /* @__PURE__ */ s.jsx(Ft, { scope: t, onClose: L, children: gt.createPortal(
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
- ot,
255
+ rt,
257
256
  {
258
257
  asChild: !0,
259
- onEscapeKeyDown: R(v, () => {
260
- p.isFocusedToastEscapeKeyDownRef.current || L(), p.isFocusedToastEscapeKeyDownRef.current = !1;
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": p.swipeDirection,
271
- ...T,
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, (m) => {
275
- m.key === "Escape" && (v == null || v(m.nativeEvent), m.nativeEvent.defaultPrevented || (p.isFocusedToastEscapeKeyDownRef.current = !0, L()));
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, (m) => {
278
- m.button === 0 && (g.current = { x: m.clientX, y: m.clientY });
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, (m) => {
281
- if (!g.current) return;
282
- const N = m.clientX - g.current.x, A = m.clientY - g.current.y, M = !!E.current, V = ["left", "right"].includes(p.swipeDirection), W = ["left", "up"].includes(p.swipeDirection) ? Math.min : Math.max, Ze = V ? W(0, N) : 0, et = V ? 0 : W(0, A), te = m.pointerType === "touch" ? 10 : 2, z = { x: Ze, y: et }, ge = { originalEvent: m, delta: z };
283
- M ? (E.current = z, q(Ot, x, ge, {
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
- })) : Te(z, p.swipeDirection, te) ? (E.current = z, q(Dt, f, ge, {
284
+ })) : ge(W, f.swipeDirection, ee) ? (E.current = W, z(St, p, we, {
286
285
  discrete: !1
287
- }), m.target.setPointerCapture(m.pointerId)) : (Math.abs(N) > te || Math.abs(A) > te) && (g.current = null);
286
+ }), v.target.setPointerCapture(v.pointerId)) : (Math.abs(j) > ee || Math.abs(k) > ee) && (T.current = null);
288
287
  }),
289
- onPointerUp: R(e.onPointerUp, (m) => {
290
- const N = E.current, A = m.target;
291
- if (A.hasPointerCapture(m.pointerId) && A.releasePointerCapture(m.pointerId), E.current = null, g.current = null, N) {
292
- const M = m.currentTarget, V = { originalEvent: m, delta: N };
293
- Te(N, p.swipeDirection, p.swipeThreshold) ? q(It, w, V, {
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
- }) : q(
296
- Lt,
297
- b,
294
+ }) : z(
295
+ Dt,
296
+ g,
298
297
  V,
299
298
  {
300
299
  discrete: !0
301
300
  }
302
- ), M.addEventListener("click", (W) => W.preventDefault(), {
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
- p.viewport
310
+ f.viewport
312
311
  ) })
313
312
  ] }) : null;
314
313
  }
315
- ), Ht = (e) => {
316
- const { __scopeToast: r, children: t, ...o } = e, a = Y(B, r), [c, l] = n.useState(!1), [v, d] = n.useState(!1);
317
- return Wt(() => l(!0)), n.useEffect(() => {
318
- const i = window.setTimeout(() => d(!0), 1e3);
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
- }, []), v ? null : /* @__PURE__ */ s.jsx(ke, { asChild: !0, children: /* @__PURE__ */ s.jsx(X, { ...o, children: c && /* @__PURE__ */ s.jsxs(s.Fragment, { children: [
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
- }, $t = "ToastTitle", Le = n.forwardRef(
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
- Le.displayName = $t;
332
- var Kt = "ToastDescription", Ie = n.forwardRef(
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
- Ie.displayName = Kt;
339
- var Fe = "ToastAction", Me = n.forwardRef(
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(He, { altText: t, asChild: !0, children: /* @__PURE__ */ s.jsx(de, { ...o, ref: r }) }) : (console.error(
343
- `Invalid prop \`altText\` supplied to \`${Fe}\`. Expected non-empty \`string\`.`
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
- Me.displayName = Fe;
348
- var Ve = "ToastClose", de = n.forwardRef(
346
+ Fe.displayName = Ie;
347
+ var Me = "ToastClose", le = n.forwardRef(
349
348
  (e, r) => {
350
- const { __scopeToast: t, ...o } = e, a = Mt(Ve, t);
351
- return /* @__PURE__ */ s.jsx(He, { asChild: !0, children: /* @__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
- de.displayName = Ve;
363
- var He = n.forwardRef((e, r) => {
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 $e(e) {
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), zt(o)) {
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(...$e(o));
384
+ r.push(...He(o));
386
385
  }
387
386
  }), r;
388
387
  }
389
- function q(e, r, t, { discrete: o }) {
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 ? nt(a, c) : a.dispatchEvent(c);
390
+ r && a.addEventListener(e, r, { once: !0 }), o ? ot(a, c) : a.dispatchEvent(c);
392
391
  }
393
- var Te = (e, r, t = 0) => {
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 Wt(e = () => {
396
+ function $t(e = () => {
398
397
  }) {
399
- const r = U(e);
400
- st(() => {
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 zt(e) {
406
+ function Kt(e) {
408
407
  return e.nodeType === e.ELEMENT_NODE;
409
408
  }
410
- function qt(e) {
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 re(e) {
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 = _e, We = Oe, ze = Le, qe = Ie, Ue = Me, Ge = de;
425
- const ye = (e) => typeof e == "boolean" ? `${e}` : e === 0 ? "0" : e, Ee = bt, Ut = (e, r) => (t) => {
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 Ee(e, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
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 f = t == null ? void 0 : t[i], x = c == null ? void 0 : c[i];
430
- if (f === null) return null;
431
- const b = ye(f) || ye(x);
432
- return a[i][b];
433
- }), v = t && Object.entries(t).reduce((i, f) => {
434
- let [x, b] = f;
435
- return b === void 0 || (i[x] = b), i;
436
- }, {}), d = r == null || (o = r.compoundVariants) === null || o === void 0 ? void 0 : o.reduce((i, f) => {
437
- let { class: x, className: b, ...w } = f;
438
- return Object.entries(w).every((T) => {
439
- let [p, u] = T;
440
- return Array.isArray(u) ? u.includes({
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
- ...v
443
- }[p]) : {
441
+ ...m
442
+ }[f]) : {
444
443
  ...c,
445
- ...v
446
- }[p] === u;
444
+ ...m
445
+ }[f] === d;
447
446
  }) ? [
448
447
  ...i,
449
448
  x,
450
- b
449
+ g
451
450
  ] : i;
452
451
  }, []);
453
- return Ee(e, l, d, t == null ? void 0 : t.class, t == null ? void 0 : t.className);
454
- }, Gt = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
455
- Ke,
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: C(
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
- Gt.displayName = Ke.displayName;
466
- const Xt = Ut(
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
- ), Yt = n.forwardRef(({ className: e, variant: r, ...t }, o) => /* @__PURE__ */ s.jsx(
483
- We,
481
+ ), Gt = n.forwardRef(({ className: e, variant: r, ...t }, o) => /* @__PURE__ */ s.jsx(
482
+ Ke,
484
483
  {
485
484
  ref: o,
486
- className: C(Xt({ variant: r }), e),
485
+ className: P(Ut({ variant: r }), e),
487
486
  ...t
488
487
  }
489
488
  ));
490
- Yt.displayName = We.displayName;
491
- const Bt = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
492
- Ue,
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: C(
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
- Bt.displayName = Ue.displayName;
503
- const Jt = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
504
- Ge,
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: C(
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(at, { className: "h-4 w-4" })
512
+ children: /* @__PURE__ */ s.jsx(st, { className: "h-4 w-4" })
514
513
  }
515
514
  ));
516
- Jt.displayName = Ge.displayName;
517
- const Xe = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
518
- ze,
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: C("text-base font-semibold [&+div]:text-xs", e),
520
+ className: P("text-base font-semibold [&+div]:text-xs", e),
522
521
  ...r
523
522
  }
524
523
  ));
525
- Xe.displayName = ze.displayName;
526
- const Ye = n.forwardRef(({ className: e, ...r }, t) => /* @__PURE__ */ s.jsx(
527
- qe,
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: C("text-xs font-normal opacity-90", e),
529
+ className: P("text-xs font-normal opacity-90", e),
531
530
  ...r
532
531
  }
533
532
  ));
534
- Ye.displayName = qe.displayName;
535
- const Dr = ({
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: C(
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 && Rt[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(Xe, { className: o ? "text-left" : "text-center", children: r }),
551
- /* @__PURE__ */ s.jsx(Ye, { className: o ? "text-left" : "text-center", children: t })
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: Qt, Thumb: Zt } = it, Or = n.forwardRef(({ classNames: e, ...r }, t) => {
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(Qt, { ref: t, className: C(D.base, e == null ? void 0 : e.root), ...r, children: [
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: C(
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
- yt,
566
+ gt,
568
567
  {
569
568
  "data-testid": "list-icon",
570
- className: C(o ? "fill-dark-30/25" : "fill-dark-30/[.80]")
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: C(
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: C(o ? "fill-dark-30/[.80]" : "fill-dark-30/25")
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: C(D.borderLine) }),
593
- /* @__PURE__ */ s.jsx(Zt, { tabIndex: 1, className: C(D.thumb, e == null ? void 0 : e.thumb) })
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
- }, H = {
604
- sizes: {
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
- ]), Q = Ne(), Be = "TooltipProvider", tr = 700, ie = "tooltip.open", [rr, ue] = J(Be), fe = (e) => {
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 = tr,
608
+ delayDuration: t = Zt,
687
609
  skipDelayDuration: o = 300,
688
610
  disableHoverableContent: a = !1,
689
611
  children: c
690
- } = e, [l, v] = n.useState(!0), d = n.useRef(!1), i = n.useRef(0);
612
+ } = e, [l, m] = n.useState(!0), u = n.useRef(!1), i = n.useRef(0);
691
613
  return n.useEffect(() => {
692
- const f = i.current;
693
- return () => window.clearTimeout(f);
614
+ const p = i.current;
615
+ return () => window.clearTimeout(p);
694
616
  }, []), /* @__PURE__ */ s.jsx(
695
- rr,
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), v(!1);
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
- () => v(!0),
627
+ () => m(!0),
706
628
  o
707
629
  );
708
630
  }, [o]),
709
- isPointerInTransitRef: d,
710
- onPointerInTransitChange: n.useCallback((f) => {
711
- d.current = f;
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
- fe.displayName = Be;
719
- var Z = "Tooltip", [or, $] = J(Z), pe = (e) => {
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: v
728
- } = e, d = ue(Z, e.__scopeTooltip), i = Q(r), [f, x] = n.useState(null), b = lt(), w = n.useRef(0), T = l ?? d.disableHoverableContent, p = v ?? d.delayDuration, u = n.useRef(!1), [y = !1, h] = Re({
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: (j) => {
732
- j ? (d.onOpen(), document.dispatchEvent(new CustomEvent(ie))) : d.onClose(), c == null || c(j);
653
+ onChange: (A) => {
654
+ A ? (u.onOpen(), document.dispatchEvent(new CustomEvent(ae))) : u.onClose(), c == null || c(A);
733
655
  }
734
- }), g = n.useMemo(() => y ? u.current ? "delayed-open" : "instant-open" : "closed", [y]), E = n.useCallback(() => {
735
- window.clearTimeout(w.current), w.current = 0, u.current = !1, h(!0);
736
- }, [h]), P = n.useCallback(() => {
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]), k = n.useCallback(() => {
660
+ }, [h]), N = n.useCallback(() => {
739
661
  window.clearTimeout(w.current), w.current = window.setTimeout(() => {
740
- u.current = !0, h(!0), w.current = 0;
741
- }, p);
742
- }, [p, h]);
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(dt, { ...i, children: /* @__PURE__ */ s.jsx(
746
- or,
667
+ }, []), /* @__PURE__ */ s.jsx(lt, { ...i, children: /* @__PURE__ */ s.jsx(
668
+ tr,
747
669
  {
748
670
  scope: r,
749
- contentId: b,
750
- open: y,
751
- stateAttribute: g,
752
- trigger: f,
671
+ contentId: g,
672
+ open: b,
673
+ stateAttribute: T,
674
+ trigger: p,
753
675
  onTriggerChange: x,
754
676
  onTriggerEnter: n.useCallback(() => {
755
- d.isOpenDelayed ? k() : E();
756
- }, [d.isOpenDelayed, k, E]),
677
+ u.isOpenDelayed ? N() : E();
678
+ }, [u.isOpenDelayed, N, E]),
757
679
  onTriggerLeave: n.useCallback(() => {
758
- T ? P() : (window.clearTimeout(w.current), w.current = 0);
759
- }, [P, T]),
680
+ y ? C() : (window.clearTimeout(w.current), w.current = 0);
681
+ }, [C, y]),
760
682
  onOpen: E,
761
- onClose: P,
762
- disableHoverableContent: T,
683
+ onClose: C,
684
+ disableHoverableContent: y,
763
685
  children: t
764
686
  }
765
687
  ) });
766
688
  };
767
- pe.displayName = Z;
768
- var ce = "TooltipTrigger", ve = n.forwardRef(
689
+ pe.displayName = Q;
690
+ var ie = "TooltipTrigger", fe = n.forwardRef(
769
691
  (e, r) => {
770
- const { __scopeTooltip: t, ...o } = e, a = $(ce, t), c = ue(ce, t), l = Q(t), v = n.useRef(null), d = G(r, v, a.onTriggerChange), i = n.useRef(!1), f = n.useRef(!1), x = n.useCallback(() => i.current = !1, []);
771
- return n.useEffect(() => () => document.removeEventListener("pointerup", x), [x]), /* @__PURE__ */ s.jsx(ut, { asChild: !0, ...l, children: /* @__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: d,
778
- onPointerMove: R(e.onPointerMove, (b) => {
779
- b.pointerType !== "touch" && !f.current && !c.isPointerInTransitRef.current && (a.onTriggerEnter(), f.current = !0);
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(), f.current = !1;
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
- ve.displayName = ce;
797
- var me = "TooltipPortal", [nr, sr] = J(me, {
718
+ fe.displayName = ie;
719
+ var ve = "TooltipPortal", [rr, or] = B(ve, {
798
720
  forceMount: void 0
799
- }), xe = (e) => {
800
- const { __scopeTooltip: r, forceMount: t, children: o, container: a } = e, c = $(me, r);
801
- return /* @__PURE__ */ s.jsx(nr, { scope: r, forceMount: t, children: /* @__PURE__ */ s.jsx(le, { present: t || c.open, children: /* @__PURE__ */ s.jsx(ke, { asChild: !0, container: a, children: o }) }) });
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
- xe.displayName = me;
804
- var I = "TooltipContent", he = n.forwardRef(
725
+ me.displayName = ve;
726
+ var I = "TooltipContent", xe = n.forwardRef(
805
727
  (e, r) => {
806
- const t = sr(I, e.__scopeTooltip), { forceMount: o = t.forceMount, side: a = "top", ...c } = e, l = $(I, e.__scopeTooltip);
807
- return /* @__PURE__ */ s.jsx(le, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ s.jsx(Je, { side: a, ...c, ref: r }) : /* @__PURE__ */ s.jsx(ar, { side: a, ...c, ref: r }) });
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
- ), ar = n.forwardRef((e, r) => {
810
- const t = $(I, e.__scopeTooltip), o = ue(I, e.__scopeTooltip), a = n.useRef(null), c = G(r, a), [l, v] = n.useState(null), { trigger: d, onClose: i } = t, f = a.current, { onPointerInTransitChange: x } = o, b = n.useCallback(() => {
811
- v(null), x(!1);
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
- (T, p) => {
814
- const u = T.currentTarget, y = { x: T.clientX, y: T.clientY }, h = lr(y, u.getBoundingClientRect()), g = dr(y, h), E = ur(p.getBoundingClientRect()), P = pr([...g, ...E]);
815
- v(P), x(!0);
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(() => () => b(), [b]), n.useEffect(() => {
820
- if (d && f) {
821
- const T = (u) => w(u, f), p = (u) => w(u, d);
822
- return d.addEventListener("pointerleave", T), f.addEventListener("pointerleave", p), () => {
823
- d.removeEventListener("pointerleave", T), f.removeEventListener("pointerleave", p);
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
- }, [d, f, w, b]), n.useEffect(() => {
748
+ }, [u, p, w, g]), n.useEffect(() => {
827
749
  if (l) {
828
- const T = (p) => {
829
- const u = p.target, y = { x: p.clientX, y: p.clientY }, h = (d == null ? void 0 : d.contains(u)) || (f == null ? void 0 : f.contains(u)), g = !fr(y, l);
830
- h ? b() : g && (b(), i());
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", T), () => document.removeEventListener("pointermove", T);
754
+ return document.addEventListener("pointermove", y), () => document.removeEventListener("pointermove", y);
833
755
  }
834
- }, [d, f, l, i, b]), /* @__PURE__ */ s.jsx(Je, { ...e, ref: c });
835
- }), [ir, cr] = J(Z, { isInside: !1 }), Je = n.forwardRef(
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
- ...v
844
- } = e, d = $(I, t), i = Q(t), { onClose: f } = d;
845
- return n.useEffect(() => (document.addEventListener(ie, f), () => document.removeEventListener(ie, f)), [f]), n.useEffect(() => {
846
- if (d.trigger) {
847
- const x = (b) => {
848
- const w = b.target;
849
- w != null && w.contains(d.trigger) && f();
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
- }, [d.trigger, f]), /* @__PURE__ */ s.jsx(
854
- ft,
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: f,
783
+ onDismiss: p,
862
784
  children: /* @__PURE__ */ s.jsxs(
863
785
  pt,
864
786
  {
865
- "data-state": d.stateAttribute,
787
+ "data-state": u.stateAttribute,
866
788
  ...i,
867
- ...v,
789
+ ...m,
868
790
  ref: r,
869
791
  style: {
870
- ...v.style,
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(vt, { children: o }),
879
- /* @__PURE__ */ s.jsx(ir, { scope: t, isInside: !0, children: /* @__PURE__ */ s.jsx(Nt, { id: d.contentId, role: "tooltip", children: a || o }) })
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
- he.displayName = I;
888
- var Qe = "TooltipArrow", we = n.forwardRef(
809
+ xe.displayName = I;
810
+ var Je = "TooltipArrow", he = n.forwardRef(
889
811
  (e, r) => {
890
- const { __scopeTooltip: t, ...o } = e, a = Q(t);
891
- return cr(
892
- Qe,
812
+ const { __scopeTooltip: t, ...o } = e, a = J(t);
813
+ return ar(
814
+ Je,
893
815
  t
894
- ).isInside ? null : /* @__PURE__ */ s.jsx(ct, { ...a, ...o, ref: r });
816
+ ).isInside ? null : /* @__PURE__ */ s.jsx(it, { ...a, ...o, ref: r });
895
817
  }
896
818
  );
897
- we.displayName = Qe;
898
- function lr(e, r) {
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 dr(e, r, t = 5) {
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 ur(e) {
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 fr(e, r) {
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 v = r[c].x, d = r[c].y, i = r[l].x, f = r[l].y;
957
- d > o != f > o && t < (i - v) * (o - d) / (f - d) + v && (a = !a);
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 pr(e) {
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), vr(r);
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 vr(e) {
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 mr = fe, xr = pe, hr = ve, wr = xe, gr = he, br = we;
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: br,
994
- Content: gr,
995
- Portal: wr,
996
- Provider: mr,
997
- Root: xr,
915
+ Arrow: wr,
916
+ Content: hr,
917
+ Portal: xr,
918
+ Provider: fr,
919
+ Root: vr,
998
920
  Tooltip: pe,
999
- TooltipArrow: we,
1000
- TooltipContent: he,
1001
- TooltipPortal: xe,
1002
- TooltipProvider: fe,
1003
- TooltipTrigger: ve,
1004
- Trigger: hr,
1005
- createTooltipScope: er
1006
- }, Symbol.toStringTag, { value: "Module" })), { Provider: yr, Root: Er, Trigger: Cr, Portal: Pr, Content: Rr, Arrow: kr } = Tr, Ir = ({
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
- }) => /* @__PURE__ */ s.jsx(yr, { children: /* @__PURE__ */ s.jsxs(Er, { defaultOpen: t, delayDuration: c, children: [
1014
- /* @__PURE__ */ s.jsx(Cr, { asChild: !0, children: /* @__PURE__ */ s.jsx("div", { children: e }) }),
1015
- /* @__PURE__ */ s.jsx(Pr, { children: /* @__PURE__ */ s.jsxs(
1016
- Rr,
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: C(Ce.content, r),
943
+ className: P(Ee.content, r),
1021
944
  children: [
1022
945
  a,
1023
- /* @__PURE__ */ s.jsx(kr, { className: Ce.arrow })
946
+ /* @__PURE__ */ s.jsx(Pr, { className: Ee.arrow })
1024
947
  ]
1025
948
  }
1026
949
  ) })
1027
- ] }) }), Ce = {
1028
- content: C(
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
- }, Fr = ({
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(mt, { value: e, onValueChange: r, children: /* @__PURE__ */ s.jsx(
1043
- xt,
965
+ }) => /* @__PURE__ */ s.jsx(vt, { value: e, onValueChange: r, children: /* @__PURE__ */ s.jsx(
966
+ mt,
1044
967
  {
1045
- className: C(oe.container, t.container),
968
+ className: P(re.container, t.container),
1046
969
  ...a,
1047
970
  children: Array.from({ length: o }).map((c, l) => /* @__PURE__ */ s.jsx(
1048
- ht,
971
+ xt,
1049
972
  {
1050
973
  value: String(l),
1051
- className: C(
1052
- oe.dot,
1053
- l <= Number(e) && oe.dotActive,
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
- ) }), oe = {
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
- Dr as N,
1067
- Or as S,
1068
- Lr as T,
1069
- Ir as a,
1070
- Ce as b,
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
- H as t
995
+ Ee as t
1075
996
  };