@khaos-systems/helm 0.2.3 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/README.md +11 -4
  2. package/dist/MtIconSelect-CfmehFw5.js +7859 -0
  3. package/dist/MtIconSelect-D3hqMI_b.cjs +46 -0
  4. package/dist/components/matter/MtButton.d.ts +2 -2
  5. package/dist/components/matter/MtDropdown.d.ts +1 -1
  6. package/dist/components/matter/MtFilter.d.ts +6 -0
  7. package/dist/components/matter/MtIcon.d.ts +3 -0
  8. package/dist/components/matter/MtIconSelect.d.ts +19 -0
  9. package/dist/components/matter/MtInput.d.ts +1 -1
  10. package/dist/components/matter/MtSearch.d.ts +1 -1
  11. package/dist/components/matter/MtSelect.d.ts +1 -1
  12. package/dist/components/matter/MtToast.d.ts +31 -0
  13. package/dist/components/matter/experimental/collection/MtCollection.d.ts +41 -1
  14. package/dist/components/matter/experimental/collection/MtCollectionContext.d.ts +26 -3
  15. package/dist/components/matter/experimental/collection/MtCollectionEntryControls.d.ts +21 -5
  16. package/dist/components/matter/experimental/collection/MtCollectionEntryUtils.d.ts +24 -0
  17. package/dist/components/matter/experimental/collection/MtCollectionSelectionToolbar.d.ts +8 -0
  18. package/dist/components/matter/experimental/collection/MtCollectionTaskListEntry.d.ts +32 -1
  19. package/dist/components/matter/experimental/collection/MtCollectionToast.d.ts +10 -0
  20. package/dist/components/matter/experimental/collection/index.d.ts +2 -1
  21. package/dist/components/matter/experimental/collection/layouts/MtCollectionBoardLayout.d.ts +33 -0
  22. package/dist/components/matter/experimental/collection/layouts/MtCollectionPlanLayout.d.ts +2 -0
  23. package/dist/components/matter/experimental/collection/layouts/useBoardDnd.d.ts +40 -0
  24. package/dist/experimental.cjs +6 -2
  25. package/dist/experimental.js +6464 -1720
  26. package/dist/lib.d.ts +4 -1
  27. package/dist/matter.cjs +2 -2
  28. package/dist/matter.js +262 -275
  29. package/dist/styles.css +1 -1
  30. package/package.json +6 -1
package/dist/matter.js CHANGED
@@ -1,27 +1,22 @@
1
- import { c as B, j as r, P as O, a as j, u as de, b as W, d as S, e as fe, R as et, f as $, h as tt, g as pe, i as nt, k as rt, F as ot, D as xe, l as st, m as at, A as lt, n as it, o as me, C as ct, p as ut, q as dt, M as V, X as q, r as he, T as ge, s as ve, t as be, v as Ce, S as ft, w as pt, x as ce } from "./MtAvatar-03YpvbOy.js";
2
- import { y as Pn, z as kn, B as On, E as An, G as Sn, H as $n, I as Ln, J as Fn, K as Hn, L as Gn, N as Wn, O as zn, Q as Bn, U as Vn, V as qn, W as Yn, Y as Un, Z as Xn, _ as Kn } from "./MtAvatar-03YpvbOy.js";
1
+ import { c as ee, j as r, P as k, a as j, u as pe, b as W, d as S, e as xe, R as nt, f as $, h as rt, g as me, i as ot, k as st, F as at, D as he, l as lt, m as it, A as ct, n as ut, o as ge, C as dt, p as ft, q as pt, M as B, X as V, r as ve, T as be, s as Ce, t as ye, v as Ne, S as xt, w as mt, x as ht, y as ce } from "./MtIconSelect-CfmehFw5.js";
2
+ import { I as _n, z as Pn, B as On, E as kn, G as An, H as Sn, J as $n, K as Ln, L as Fn, N as Hn, O as Gn, Q as Wn, U as zn, V as Bn, W as Vn, Y as Yn, Z as qn, _ as Un, $ as Xn, a0 as Kn, a1 as Zn, a2 as Jn, a3 as Qn, a4 as er, a5 as tr } from "./MtIconSelect-CfmehFw5.js";
3
3
  import * as i from "react";
4
- import { useState as P, useRef as ye, useCallback as Z, useEffect as xt, useMemo as G, Children as Ne, isValidElement as je, cloneElement as mt } from "react";
5
- const ht = [
6
- ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
7
- ["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
8
- ["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
9
- ], gt = B("circle-alert", ht);
10
- const vt = [
4
+ import { useState as P, useRef as je, useCallback as K, useEffect as gt, useMemo as G, Children as we, isValidElement as Te, cloneElement as vt } from "react";
5
+ const bt = [
11
6
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
12
7
  ["path", { d: "m9 12 2 2 4-4", key: "dzmm74" }]
13
- ], bt = B("circle-check", vt);
14
- const Ct = [
8
+ ], Ct = ee("circle-check", bt);
9
+ const yt = [
15
10
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
16
11
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
17
12
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
18
- ], yt = B("circle-x", Ct);
19
- const Nt = [
13
+ ], Nt = ee("circle-x", yt);
14
+ const jt = [
20
15
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
21
16
  ["path", { d: "M12 16v-4", key: "1dtifu" }],
22
17
  ["path", { d: "M12 8h.01", key: "e9boi3" }]
23
- ], jt = B("info", Nt);
24
- var Y = "Dialog", [we] = pe(Y), [wt, w] = we(Y), Te = (e) => {
18
+ ], wt = ee("info", jt);
19
+ var Y = "Dialog", [De] = me(Y), [Tt, w] = De(Y), Ee = (e) => {
25
20
  const {
26
21
  __scopeDialog: n,
27
22
  children: t,
@@ -29,14 +24,14 @@ var Y = "Dialog", [we] = pe(Y), [wt, w] = we(Y), Te = (e) => {
29
24
  defaultOpen: s,
30
25
  onOpenChange: a,
31
26
  modal: l = !0
32
- } = e, u = i.useRef(null), c = i.useRef(null), [f, d] = de({
27
+ } = e, u = i.useRef(null), c = i.useRef(null), [f, d] = pe({
33
28
  prop: o,
34
29
  defaultProp: s ?? !1,
35
30
  onChange: a,
36
31
  caller: Y
37
32
  });
38
33
  return /* @__PURE__ */ r.jsx(
39
- wt,
34
+ Tt,
40
35
  {
41
36
  scope: n,
42
37
  triggerRef: u,
@@ -52,12 +47,12 @@ var Y = "Dialog", [we] = pe(Y), [wt, w] = we(Y), Te = (e) => {
52
47
  }
53
48
  );
54
49
  };
55
- Te.displayName = Y;
56
- var Ee = "DialogTrigger", Tt = i.forwardRef(
50
+ Ee.displayName = Y;
51
+ var Me = "DialogTrigger", Dt = i.forwardRef(
57
52
  (e, n) => {
58
- const { __scopeDialog: t, ...o } = e, s = w(Ee, t), a = $(n, s.triggerRef);
53
+ const { __scopeDialog: t, ...o } = e, s = w(Me, t), a = $(n, s.triggerRef);
59
54
  return /* @__PURE__ */ r.jsx(
60
- O.button,
55
+ k.button,
61
56
  {
62
57
  type: "button",
63
58
  "aria-haspopup": "dialog",
@@ -71,29 +66,29 @@ var Ee = "DialogTrigger", Tt = i.forwardRef(
71
66
  );
72
67
  }
73
68
  );
74
- Tt.displayName = Ee;
75
- var te = "DialogPortal", [Et, De] = we(te, {
69
+ Dt.displayName = Me;
70
+ var te = "DialogPortal", [Et, Re] = De(te, {
76
71
  forceMount: void 0
77
- }), Re = (e) => {
72
+ }), Ie = (e) => {
78
73
  const { __scopeDialog: n, forceMount: t, children: o, container: s } = e, a = w(te, n);
79
- return /* @__PURE__ */ r.jsx(Et, { scope: n, forceMount: t, children: i.Children.map(o, (l) => /* @__PURE__ */ r.jsx(S, { present: t || a.open, children: /* @__PURE__ */ r.jsx(fe, { asChild: !0, container: s, children: l }) })) });
74
+ return /* @__PURE__ */ r.jsx(Et, { scope: n, forceMount: t, children: i.Children.map(o, (l) => /* @__PURE__ */ r.jsx(S, { present: t || a.open, children: /* @__PURE__ */ r.jsx(xe, { asChild: !0, container: s, children: l }) })) });
80
75
  };
81
- Re.displayName = te;
82
- var z = "DialogOverlay", Me = i.forwardRef(
76
+ Ie.displayName = te;
77
+ var z = "DialogOverlay", _e = i.forwardRef(
83
78
  (e, n) => {
84
- const t = De(z, e.__scopeDialog), { forceMount: o = t.forceMount, ...s } = e, a = w(z, e.__scopeDialog);
79
+ const t = Re(z, e.__scopeDialog), { forceMount: o = t.forceMount, ...s } = e, a = w(z, e.__scopeDialog);
85
80
  return a.modal ? /* @__PURE__ */ r.jsx(S, { present: o || a.open, children: /* @__PURE__ */ r.jsx(Rt, { ...s, ref: n }) }) : null;
86
81
  }
87
82
  );
88
- Me.displayName = z;
89
- var Dt = nt("DialogOverlay.RemoveScroll"), Rt = i.forwardRef(
83
+ _e.displayName = z;
84
+ var Mt = ot("DialogOverlay.RemoveScroll"), Rt = i.forwardRef(
90
85
  (e, n) => {
91
86
  const { __scopeDialog: t, ...o } = e, s = w(z, t);
92
87
  return (
93
88
  // Make sure `Content` is scrollable even when it doesn't live inside `RemoveScroll`
94
89
  // ie. when `Overlay` and `Content` are siblings
95
- /* @__PURE__ */ r.jsx(et, { as: Dt, allowPinchZoom: !0, shards: [s.contentRef], children: /* @__PURE__ */ r.jsx(
96
- O.div,
90
+ /* @__PURE__ */ r.jsx(nt, { as: Mt, allowPinchZoom: !0, shards: [s.contentRef], children: /* @__PURE__ */ r.jsx(
91
+ k.div,
97
92
  {
98
93
  "data-state": re(s.open),
99
94
  ...o,
@@ -103,21 +98,21 @@ var Dt = nt("DialogOverlay.RemoveScroll"), Rt = i.forwardRef(
103
98
  ) })
104
99
  );
105
100
  }
106
- ), R = "DialogContent", _e = i.forwardRef(
101
+ ), M = "DialogContent", Pe = i.forwardRef(
107
102
  (e, n) => {
108
- const t = De(R, e.__scopeDialog), { forceMount: o = t.forceMount, ...s } = e, a = w(R, e.__scopeDialog);
109
- return /* @__PURE__ */ r.jsx(S, { present: o || a.open, children: a.modal ? /* @__PURE__ */ r.jsx(Mt, { ...s, ref: n }) : /* @__PURE__ */ r.jsx(_t, { ...s, ref: n }) });
103
+ const t = Re(M, e.__scopeDialog), { forceMount: o = t.forceMount, ...s } = e, a = w(M, e.__scopeDialog);
104
+ return /* @__PURE__ */ r.jsx(S, { present: o || a.open, children: a.modal ? /* @__PURE__ */ r.jsx(It, { ...s, ref: n }) : /* @__PURE__ */ r.jsx(_t, { ...s, ref: n }) });
110
105
  }
111
106
  );
112
- _e.displayName = R;
113
- var Mt = i.forwardRef(
107
+ Pe.displayName = M;
108
+ var It = i.forwardRef(
114
109
  (e, n) => {
115
- const t = w(R, e.__scopeDialog), o = i.useRef(null), s = $(n, t.contentRef, o);
110
+ const t = w(M, e.__scopeDialog), o = i.useRef(null), s = $(n, t.contentRef, o);
116
111
  return i.useEffect(() => {
117
112
  const a = o.current;
118
- if (a) return tt(a);
113
+ if (a) return rt(a);
119
114
  }, []), /* @__PURE__ */ r.jsx(
120
- Ie,
115
+ Oe,
121
116
  {
122
117
  ...e,
123
118
  ref: s,
@@ -139,9 +134,9 @@ var Mt = i.forwardRef(
139
134
  }
140
135
  ), _t = i.forwardRef(
141
136
  (e, n) => {
142
- const t = w(R, e.__scopeDialog), o = i.useRef(!1), s = i.useRef(!1);
137
+ const t = w(M, e.__scopeDialog), o = i.useRef(!1), s = i.useRef(!1);
143
138
  return /* @__PURE__ */ r.jsx(
144
- Ie,
139
+ Oe,
145
140
  {
146
141
  ...e,
147
142
  ref: n,
@@ -158,12 +153,12 @@ var Mt = i.forwardRef(
158
153
  }
159
154
  );
160
155
  }
161
- ), Ie = i.forwardRef(
156
+ ), Oe = i.forwardRef(
162
157
  (e, n) => {
163
- const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: a, ...l } = e, u = w(R, t), c = i.useRef(null), f = $(n, c);
164
- return rt(), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
158
+ const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: a, ...l } = e, u = w(M, t), c = i.useRef(null), f = $(n, c);
159
+ return st(), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
165
160
  /* @__PURE__ */ r.jsx(
166
- ot,
161
+ at,
167
162
  {
168
163
  asChild: !0,
169
164
  loop: !0,
@@ -171,7 +166,7 @@ var Mt = i.forwardRef(
171
166
  onMountAutoFocus: s,
172
167
  onUnmountAutoFocus: a,
173
168
  children: /* @__PURE__ */ r.jsx(
174
- xe,
169
+ he,
175
170
  {
176
171
  role: "dialog",
177
172
  id: u.contentId,
@@ -186,30 +181,30 @@ var Mt = i.forwardRef(
186
181
  }
187
182
  ),
188
183
  /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
189
- /* @__PURE__ */ r.jsx(It, { titleId: u.titleId }),
184
+ /* @__PURE__ */ r.jsx(Pt, { titleId: u.titleId }),
190
185
  /* @__PURE__ */ r.jsx(kt, { contentRef: c, descriptionId: u.descriptionId })
191
186
  ] })
192
187
  ] });
193
188
  }
194
- ), ne = "DialogTitle", Pe = i.forwardRef(
189
+ ), ne = "DialogTitle", ke = i.forwardRef(
195
190
  (e, n) => {
196
191
  const { __scopeDialog: t, ...o } = e, s = w(ne, t);
197
- return /* @__PURE__ */ r.jsx(O.h2, { id: s.titleId, ...o, ref: n });
192
+ return /* @__PURE__ */ r.jsx(k.h2, { id: s.titleId, ...o, ref: n });
198
193
  }
199
194
  );
200
- Pe.displayName = ne;
201
- var ke = "DialogDescription", Oe = i.forwardRef(
195
+ ke.displayName = ne;
196
+ var Ae = "DialogDescription", Se = i.forwardRef(
202
197
  (e, n) => {
203
- const { __scopeDialog: t, ...o } = e, s = w(ke, t);
204
- return /* @__PURE__ */ r.jsx(O.p, { id: s.descriptionId, ...o, ref: n });
198
+ const { __scopeDialog: t, ...o } = e, s = w(Ae, t);
199
+ return /* @__PURE__ */ r.jsx(k.p, { id: s.descriptionId, ...o, ref: n });
205
200
  }
206
201
  );
207
- Oe.displayName = ke;
208
- var Ae = "DialogClose", Se = i.forwardRef(
202
+ Se.displayName = Ae;
203
+ var $e = "DialogClose", Le = i.forwardRef(
209
204
  (e, n) => {
210
- const { __scopeDialog: t, ...o } = e, s = w(Ae, t);
205
+ const { __scopeDialog: t, ...o } = e, s = w($e, t);
211
206
  return /* @__PURE__ */ r.jsx(
212
- O.button,
207
+ k.button,
213
208
  {
214
209
  type: "button",
215
210
  ...o,
@@ -219,16 +214,16 @@ var Ae = "DialogClose", Se = i.forwardRef(
219
214
  );
220
215
  }
221
216
  );
222
- Se.displayName = Ae;
217
+ Le.displayName = $e;
223
218
  function re(e) {
224
219
  return e ? "open" : "closed";
225
220
  }
226
- var $e = "DialogTitleWarning", [vn, Le] = st($e, {
227
- contentName: R,
221
+ var Fe = "DialogTitleWarning", [gn, He] = lt(Fe, {
222
+ contentName: M,
228
223
  titleName: ne,
229
224
  docsSlug: "dialog"
230
- }), It = ({ titleId: e }) => {
231
- const n = Le($e), t = `\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
225
+ }), Pt = ({ titleId: e }) => {
226
+ const n = He(Fe), t = `\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
232
227
 
233
228
  If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
234
229
 
@@ -236,18 +231,18 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
236
231
  return i.useEffect(() => {
237
232
  e && (document.getElementById(e) || console.error(t));
238
233
  }, [t, e]), null;
239
- }, Pt = "DialogDescriptionWarning", kt = ({ contentRef: e, descriptionId: n }) => {
240
- const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Le(Pt).contentName}}.`;
234
+ }, Ot = "DialogDescriptionWarning", kt = ({ contentRef: e, descriptionId: n }) => {
235
+ const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${He(Ot).contentName}}.`;
241
236
  return i.useEffect(() => {
242
237
  const s = e.current?.getAttribute("aria-describedby");
243
238
  n && s && (document.getElementById(n) || console.warn(o));
244
239
  }, [o, e, n]), null;
245
- }, Ot = Te, At = Re, St = Me, $t = _e, Lt = Pe, Ft = Oe, Fe = Se, [U] = pe("Tooltip", [
246
- me
247
- ]), X = me(), He = "TooltipProvider", Ht = 700, Q = "tooltip.open", [Gt, oe] = U(He), Ge = (e) => {
240
+ }, At = Ee, St = Ie, $t = _e, Lt = Pe, ue = ke, de = Se, Ge = Le, [q] = me("Tooltip", [
241
+ ge
242
+ ]), U = ge(), We = "TooltipProvider", Ft = 700, J = "tooltip.open", [Ht, oe] = q(We), ze = (e) => {
248
243
  const {
249
244
  __scopeTooltip: n,
250
- delayDuration: t = Ht,
245
+ delayDuration: t = Ft,
251
246
  skipDelayDuration: o = 300,
252
247
  disableHoverableContent: s = !1,
253
248
  children: a
@@ -256,7 +251,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
256
251
  const f = c.current;
257
252
  return () => window.clearTimeout(f);
258
253
  }, []), /* @__PURE__ */ r.jsx(
259
- Gt,
254
+ Ht,
260
255
  {
261
256
  scope: n,
262
257
  isOpenDelayedRef: l,
@@ -279,8 +274,8 @@ For more information, see https://radix-ui.com/primitives/docs/components/${n.do
279
274
  }
280
275
  );
281
276
  };
282
- Ge.displayName = He;
283
- var A = "Tooltip", [Wt, L] = U(A), We = (e) => {
277
+ ze.displayName = We;
278
+ var A = "Tooltip", [Gt, L] = q(A), Be = (e) => {
284
279
  const {
285
280
  __scopeTooltip: n,
286
281
  children: t,
@@ -289,52 +284,52 @@ var A = "Tooltip", [Wt, L] = U(A), We = (e) => {
289
284
  onOpenChange: a,
290
285
  disableHoverableContent: l,
291
286
  delayDuration: u
292
- } = e, c = oe(A, e.__scopeTooltip), f = X(n), [d, p] = i.useState(null), h = W(), x = i.useRef(0), g = l ?? c.disableHoverableContent, C = u ?? c.delayDuration, m = i.useRef(!1), [v, y] = de({
287
+ } = e, c = oe(A, e.__scopeTooltip), f = U(n), [d, p] = i.useState(null), h = W(), x = i.useRef(0), g = l ?? c.disableHoverableContent, C = u ?? c.delayDuration, m = i.useRef(!1), [v, y] = pe({
293
288
  prop: o,
294
289
  defaultProp: s ?? !1,
295
290
  onChange: (F) => {
296
- F ? (c.onOpen(), document.dispatchEvent(new CustomEvent(Q))) : c.onClose(), a?.(F);
291
+ F ? (c.onOpen(), document.dispatchEvent(new CustomEvent(J))) : c.onClose(), a?.(F);
297
292
  },
298
293
  caller: A
299
- }), D = i.useMemo(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [v]), E = i.useCallback(() => {
294
+ }), E = i.useMemo(() => v ? m.current ? "delayed-open" : "instant-open" : "closed", [v]), D = i.useCallback(() => {
300
295
  window.clearTimeout(x.current), x.current = 0, m.current = !1, y(!0);
301
296
  }, [y]), T = i.useCallback(() => {
302
297
  window.clearTimeout(x.current), x.current = 0, y(!1);
303
- }, [y]), M = i.useCallback(() => {
298
+ }, [y]), R = i.useCallback(() => {
304
299
  window.clearTimeout(x.current), x.current = window.setTimeout(() => {
305
300
  m.current = !0, y(!0), x.current = 0;
306
301
  }, C);
307
302
  }, [C, y]);
308
303
  return i.useEffect(() => () => {
309
304
  x.current && (window.clearTimeout(x.current), x.current = 0);
310
- }, []), /* @__PURE__ */ r.jsx(at, { ...f, children: /* @__PURE__ */ r.jsx(
311
- Wt,
305
+ }, []), /* @__PURE__ */ r.jsx(it, { ...f, children: /* @__PURE__ */ r.jsx(
306
+ Gt,
312
307
  {
313
308
  scope: n,
314
309
  contentId: h,
315
310
  open: v,
316
- stateAttribute: D,
311
+ stateAttribute: E,
317
312
  trigger: d,
318
313
  onTriggerChange: p,
319
314
  onTriggerEnter: i.useCallback(() => {
320
- c.isOpenDelayedRef.current ? M() : E();
321
- }, [c.isOpenDelayedRef, M, E]),
315
+ c.isOpenDelayedRef.current ? R() : D();
316
+ }, [c.isOpenDelayedRef, R, D]),
322
317
  onTriggerLeave: i.useCallback(() => {
323
318
  g ? T() : (window.clearTimeout(x.current), x.current = 0);
324
319
  }, [T, g]),
325
- onOpen: E,
320
+ onOpen: D,
326
321
  onClose: T,
327
322
  disableHoverableContent: g,
328
323
  children: t
329
324
  }
330
325
  ) });
331
326
  };
332
- We.displayName = A;
333
- var ee = "TooltipTrigger", ze = i.forwardRef(
327
+ Be.displayName = A;
328
+ var Q = "TooltipTrigger", Ve = i.forwardRef(
334
329
  (e, n) => {
335
- const { __scopeTooltip: t, ...o } = e, s = L(ee, t), a = oe(ee, t), l = X(t), u = i.useRef(null), c = $(n, u, s.onTriggerChange), f = i.useRef(!1), d = i.useRef(!1), p = i.useCallback(() => f.current = !1, []);
336
- return i.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ r.jsx(lt, { asChild: !0, ...l, children: /* @__PURE__ */ r.jsx(
337
- O.button,
330
+ const { __scopeTooltip: t, ...o } = e, s = L(Q, t), a = oe(Q, t), l = U(t), u = i.useRef(null), c = $(n, u, s.onTriggerChange), f = i.useRef(!1), d = i.useRef(!1), p = i.useCallback(() => f.current = !1, []);
331
+ return i.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ r.jsx(ct, { asChild: !0, ...l, children: /* @__PURE__ */ r.jsx(
332
+ k.button,
338
333
  {
339
334
  "aria-describedby": s.open ? s.contentId : void 0,
340
335
  "data-state": s.stateAttribute,
@@ -358,25 +353,25 @@ var ee = "TooltipTrigger", ze = i.forwardRef(
358
353
  ) });
359
354
  }
360
355
  );
361
- ze.displayName = ee;
362
- var se = "TooltipPortal", [zt, Bt] = U(se, {
356
+ Ve.displayName = Q;
357
+ var se = "TooltipPortal", [Wt, zt] = q(se, {
363
358
  forceMount: void 0
364
- }), Be = (e) => {
359
+ }), Ye = (e) => {
365
360
  const { __scopeTooltip: n, forceMount: t, children: o, container: s } = e, a = L(se, n);
366
- return /* @__PURE__ */ r.jsx(zt, { scope: n, forceMount: t, children: /* @__PURE__ */ r.jsx(S, { present: t || a.open, children: /* @__PURE__ */ r.jsx(fe, { asChild: !0, container: s, children: o }) }) });
361
+ return /* @__PURE__ */ r.jsx(Wt, { scope: n, forceMount: t, children: /* @__PURE__ */ r.jsx(S, { present: t || a.open, children: /* @__PURE__ */ r.jsx(xe, { asChild: !0, container: s, children: o }) }) });
367
362
  };
368
- Be.displayName = se;
369
- var k = "TooltipContent", Ve = i.forwardRef(
363
+ Ye.displayName = se;
364
+ var O = "TooltipContent", qe = i.forwardRef(
370
365
  (e, n) => {
371
- const t = Bt(k, e.__scopeTooltip), { forceMount: o = t.forceMount, side: s = "top", ...a } = e, l = L(k, e.__scopeTooltip);
372
- return /* @__PURE__ */ r.jsx(S, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ r.jsx(qe, { side: s, ...a, ref: n }) : /* @__PURE__ */ r.jsx(Vt, { side: s, ...a, ref: n }) });
366
+ const t = zt(O, e.__scopeTooltip), { forceMount: o = t.forceMount, side: s = "top", ...a } = e, l = L(O, e.__scopeTooltip);
367
+ return /* @__PURE__ */ r.jsx(S, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ r.jsx(Ue, { side: s, ...a, ref: n }) : /* @__PURE__ */ r.jsx(Bt, { side: s, ...a, ref: n }) });
373
368
  }
374
- ), Vt = i.forwardRef((e, n) => {
375
- const t = L(k, e.__scopeTooltip), o = oe(k, e.__scopeTooltip), s = i.useRef(null), a = $(n, s), [l, u] = i.useState(null), { trigger: c, onClose: f } = t, d = s.current, { onPointerInTransitChange: p } = o, h = i.useCallback(() => {
369
+ ), Bt = i.forwardRef((e, n) => {
370
+ const t = L(O, e.__scopeTooltip), o = oe(O, e.__scopeTooltip), s = i.useRef(null), a = $(n, s), [l, u] = i.useState(null), { trigger: c, onClose: f } = t, d = s.current, { onPointerInTransitChange: p } = o, h = i.useCallback(() => {
376
371
  u(null), p(!1);
377
372
  }, [p]), x = i.useCallback(
378
373
  (g, C) => {
379
- const m = g.currentTarget, v = { x: g.clientX, y: g.clientY }, y = Xt(v, m.getBoundingClientRect()), D = Kt(v, y), E = Zt(C.getBoundingClientRect()), T = Qt([...D, ...E]);
374
+ const m = g.currentTarget, v = { x: g.clientX, y: g.clientY }, y = Ut(v, m.getBoundingClientRect()), E = Xt(v, y), D = Kt(C.getBoundingClientRect()), T = Jt([...E, ...D]);
380
375
  u(T), p(!0);
381
376
  },
382
377
  [p]
@@ -391,13 +386,13 @@ var k = "TooltipContent", Ve = i.forwardRef(
391
386
  }, [c, d, x, h]), i.useEffect(() => {
392
387
  if (l) {
393
388
  const g = (C) => {
394
- const m = C.target, v = { x: C.clientX, y: C.clientY }, y = c?.contains(m) || d?.contains(m), D = !Jt(v, l);
395
- y ? h() : D && (h(), f());
389
+ const m = C.target, v = { x: C.clientX, y: C.clientY }, y = c?.contains(m) || d?.contains(m), E = !Zt(v, l);
390
+ y ? h() : E && (h(), f());
396
391
  };
397
392
  return document.addEventListener("pointermove", g), () => document.removeEventListener("pointermove", g);
398
393
  }
399
- }, [c, d, l, f, h]), /* @__PURE__ */ r.jsx(qe, { ...e, ref: a });
400
- }), [qt, Yt] = U(A, { isInside: !1 }), Ut = dt("TooltipContent"), qe = i.forwardRef(
394
+ }, [c, d, l, f, h]), /* @__PURE__ */ r.jsx(Ue, { ...e, ref: a });
395
+ }), [Vt, Yt] = q(A, { isInside: !1 }), qt = pt("TooltipContent"), Ue = i.forwardRef(
401
396
  (e, n) => {
402
397
  const {
403
398
  __scopeTooltip: t,
@@ -406,8 +401,8 @@ var k = "TooltipContent", Ve = i.forwardRef(
406
401
  onEscapeKeyDown: a,
407
402
  onPointerDownOutside: l,
408
403
  ...u
409
- } = e, c = L(k, t), f = X(t), { onClose: d } = c;
410
- return i.useEffect(() => (document.addEventListener(Q, d), () => document.removeEventListener(Q, d)), [d]), i.useEffect(() => {
404
+ } = e, c = L(O, t), f = U(t), { onClose: d } = c;
405
+ return i.useEffect(() => (document.addEventListener(J, d), () => document.removeEventListener(J, d)), [d]), i.useEffect(() => {
411
406
  if (c.trigger) {
412
407
  const p = (h) => {
413
408
  h.target?.contains(c.trigger) && d();
@@ -415,7 +410,7 @@ var k = "TooltipContent", Ve = i.forwardRef(
415
410
  return window.addEventListener("scroll", p, { capture: !0 }), () => window.removeEventListener("scroll", p, { capture: !0 });
416
411
  }
417
412
  }, [c.trigger, d]), /* @__PURE__ */ r.jsx(
418
- xe,
413
+ he,
419
414
  {
420
415
  asChild: !0,
421
416
  disableOutsidePointerEvents: !1,
@@ -424,7 +419,7 @@ var k = "TooltipContent", Ve = i.forwardRef(
424
419
  onFocusOutside: (p) => p.preventDefault(),
425
420
  onDismiss: d,
426
421
  children: /* @__PURE__ */ r.jsxs(
427
- ct,
422
+ dt,
428
423
  {
429
424
  "data-state": c.stateAttribute,
430
425
  ...f,
@@ -439,8 +434,8 @@ var k = "TooltipContent", Ve = i.forwardRef(
439
434
  "--radix-tooltip-trigger-height": "var(--radix-popper-anchor-height)"
440
435
  },
441
436
  children: [
442
- /* @__PURE__ */ r.jsx(Ut, { children: o }),
443
- /* @__PURE__ */ r.jsx(qt, { scope: t, isInside: !0, children: /* @__PURE__ */ r.jsx(ut, { id: c.contentId, role: "tooltip", children: s || o }) })
437
+ /* @__PURE__ */ r.jsx(qt, { children: o }),
438
+ /* @__PURE__ */ r.jsx(Vt, { scope: t, isInside: !0, children: /* @__PURE__ */ r.jsx(ft, { id: c.contentId, role: "tooltip", children: s || o }) })
444
439
  ]
445
440
  }
446
441
  )
@@ -448,18 +443,18 @@ var k = "TooltipContent", Ve = i.forwardRef(
448
443
  );
449
444
  }
450
445
  );
451
- Ve.displayName = k;
452
- var Ye = "TooltipArrow", Ue = i.forwardRef(
446
+ qe.displayName = O;
447
+ var Xe = "TooltipArrow", Ke = i.forwardRef(
453
448
  (e, n) => {
454
- const { __scopeTooltip: t, ...o } = e, s = X(t);
449
+ const { __scopeTooltip: t, ...o } = e, s = U(t);
455
450
  return Yt(
456
- Ye,
451
+ Xe,
457
452
  t
458
- ).isInside ? null : /* @__PURE__ */ r.jsx(it, { ...s, ...o, ref: n });
453
+ ).isInside ? null : /* @__PURE__ */ r.jsx(ut, { ...s, ...o, ref: n });
459
454
  }
460
455
  );
461
- Ue.displayName = Ye;
462
- function Xt(e, n) {
456
+ Ke.displayName = Xe;
457
+ function Ut(e, n) {
463
458
  const t = Math.abs(n.top - e.y), o = Math.abs(n.bottom - e.y), s = Math.abs(n.right - e.x), a = Math.abs(n.left - e.x);
464
459
  switch (Math.min(t, o, s, a)) {
465
460
  case a:
@@ -474,7 +469,7 @@ function Xt(e, n) {
474
469
  throw new Error("unreachable");
475
470
  }
476
471
  }
477
- function Kt(e, n, t = 5) {
472
+ function Xt(e, n, t = 5) {
478
473
  const o = [];
479
474
  switch (n) {
480
475
  case "top":
@@ -504,7 +499,7 @@ function Kt(e, n, t = 5) {
504
499
  }
505
500
  return o;
506
501
  }
507
- function Zt(e) {
502
+ function Kt(e) {
508
503
  const { top: n, right: t, bottom: o, left: s } = e;
509
504
  return [
510
505
  { x: s, y: n },
@@ -513,7 +508,7 @@ function Zt(e) {
513
508
  { x: s, y: o }
514
509
  ];
515
510
  }
516
- function Jt(e, n) {
511
+ function Zt(e, n) {
517
512
  const { x: t, y: o } = e;
518
513
  let s = !1;
519
514
  for (let a = 0, l = n.length - 1; a < n.length; l = a++) {
@@ -522,11 +517,11 @@ function Jt(e, n) {
522
517
  }
523
518
  return s;
524
519
  }
525
- function Qt(e) {
520
+ function Jt(e) {
526
521
  const n = e.slice();
527
- return n.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), en(n);
522
+ return n.sort((t, o) => t.x < o.x ? -1 : t.x > o.x ? 1 : t.y < o.y ? -1 : t.y > o.y ? 1 : 0), Qt(n);
528
523
  }
529
- function en(e) {
524
+ function Qt(e) {
530
525
  if (e.length <= 1) return e.slice();
531
526
  const n = [];
532
527
  for (let o = 0; o < e.length; o++) {
@@ -551,8 +546,8 @@ function en(e) {
551
546
  }
552
547
  return t.pop(), n.length === 1 && t.length === 1 && n[0].x === t[0].x && n[0].y === t[0].y ? n : n.concat(t);
553
548
  }
554
- var tn = Ge, nn = We, rn = ze, on = Be, sn = Ve, an = Ue;
555
- function bn({
549
+ var en = ze, tn = Be, nn = Ve, rn = Ye, on = qe, sn = Ke;
550
+ function vn({
556
551
  open: e,
557
552
  onOpenChange: n,
558
553
  title: t,
@@ -563,30 +558,22 @@ function bn({
563
558
  className: u,
564
559
  contentClassName: c
565
560
  }) {
566
- return /* @__PURE__ */ r.jsx(Ot, { open: e, onOpenChange: n, children: /* @__PURE__ */ r.jsxs(At, { children: [
567
- /* @__PURE__ */ r.jsx(St, { className: "fixed inset-0 z-40 bg-black/70 backdrop-blur-[2px]" }),
561
+ return /* @__PURE__ */ r.jsx(At, { open: e, onOpenChange: n, children: /* @__PURE__ */ r.jsxs(St, { children: [
562
+ /* @__PURE__ */ r.jsx($t, { className: "fixed inset-0 z-40 bg-black/70 backdrop-blur-[2px]" }),
568
563
  /* @__PURE__ */ r.jsxs(
569
- $t,
564
+ Lt,
570
565
  {
571
566
  style: { maxWidth: a },
572
567
  className: `mt-surface-dialog fixed left-1/2 top-1/2 z-50 w-[92vw] max-h-[86vh] -translate-x-1/2 -translate-y-1/2 overflow-y-auto rounded-2xl p-6 shadow-[0_24px_80px_rgba(0,0,0,0.65)] focus:outline-none ${u || ""} ${c || ""}`,
573
568
  children: [
569
+ !t && /* @__PURE__ */ r.jsx(ue, { className: "sr-only", children: "Dialog" }),
570
+ !o && /* @__PURE__ */ r.jsx(de, { className: "sr-only", children: "Dialog content" }),
574
571
  (t || o || l) && /* @__PURE__ */ r.jsxs("div", { className: "mb-5 flex items-center gap-3 border-b pb-4", children: [
575
572
  (t || o) && /* @__PURE__ */ r.jsxs("div", { className: "min-w-0 flex-1", children: [
576
- t && /* @__PURE__ */ r.jsx(Lt, { className: "text-xl font-semibold flex items-center gap-2 before:content-none!", children: t }),
577
- o && /* @__PURE__ */ r.jsx(Ft, { className: "mt-2 text-sm", children: o })
573
+ t && /* @__PURE__ */ r.jsx(ue, { className: "text-xl font-semibold flex items-center gap-2 before:content-none!", children: t }),
574
+ o && /* @__PURE__ */ r.jsx(de, { className: "mt-2 text-sm", children: o })
578
575
  ] }),
579
- l && /* @__PURE__ */ r.jsx(Fe, { asChild: !0, children: /* @__PURE__ */ r.jsx(
580
- V,
581
- {
582
- kind: "icon",
583
- size: "large",
584
- variant: "ghost",
585
- "aria-label": "Close",
586
- className: "shrink-0",
587
- children: /* @__PURE__ */ r.jsx(q, { className: "h-4 w-4" })
588
- }
589
- ) })
576
+ l && /* @__PURE__ */ r.jsx(Ge, { asChild: !0, children: /* @__PURE__ */ r.jsx(B, { kind: "icon", size: "large", variant: "ghost", "aria-label": "Close", className: "shrink-0", children: /* @__PURE__ */ r.jsx(V, { className: "h-4 w-4" }) }) })
590
577
  ] }),
591
578
  s
592
579
  ]
@@ -594,15 +581,15 @@ function bn({
594
581
  )
595
582
  ] }) });
596
583
  }
597
- const Cn = Fe;
598
- function yn({ title: e, className: n }) {
584
+ const bn = Ge;
585
+ function Cn({ title: e, className: n }) {
599
586
  return e ? /* @__PURE__ */ r.jsxs("div", { className: `my-4 flex items-center gap-3 ${n || ""}`, children: [
600
587
  /* @__PURE__ */ r.jsx("div", { className: "h-px flex-1 bg-border-default" }),
601
588
  /* @__PURE__ */ r.jsx("span", { className: "text-xs uppercase tracking-wide text-text-muted", children: e }),
602
589
  /* @__PURE__ */ r.jsx("div", { className: "h-px flex-1 bg-border-default" })
603
590
  ] }) : /* @__PURE__ */ r.jsx("div", { className: `my-4 ${n || ""}`, children: /* @__PURE__ */ r.jsx("div", { className: "h-px w-full bg-border-default" }) });
604
591
  }
605
- function Nn({
592
+ function yn({
606
593
  children: e,
607
594
  message: n = "Copied",
608
595
  durationMs: t = 1400,
@@ -610,15 +597,15 @@ function Nn({
610
597
  align: s = "center",
611
598
  disabled: a = !1
612
599
  }) {
613
- const [l, u] = P(!1), c = ye(null), f = Z(() => {
600
+ const [l, u] = P(!1), c = je(null), f = K(() => {
614
601
  c.current && (clearTimeout(c.current), c.current = null);
615
- }, []), d = Z(() => {
602
+ }, []), d = K(() => {
616
603
  f(), u(!0), c.current = setTimeout(() => {
617
604
  u(!1), c.current = null;
618
605
  }, t);
619
606
  }, [f, t]);
620
- xt(() => f, [f]);
621
- const p = Z(
607
+ gt(() => f, [f]);
608
+ const p = K(
622
609
  (h) => {
623
610
  if (a) {
624
611
  u(!1);
@@ -632,10 +619,10 @@ function Nn({
632
619
  },
633
620
  [f, a, d]
634
621
  );
635
- return /* @__PURE__ */ r.jsxs(he, { open: l, onOpenChange: p, children: [
636
- /* @__PURE__ */ r.jsx(ge, { asChild: !0, children: e }),
637
- /* @__PURE__ */ r.jsx(ve, { children: /* @__PURE__ */ r.jsxs(
638
- be,
622
+ return /* @__PURE__ */ r.jsxs(ve, { open: l, onOpenChange: p, children: [
623
+ /* @__PURE__ */ r.jsx(be, { asChild: !0, children: e }),
624
+ /* @__PURE__ */ r.jsx(Ce, { children: /* @__PURE__ */ r.jsxs(
625
+ ye,
639
626
  {
640
627
  side: o,
641
628
  align: s,
@@ -645,13 +632,13 @@ function Nn({
645
632
  className: "pointer-events-none rounded-md border border-border-default bg-surface-subtle px-2 py-1 text-xs text-text-primary shadow-[0_10px_24px_rgba(0,0,0,0.45)] backdrop-blur-sm transition-all duration-150 data-[state=open]:opacity-100 data-[state=open]:translate-y-0 data-[state=closed]:opacity-0 data-[state=closed]:translate-y-1",
646
633
  children: [
647
634
  n,
648
- /* @__PURE__ */ r.jsx(Ce, { className: "fill-surface-subtle" })
635
+ /* @__PURE__ */ r.jsx(Ne, { className: "fill-surface-subtle" })
649
636
  ]
650
637
  }
651
638
  ) })
652
639
  ] });
653
640
  }
654
- function jn({ value: e, max: n = 100, className: t, barClassName: o }) {
641
+ function Nn({ value: e, max: n = 100, className: t, barClassName: o }) {
655
642
  const s = Math.min(Math.max(e, 0), n), a = n > 0 ? s / n * 100 : 0;
656
643
  return /* @__PURE__ */ r.jsx(
657
644
  "div",
@@ -671,7 +658,7 @@ function jn({ value: e, max: n = 100, className: t, barClassName: o }) {
671
658
  }
672
659
  );
673
660
  }
674
- function wn({
661
+ function jn({
675
662
  size: e = "medium",
676
663
  variant: n = "default",
677
664
  className: t,
@@ -680,12 +667,13 @@ function wn({
680
667
  placeholder: a = "Search",
681
668
  ...l
682
669
  }) {
683
- const u = ye(null), [c, f] = P(""), d = o !== void 0, p = d ? String(o ?? "") : c, h = {
670
+ const u = je(null), [c, f] = P(""), d = o !== void 0, p = d ? String(o ?? "") : c, h = {
684
671
  medium: "mt-layout-input-medium",
685
672
  large: "mt-layout-input-large"
686
673
  }, x = {
687
674
  default: "mt-surface-input-default",
688
- ghost: "mt-surface-input-ghost"
675
+ ghost: "mt-surface-input-ghost",
676
+ panel: "mt-surface-input-panel"
689
677
  }, g = e === "large" ? "h-4 w-4" : "h-3.5 w-3.5", C = "w-fit flex items-center gap-2 rounded", m = (y) => {
690
678
  d || f(y.target.value), s?.(y);
691
679
  }, v = () => {
@@ -696,7 +684,7 @@ function wn({
696
684
  {
697
685
  className: `relative pl-2 ${C} ${h[e]} ${x[n]} ${t || ""}`,
698
686
  children: [
699
- /* @__PURE__ */ r.jsx(ft, { className: `${g} shrink-0`, "aria-hidden": "true" }),
687
+ /* @__PURE__ */ r.jsx(xt, { className: `${g} shrink-0`, "aria-hidden": "true" }),
700
688
  /* @__PURE__ */ r.jsx(
701
689
  "input",
702
690
  {
@@ -710,7 +698,7 @@ function wn({
710
698
  }
711
699
  ),
712
700
  p.length > 0 && /* @__PURE__ */ r.jsx(
713
- V,
701
+ B,
714
702
  {
715
703
  kind: "icon",
716
704
  size: e,
@@ -718,21 +706,21 @@ function wn({
718
706
  onClick: v,
719
707
  className: "absolute right-2 shrink-0 w-5! h-5!",
720
708
  "aria-label": "Clear search",
721
- children: /* @__PURE__ */ r.jsx(q, { className: g })
709
+ children: /* @__PURE__ */ r.jsx(V, { className: g })
722
710
  }
723
711
  )
724
712
  ]
725
713
  }
726
714
  );
727
715
  }
728
- const Tn = ({ variant: e = "default", className: n, ...t }) => {
716
+ const wn = ({ variant: e = "default", className: n, ...t }) => {
729
717
  const o = {
730
718
  default: "mt-surface-input-default",
731
719
  ghost: "mt-surface-input-ghost"
732
720
  };
733
721
  return /* @__PURE__ */ r.jsx("textarea", { ...t, className: `w-full border rounded outline-none px-3 py-2 min-h-24 resize-y ${o[e]} ${n || ""}` });
734
722
  };
735
- function En({
723
+ function Tn({
736
724
  children: e,
737
725
  title: n,
738
726
  content: t,
@@ -742,10 +730,10 @@ function En({
742
730
  align: l = "center"
743
731
  }) {
744
732
  const [u, c] = P(!1);
745
- return /* @__PURE__ */ r.jsxs(he, { open: u, onOpenChange: c, children: [
746
- /* @__PURE__ */ r.jsx(ge, { asChild: !0, children: e }),
747
- /* @__PURE__ */ r.jsx(ve, { children: /* @__PURE__ */ r.jsxs(
748
- be,
733
+ return /* @__PURE__ */ r.jsxs(ve, { open: u, onOpenChange: c, children: [
734
+ /* @__PURE__ */ r.jsx(be, { asChild: !0, children: e }),
735
+ /* @__PURE__ */ r.jsx(Ce, { children: /* @__PURE__ */ r.jsxs(
736
+ ye,
749
737
  {
750
738
  side: a,
751
739
  align: l,
@@ -761,23 +749,23 @@ function En({
761
749
  "aria-label": "Close toggletip",
762
750
  onClick: () => c(!1),
763
751
  className: "inline-flex h-7 w-7 shrink-0 items-center justify-center rounded-full border border-border-default bg-surface-subtle text-text-muted transition-colors hover:bg-surface-default hover:text-text-default",
764
- children: /* @__PURE__ */ r.jsx(q, { className: "h-4 w-4" })
752
+ children: /* @__PURE__ */ r.jsx(V, { className: "h-4 w-4" })
765
753
  }
766
754
  )
767
755
  ] }),
768
756
  /* @__PURE__ */ r.jsx("div", { className: "mt-2 text-sm text-text-muted", children: t }),
769
757
  o && /* @__PURE__ */ r.jsx("div", { className: "mt-3 border-t border-border-default pt-2", children: o }),
770
- /* @__PURE__ */ r.jsx(Ce, { className: "fill-border-default" })
758
+ /* @__PURE__ */ r.jsx(Ne, { className: "fill-border-default" })
771
759
  ]
772
760
  }
773
761
  ) })
774
762
  ] });
775
763
  }
776
764
  function Dn(e) {
777
- return /* @__PURE__ */ r.jsx(tn, { delayDuration: 0, children: /* @__PURE__ */ r.jsxs(nn, { children: [
778
- /* @__PURE__ */ r.jsx(rn, { asChild: !0, children: e.children }),
779
- /* @__PURE__ */ r.jsx(on, { children: /* @__PURE__ */ r.jsxs(
780
- sn,
765
+ return /* @__PURE__ */ r.jsx(en, { delayDuration: 0, children: /* @__PURE__ */ r.jsxs(tn, { children: [
766
+ /* @__PURE__ */ r.jsx(nn, { asChild: !0, children: e.children }),
767
+ /* @__PURE__ */ r.jsx(rn, { children: /* @__PURE__ */ r.jsxs(
768
+ on,
781
769
  {
782
770
  className: "rounded p-2 border-[#222222] bg-[#111111]",
783
771
  side: e.side,
@@ -785,7 +773,7 @@ function Dn(e) {
785
773
  sideOffset: 5,
786
774
  children: [
787
775
  e.content,
788
- /* @__PURE__ */ r.jsx(an, { className: "TooltipArrow" })
776
+ /* @__PURE__ */ r.jsx(sn, { className: "TooltipArrow" })
789
777
  ]
790
778
  }
791
779
  ) })
@@ -795,15 +783,15 @@ function ae({ children: e }) {
795
783
  return /* @__PURE__ */ r.jsx(r.Fragment, { children: e });
796
784
  }
797
785
  ae.displayName = "MtTreeItem";
798
- function ln(e) {
799
- return je(e) && e.type === ae;
786
+ function an(e) {
787
+ return Te(e) && e.type === ae;
800
788
  }
801
- function Xe(e) {
789
+ function Ze(e) {
802
790
  const n = [];
803
- return Ne.forEach(e, (t) => {
804
- if (!ln(t))
791
+ return we.forEach(e, (t) => {
792
+ if (!an(t))
805
793
  return;
806
- const o = Xe(t.props.children);
794
+ const o = Ze(t.props.children);
807
795
  n.push({
808
796
  id: t.props.itemId,
809
797
  label: t.props.label,
@@ -815,18 +803,18 @@ function Xe(e) {
815
803
  });
816
804
  }), n;
817
805
  }
818
- function cn(e) {
806
+ function ln(e) {
819
807
  const n = [], t = (o) => {
820
808
  for (const s of o)
821
809
  n.push(s), s.children?.length && t(s.children);
822
810
  };
823
811
  return t(e), n;
824
812
  }
825
- function un(e, n, t) {
813
+ function cn(e, n, t) {
826
814
  const o = new Set(e);
827
815
  return !o.has(n) ? o.add(n) : o.delete(n), o;
828
816
  }
829
- const dn = ({
817
+ const un = ({
830
818
  items: e,
831
819
  children: n,
832
820
  className: t,
@@ -841,45 +829,45 @@ const dn = ({
841
829
  indentPx: p = 14,
842
830
  toggleOnItemClick: h = !0
843
831
  }) => {
844
- const x = o !== void 0, g = l !== void 0, [C, m] = P(s ?? ""), [v, y] = P(new Set(u)), D = x ? o : C, E = G(
832
+ const x = o !== void 0, g = l !== void 0, [C, m] = P(s ?? ""), [v, y] = P(new Set(u)), E = x ? o : C, D = G(
845
833
  () => g ? new Set(l) : v,
846
834
  [l, v, g]
847
- ), T = G(() => Xe(n), [n]), M = G(() => e?.length && T.length ? [...e, ...T] : e?.length ? e : T, [e, T]), F = G(() => new Map(cn(M).map((N) => [N.id, N])), [M]), Ke = (N) => {
848
- const _ = F.get(N) ?? null;
849
- x || m(N), a?.(N, _);
850
- }, Ze = (N) => {
835
+ ), T = G(() => Ze(n), [n]), R = G(() => e?.length && T.length ? [...e, ...T] : e?.length ? e : T, [e, T]), F = G(() => new Map(ln(R).map((N) => [N.id, N])), [R]), Je = (N) => {
836
+ const I = F.get(N) ?? null;
837
+ x || m(N), a?.(N, I);
838
+ }, Qe = (N) => {
851
839
  g || y(N), c?.(Array.from(N));
852
- }, le = (N, _) => {
853
- Ze(un(E, N));
854
- }, ie = (N, _) => /* @__PURE__ */ r.jsx("ul", { role: "group", className: "flex flex-col gap-0.5", children: N.map((b) => {
855
- const I = !!b.children?.length, H = I && E.has(b.id), K = D === b.id, Je = {
856
- isSelected: K,
840
+ }, le = (N, I) => {
841
+ Qe(cn(D, N));
842
+ }, ie = (N, I) => /* @__PURE__ */ r.jsx("ul", { role: "group", className: "flex flex-col gap-0.5", children: N.map((b) => {
843
+ const _ = !!b.children?.length, H = _ && D.has(b.id), X = E === b.id, et = {
844
+ isSelected: X,
857
845
  isExpanded: H,
858
- hasChildren: I,
859
- depth: _
846
+ hasChildren: _,
847
+ depth: I
860
848
  };
861
849
  return /* @__PURE__ */ r.jsxs("li", { role: "none", className: "flex flex-col", children: [
862
850
  /* @__PURE__ */ r.jsx(
863
- V,
851
+ B,
864
852
  {
865
853
  variant: "ghost",
866
- selected: K,
854
+ selected: X,
867
855
  role: "treeitem",
868
- "aria-expanded": I ? H : void 0,
869
- "aria-selected": K,
856
+ "aria-expanded": _ ? H : void 0,
857
+ "aria-selected": X,
870
858
  "aria-disabled": b.disabled || void 0,
871
859
  disabled: b.disabled,
872
860
  onClick: () => {
873
- f?.(b), Ke(b.id), I && h && le(b.id);
861
+ f?.(b), Je(b.id), _ && h && le(b.id);
874
862
  },
875
863
  className: "h-auto min-h-0 w-full items-center justify-start gap-1 py-1 pr-2 text-left",
876
- style: { paddingLeft: `${_ * p + 6}px` },
877
- children: d ? d(b, Je) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
878
- /* @__PURE__ */ r.jsx("span", { className: "inline-flex h-4 w-4 items-center justify-center text-text-muted", children: I ? /* @__PURE__ */ r.jsx(
879
- pt,
864
+ style: { paddingLeft: `${I * p + 6}px` },
865
+ children: d ? d(b, et) : /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
866
+ /* @__PURE__ */ r.jsx("span", { className: "inline-flex h-4 w-4 items-center justify-center text-text-muted", children: _ ? /* @__PURE__ */ r.jsx(
867
+ mt,
880
868
  {
881
- onClick: (Qe) => {
882
- Qe.stopPropagation(), le(b.id);
869
+ onClick: (tt) => {
870
+ tt.stopPropagation(), le(b.id);
883
871
  },
884
872
  className: `h-3.5 w-3.5 transition-transform ${H ? "rotate-90" : ""}`
885
873
  }
@@ -890,35 +878,35 @@ const dn = ({
890
878
  ] })
891
879
  }
892
880
  ),
893
- I && H && b.children ? ie(b.children, _ + 1) : null
881
+ _ && H && b.children ? ie(b.children, I + 1) : null
894
882
  ] }, b.id);
895
883
  }) });
896
- return /* @__PURE__ */ r.jsx("div", { role: "tree", className: `w-full ${t || ""}`, children: ie(M, 0) });
897
- }, fn = dn;
898
- fn.Item = ae;
899
- const pn = {
884
+ return /* @__PURE__ */ r.jsx("div", { role: "tree", className: `w-full ${t || ""}`, children: ie(R, 0) });
885
+ }, dn = un;
886
+ dn.Item = ae;
887
+ const fn = {
900
888
  success: {
901
- icon: bt,
889
+ icon: Ct,
902
890
  iconClassName: "text-status-success",
903
891
  borderClassName: "border-status-success"
904
892
  },
905
893
  info: {
906
- icon: jt,
894
+ icon: wt,
907
895
  iconClassName: "text-status-info",
908
896
  borderClassName: "border-status-info"
909
897
  },
910
898
  warning: {
911
- icon: gt,
899
+ icon: ht,
912
900
  iconClassName: "text-status-warning",
913
901
  borderClassName: "border-status-warning"
914
902
  },
915
903
  error: {
916
- icon: yt,
904
+ icon: Nt,
917
905
  iconClassName: "text-status-danger",
918
906
  borderClassName: "border-status-danger"
919
907
  }
920
908
  };
921
- function Rn({
909
+ function En({
922
910
  title: e,
923
911
  content: n,
924
912
  severity: t = "info",
@@ -926,43 +914,36 @@ function Rn({
926
914
  showCloseButton: s = !0,
927
915
  className: a
928
916
  }) {
929
- const [l, u] = P(!0), { icon: c, iconClassName: f, borderClassName: d } = pn[t];
930
- return l ? /* @__PURE__ */ r.jsx(
931
- "div",
932
- {
933
- role: "alert",
934
- className: `mt-surface-elevated p-3 border-2 ${d} ${a || ""}`,
935
- children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-start gap-3", children: [
936
- /* @__PURE__ */ r.jsx(c, { className: `mt-0.5 h-5 w-5 shrink-0 ${f}` }),
937
- /* @__PURE__ */ r.jsxs("div", { className: "min-w-0 flex-1", children: [
938
- /* @__PURE__ */ r.jsx("div", { className: "text-sm font-semibold", children: e }),
939
- /* @__PURE__ */ r.jsx("div", { className: "mt-1 text-sm", children: n }),
940
- o && /* @__PURE__ */ r.jsx("div", { className: "mt-3", children: o })
941
- ] }),
942
- s && /* @__PURE__ */ r.jsx(
943
- V,
944
- {
945
- kind: "icon",
946
- size: "medium",
947
- variant: "ghost",
948
- "aria-label": "Close alert",
949
- onClick: () => u(!1),
950
- className: "shrink-0",
951
- children: /* @__PURE__ */ r.jsx(q, { className: "h-4 w-4" })
952
- }
953
- )
954
- ] })
955
- }
956
- ) : null;
917
+ const [l, u] = P(!0), { icon: c, iconClassName: f, borderClassName: d } = fn[t];
918
+ return l ? /* @__PURE__ */ r.jsx("div", { role: "alert", className: `mt-surface-elevated p-3 border-2 ${d} ${a || ""}`, children: /* @__PURE__ */ r.jsxs("div", { className: "flex items-start gap-3", children: [
919
+ /* @__PURE__ */ r.jsx(c, { className: `mt-0.5 h-5 w-5 shrink-0 ${f}` }),
920
+ /* @__PURE__ */ r.jsxs("div", { className: "min-w-0 flex-1", children: [
921
+ /* @__PURE__ */ r.jsx("div", { className: "text-sm font-semibold", children: e }),
922
+ /* @__PURE__ */ r.jsx("div", { className: "mt-1 text-sm", children: n }),
923
+ o && /* @__PURE__ */ r.jsx("div", { className: "mt-3", children: o })
924
+ ] }),
925
+ s && /* @__PURE__ */ r.jsx(
926
+ B,
927
+ {
928
+ kind: "icon",
929
+ size: "medium",
930
+ variant: "ghost",
931
+ "aria-label": "Close alert",
932
+ onClick: () => u(!1),
933
+ className: "shrink-0",
934
+ children: /* @__PURE__ */ r.jsx(V, { className: "h-4 w-4" })
935
+ }
936
+ )
937
+ ] }) }) : null;
957
938
  }
958
- const J = "outline-3 outline-[#111]";
959
- function ue(...e) {
939
+ const Z = "outline-3 outline-[#111]";
940
+ function fe(...e) {
960
941
  return e.filter(Boolean).join(" ");
961
942
  }
962
- function xn(e) {
943
+ function pn(e) {
963
944
  return typeof e != "number" || Number.isNaN(e) || e < 0 ? Number.POSITIVE_INFINITY : Math.floor(e);
964
945
  }
965
- function mn(e) {
946
+ function xn(e) {
966
947
  return typeof e != "number" || Number.isNaN(e) ? -4 : e;
967
948
  }
968
949
  function Mn({
@@ -979,15 +960,15 @@ function Mn({
979
960
  {
980
961
  size: m.size ?? o,
981
962
  ...m,
982
- className: ue(J, m.className)
963
+ className: fe(Z, m.className)
983
964
  },
984
965
  `data-avatar-${v}`
985
- )), c = Ne.toArray(n).filter((m) => je(m)).map(
986
- (m, v) => mt(m, {
966
+ )), c = we.toArray(n).filter((m) => Te(m)).map(
967
+ (m, v) => vt(m, {
987
968
  key: m.key ?? `child-avatar-${v}`,
988
- className: ue(J, m.props.className)
969
+ className: fe(Z, m.props.className)
989
970
  })
990
- ), f = [...u, ...c], d = f.length, p = xn(t), h = mn(s), x = Math.min(d, p), g = Math.max(d - x, 0), C = f.slice(0, x);
971
+ ), f = [...u, ...c], d = f.length, p = pn(t), h = xn(s), x = Math.min(d, p), g = Math.max(d - x, 0), C = f.slice(0, x);
991
972
  return /* @__PURE__ */ r.jsxs("div", { className: ["inline-flex items-center", a].filter(Boolean).join(" "), ...l, children: [
992
973
  C.map((m, v) => /* @__PURE__ */ r.jsx(
993
974
  "div",
@@ -997,41 +978,47 @@ function Mn({
997
978
  },
998
979
  `visible-avatar-${v}`
999
980
  )),
1000
- g > 0 && /* @__PURE__ */ r.jsx("div", { style: { zIndex: 0, marginLeft: x > 0 ? h : 0 }, children: /* @__PURE__ */ r.jsx(ce, { size: o, initials: `+${g}`, alt: `${g} more`, className: J }) })
981
+ g > 0 && /* @__PURE__ */ r.jsx("div", { style: { zIndex: 0, marginLeft: x > 0 ? h : 0 }, children: /* @__PURE__ */ r.jsx(ce, { size: o, initials: `+${g}`, alt: `${g} more`, className: Z }) })
1001
982
  ] });
1002
983
  }
1003
984
  export {
1004
- Rn as MtAlert,
985
+ _n as ICON_MAP,
986
+ En as MtAlert,
1005
987
  ce as MtAvatar,
1006
988
  Mn as MtAvatarGroup,
1007
989
  Pn as MtBacklogIcon,
1008
- V as MtButton,
1009
- kn as MtCheckIcon,
1010
- On as MtCheckbox,
990
+ B as MtButton,
991
+ On as MtCheckIcon,
992
+ kn as MtCheckbox,
1011
993
  An as MtContextMenu,
1012
- bn as MtDialog,
1013
- Cn as MtDialogClose,
1014
- yn as MtDivider,
994
+ vn as MtDialog,
995
+ bn as MtDialogClose,
996
+ Cn as MtDivider,
1015
997
  Sn as MtDropdown,
1016
998
  $n as MtDropdownItem,
1017
999
  Ln as MtFilterDropdown,
1018
1000
  Fn as MtHighIcon,
1019
- Hn as MtInProgressIcon,
1020
- Nn as MtInlineToast,
1021
- Gn as MtInput,
1022
- Wn as MtLowIcon,
1023
- zn as MtMediumIcon,
1024
- Bn as MtOpenIcon,
1025
- Vn as MtPopover,
1026
- jn as MtProgress,
1027
- wn as MtSearch,
1028
- qn as MtSelect,
1029
- Yn as MtSelectItem,
1030
- Un as MtSortDropdown,
1031
- Xn as MtStack,
1032
- Tn as MtTextarea,
1033
- En as MtToggletip,
1001
+ Hn as MtIconPreview,
1002
+ Gn as MtIconSelect,
1003
+ Wn as MtInProgressIcon,
1004
+ yn as MtInlineToast,
1005
+ zn as MtInput,
1006
+ Bn as MtLowIcon,
1007
+ Vn as MtMediumIcon,
1008
+ Yn as MtOpenIcon,
1009
+ qn as MtPopover,
1010
+ Nn as MtProgress,
1011
+ jn as MtSearch,
1012
+ Un as MtSelect,
1013
+ Xn as MtSelectItem,
1014
+ Kn as MtSortDropdown,
1015
+ Zn as MtStack,
1016
+ Jn as MtSubgraphIcon,
1017
+ wn as MtTextarea,
1018
+ Qn as MtToastProvider,
1019
+ Tn as MtToggletip,
1034
1020
  Dn as MtTooltip,
1035
- fn as MtTree,
1036
- Kn as WithContextMenu
1021
+ dn as MtTree,
1022
+ er as WithContextMenu,
1023
+ tr as useMtToast
1037
1024
  };