@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.
- package/README.md +11 -4
- package/dist/MtIconSelect-CfmehFw5.js +7859 -0
- package/dist/MtIconSelect-D3hqMI_b.cjs +46 -0
- package/dist/components/matter/MtButton.d.ts +2 -2
- package/dist/components/matter/MtDropdown.d.ts +1 -1
- package/dist/components/matter/MtFilter.d.ts +6 -0
- package/dist/components/matter/MtIcon.d.ts +3 -0
- package/dist/components/matter/MtIconSelect.d.ts +19 -0
- package/dist/components/matter/MtInput.d.ts +1 -1
- package/dist/components/matter/MtSearch.d.ts +1 -1
- package/dist/components/matter/MtSelect.d.ts +1 -1
- package/dist/components/matter/MtToast.d.ts +31 -0
- package/dist/components/matter/experimental/collection/MtCollection.d.ts +41 -1
- package/dist/components/matter/experimental/collection/MtCollectionContext.d.ts +26 -3
- package/dist/components/matter/experimental/collection/MtCollectionEntryControls.d.ts +21 -5
- package/dist/components/matter/experimental/collection/MtCollectionEntryUtils.d.ts +24 -0
- package/dist/components/matter/experimental/collection/MtCollectionSelectionToolbar.d.ts +8 -0
- package/dist/components/matter/experimental/collection/MtCollectionTaskListEntry.d.ts +32 -1
- package/dist/components/matter/experimental/collection/MtCollectionToast.d.ts +10 -0
- package/dist/components/matter/experimental/collection/index.d.ts +2 -1
- package/dist/components/matter/experimental/collection/layouts/MtCollectionBoardLayout.d.ts +33 -0
- package/dist/components/matter/experimental/collection/layouts/MtCollectionPlanLayout.d.ts +2 -0
- package/dist/components/matter/experimental/collection/layouts/useBoardDnd.d.ts +40 -0
- package/dist/experimental.cjs +6 -2
- package/dist/experimental.js +6464 -1720
- package/dist/lib.d.ts +4 -1
- package/dist/matter.cjs +2 -2
- package/dist/matter.js +262 -275
- package/dist/styles.css +1 -1
- package/package.json +6 -1
package/dist/matter.js
CHANGED
|
@@ -1,27 +1,22 @@
|
|
|
1
|
-
import { c as
|
|
2
|
-
import {
|
|
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
|
|
5
|
-
const
|
|
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
|
-
],
|
|
14
|
-
const
|
|
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
|
-
],
|
|
19
|
-
const
|
|
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
|
-
],
|
|
24
|
-
var Y = "Dialog", [
|
|
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] =
|
|
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
|
-
|
|
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
|
-
|
|
56
|
-
var
|
|
50
|
+
Ee.displayName = Y;
|
|
51
|
+
var Me = "DialogTrigger", Dt = i.forwardRef(
|
|
57
52
|
(e, n) => {
|
|
58
|
-
const { __scopeDialog: t, ...o } = e, s = w(
|
|
53
|
+
const { __scopeDialog: t, ...o } = e, s = w(Me, t), a = $(n, s.triggerRef);
|
|
59
54
|
return /* @__PURE__ */ r.jsx(
|
|
60
|
-
|
|
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
|
-
|
|
75
|
-
var te = "DialogPortal", [Et,
|
|
69
|
+
Dt.displayName = Me;
|
|
70
|
+
var te = "DialogPortal", [Et, Re] = De(te, {
|
|
76
71
|
forceMount: void 0
|
|
77
|
-
}),
|
|
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(
|
|
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
|
-
|
|
82
|
-
var z = "DialogOverlay",
|
|
76
|
+
Ie.displayName = te;
|
|
77
|
+
var z = "DialogOverlay", _e = i.forwardRef(
|
|
83
78
|
(e, n) => {
|
|
84
|
-
const t =
|
|
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
|
-
|
|
89
|
-
var
|
|
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(
|
|
96
|
-
|
|
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
|
-
),
|
|
101
|
+
), M = "DialogContent", Pe = i.forwardRef(
|
|
107
102
|
(e, n) => {
|
|
108
|
-
const t =
|
|
109
|
-
return /* @__PURE__ */ r.jsx(S, { present: o || a.open, children: a.modal ? /* @__PURE__ */ r.jsx(
|
|
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
|
-
|
|
113
|
-
var
|
|
107
|
+
Pe.displayName = M;
|
|
108
|
+
var It = i.forwardRef(
|
|
114
109
|
(e, n) => {
|
|
115
|
-
const t = w(
|
|
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
|
|
113
|
+
if (a) return rt(a);
|
|
119
114
|
}, []), /* @__PURE__ */ r.jsx(
|
|
120
|
-
|
|
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(
|
|
137
|
+
const t = w(M, e.__scopeDialog), o = i.useRef(!1), s = i.useRef(!1);
|
|
143
138
|
return /* @__PURE__ */ r.jsx(
|
|
144
|
-
|
|
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
|
-
),
|
|
156
|
+
), Oe = i.forwardRef(
|
|
162
157
|
(e, n) => {
|
|
163
|
-
const { __scopeDialog: t, trapFocus: o, onOpenAutoFocus: s, onCloseAutoFocus: a, ...l } = e, u = w(
|
|
164
|
-
return
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
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",
|
|
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(
|
|
192
|
+
return /* @__PURE__ */ r.jsx(k.h2, { id: s.titleId, ...o, ref: n });
|
|
198
193
|
}
|
|
199
194
|
);
|
|
200
|
-
|
|
201
|
-
var
|
|
195
|
+
ke.displayName = ne;
|
|
196
|
+
var Ae = "DialogDescription", Se = i.forwardRef(
|
|
202
197
|
(e, n) => {
|
|
203
|
-
const { __scopeDialog: t, ...o } = e, s = w(
|
|
204
|
-
return /* @__PURE__ */ r.jsx(
|
|
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
|
-
|
|
208
|
-
var
|
|
202
|
+
Se.displayName = Ae;
|
|
203
|
+
var $e = "DialogClose", Le = i.forwardRef(
|
|
209
204
|
(e, n) => {
|
|
210
|
-
const { __scopeDialog: t, ...o } = e, s = w(
|
|
205
|
+
const { __scopeDialog: t, ...o } = e, s = w($e, t);
|
|
211
206
|
return /* @__PURE__ */ r.jsx(
|
|
212
|
-
|
|
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
|
-
|
|
217
|
+
Le.displayName = $e;
|
|
223
218
|
function re(e) {
|
|
224
219
|
return e ? "open" : "closed";
|
|
225
220
|
}
|
|
226
|
-
var
|
|
227
|
-
contentName:
|
|
221
|
+
var Fe = "DialogTitleWarning", [gn, He] = lt(Fe, {
|
|
222
|
+
contentName: M,
|
|
228
223
|
titleName: ne,
|
|
229
224
|
docsSlug: "dialog"
|
|
230
|
-
}),
|
|
231
|
-
const n =
|
|
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
|
-
},
|
|
240
|
-
const o = `Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${
|
|
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
|
-
},
|
|
246
|
-
|
|
247
|
-
]),
|
|
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 =
|
|
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
|
-
|
|
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
|
-
|
|
283
|
-
var A = "Tooltip", [
|
|
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 =
|
|
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(
|
|
291
|
+
F ? (c.onOpen(), document.dispatchEvent(new CustomEvent(J))) : c.onClose(), a?.(F);
|
|
297
292
|
},
|
|
298
293
|
caller: A
|
|
299
|
-
}),
|
|
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]),
|
|
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(
|
|
311
|
-
|
|
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:
|
|
311
|
+
stateAttribute: E,
|
|
317
312
|
trigger: d,
|
|
318
313
|
onTriggerChange: p,
|
|
319
314
|
onTriggerEnter: i.useCallback(() => {
|
|
320
|
-
c.isOpenDelayedRef.current ?
|
|
321
|
-
}, [c.isOpenDelayedRef,
|
|
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:
|
|
320
|
+
onOpen: D,
|
|
326
321
|
onClose: T,
|
|
327
322
|
disableHoverableContent: g,
|
|
328
323
|
children: t
|
|
329
324
|
}
|
|
330
325
|
) });
|
|
331
326
|
};
|
|
332
|
-
|
|
333
|
-
var
|
|
327
|
+
Be.displayName = A;
|
|
328
|
+
var Q = "TooltipTrigger", Ve = i.forwardRef(
|
|
334
329
|
(e, n) => {
|
|
335
|
-
const { __scopeTooltip: t, ...o } = e, s = L(
|
|
336
|
-
return i.useEffect(() => () => document.removeEventListener("pointerup", p), [p]), /* @__PURE__ */ r.jsx(
|
|
337
|
-
|
|
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
|
-
|
|
362
|
-
var se = "TooltipPortal", [
|
|
356
|
+
Ve.displayName = Q;
|
|
357
|
+
var se = "TooltipPortal", [Wt, zt] = q(se, {
|
|
363
358
|
forceMount: void 0
|
|
364
|
-
}),
|
|
359
|
+
}), Ye = (e) => {
|
|
365
360
|
const { __scopeTooltip: n, forceMount: t, children: o, container: s } = e, a = L(se, n);
|
|
366
|
-
return /* @__PURE__ */ r.jsx(
|
|
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
|
-
|
|
369
|
-
var
|
|
363
|
+
Ye.displayName = se;
|
|
364
|
+
var O = "TooltipContent", qe = i.forwardRef(
|
|
370
365
|
(e, n) => {
|
|
371
|
-
const t =
|
|
372
|
-
return /* @__PURE__ */ r.jsx(S, { present: o || l.open, children: l.disableHoverableContent ? /* @__PURE__ */ r.jsx(
|
|
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
|
-
),
|
|
375
|
-
const t = L(
|
|
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 =
|
|
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),
|
|
395
|
-
y ? h() :
|
|
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(
|
|
400
|
-
}), [
|
|
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(
|
|
410
|
-
return i.useEffect(() => (document.addEventListener(
|
|
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
|
-
|
|
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
|
-
|
|
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(
|
|
443
|
-
/* @__PURE__ */ r.jsx(
|
|
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
|
-
|
|
452
|
-
var
|
|
446
|
+
qe.displayName = O;
|
|
447
|
+
var Xe = "TooltipArrow", Ke = i.forwardRef(
|
|
453
448
|
(e, n) => {
|
|
454
|
-
const { __scopeTooltip: t, ...o } = e, s =
|
|
449
|
+
const { __scopeTooltip: t, ...o } = e, s = U(t);
|
|
455
450
|
return Yt(
|
|
456
|
-
|
|
451
|
+
Xe,
|
|
457
452
|
t
|
|
458
|
-
).isInside ? null : /* @__PURE__ */ r.jsx(
|
|
453
|
+
).isInside ? null : /* @__PURE__ */ r.jsx(ut, { ...s, ...o, ref: n });
|
|
459
454
|
}
|
|
460
455
|
);
|
|
461
|
-
|
|
462
|
-
function
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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),
|
|
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
|
|
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 =
|
|
555
|
-
function
|
|
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(
|
|
567
|
-
/* @__PURE__ */ r.jsx(
|
|
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
|
-
|
|
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(
|
|
577
|
-
o && /* @__PURE__ */ r.jsx(
|
|
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(
|
|
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
|
|
598
|
-
function
|
|
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
|
|
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 =
|
|
600
|
+
const [l, u] = P(!1), c = je(null), f = K(() => {
|
|
614
601
|
c.current && (clearTimeout(c.current), c.current = null);
|
|
615
|
-
}, []), d =
|
|
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
|
-
|
|
621
|
-
const p =
|
|
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(
|
|
636
|
-
/* @__PURE__ */ r.jsx(
|
|
637
|
-
/* @__PURE__ */ r.jsx(
|
|
638
|
-
|
|
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(
|
|
635
|
+
/* @__PURE__ */ r.jsx(Ne, { className: "fill-surface-subtle" })
|
|
649
636
|
]
|
|
650
637
|
}
|
|
651
638
|
) })
|
|
652
639
|
] });
|
|
653
640
|
}
|
|
654
|
-
function
|
|
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
|
|
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 =
|
|
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(
|
|
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
|
-
|
|
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(
|
|
709
|
+
children: /* @__PURE__ */ r.jsx(V, { className: g })
|
|
722
710
|
}
|
|
723
711
|
)
|
|
724
712
|
]
|
|
725
713
|
}
|
|
726
714
|
);
|
|
727
715
|
}
|
|
728
|
-
const
|
|
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
|
|
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(
|
|
746
|
-
/* @__PURE__ */ r.jsx(
|
|
747
|
-
/* @__PURE__ */ r.jsx(
|
|
748
|
-
|
|
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(
|
|
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(
|
|
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(
|
|
778
|
-
/* @__PURE__ */ r.jsx(
|
|
779
|
-
/* @__PURE__ */ r.jsx(
|
|
780
|
-
|
|
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(
|
|
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
|
|
799
|
-
return
|
|
786
|
+
function an(e) {
|
|
787
|
+
return Te(e) && e.type === ae;
|
|
800
788
|
}
|
|
801
|
-
function
|
|
789
|
+
function Ze(e) {
|
|
802
790
|
const n = [];
|
|
803
|
-
return
|
|
804
|
-
if (!
|
|
791
|
+
return we.forEach(e, (t) => {
|
|
792
|
+
if (!an(t))
|
|
805
793
|
return;
|
|
806
|
-
const o =
|
|
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
|
|
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
|
|
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
|
|
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)),
|
|
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(() =>
|
|
848
|
-
const
|
|
849
|
-
x || m(N), a?.(N,
|
|
850
|
-
},
|
|
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
|
-
|
|
854
|
-
}, ie = (N,
|
|
855
|
-
const
|
|
856
|
-
isSelected:
|
|
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:
|
|
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
|
-
|
|
851
|
+
B,
|
|
864
852
|
{
|
|
865
853
|
variant: "ghost",
|
|
866
|
-
selected:
|
|
854
|
+
selected: X,
|
|
867
855
|
role: "treeitem",
|
|
868
|
-
"aria-expanded":
|
|
869
|
-
"aria-selected":
|
|
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),
|
|
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: `${
|
|
877
|
-
children: d ? d(b,
|
|
878
|
-
/* @__PURE__ */ r.jsx("span", { className: "inline-flex h-4 w-4 items-center justify-center text-text-muted", children:
|
|
879
|
-
|
|
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: (
|
|
882
|
-
|
|
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
|
-
|
|
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(
|
|
897
|
-
},
|
|
898
|
-
|
|
899
|
-
const
|
|
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:
|
|
889
|
+
icon: Ct,
|
|
902
890
|
iconClassName: "text-status-success",
|
|
903
891
|
borderClassName: "border-status-success"
|
|
904
892
|
},
|
|
905
893
|
info: {
|
|
906
|
-
icon:
|
|
894
|
+
icon: wt,
|
|
907
895
|
iconClassName: "text-status-info",
|
|
908
896
|
borderClassName: "border-status-info"
|
|
909
897
|
},
|
|
910
898
|
warning: {
|
|
911
|
-
icon:
|
|
899
|
+
icon: ht,
|
|
912
900
|
iconClassName: "text-status-warning",
|
|
913
901
|
borderClassName: "border-status-warning"
|
|
914
902
|
},
|
|
915
903
|
error: {
|
|
916
|
-
icon:
|
|
904
|
+
icon: Nt,
|
|
917
905
|
iconClassName: "text-status-danger",
|
|
918
906
|
borderClassName: "border-status-danger"
|
|
919
907
|
}
|
|
920
908
|
};
|
|
921
|
-
function
|
|
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 } =
|
|
930
|
-
return l ? /* @__PURE__ */ r.jsx(
|
|
931
|
-
|
|
932
|
-
{
|
|
933
|
-
|
|
934
|
-
className:
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
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
|
|
959
|
-
function
|
|
939
|
+
const Z = "outline-3 outline-[#111]";
|
|
940
|
+
function fe(...e) {
|
|
960
941
|
return e.filter(Boolean).join(" ");
|
|
961
942
|
}
|
|
962
|
-
function
|
|
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
|
|
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:
|
|
963
|
+
className: fe(Z, m.className)
|
|
983
964
|
},
|
|
984
965
|
`data-avatar-${v}`
|
|
985
|
-
)), c =
|
|
986
|
-
(m, v) =>
|
|
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:
|
|
969
|
+
className: fe(Z, m.props.className)
|
|
989
970
|
})
|
|
990
|
-
), f = [...u, ...c], d = f.length, p =
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
990
|
+
B as MtButton,
|
|
991
|
+
On as MtCheckIcon,
|
|
992
|
+
kn as MtCheckbox,
|
|
1011
993
|
An as MtContextMenu,
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
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
|
|
1020
|
-
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
zn as
|
|
1024
|
-
Bn as
|
|
1025
|
-
Vn as
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
Un as
|
|
1031
|
-
Xn as
|
|
1032
|
-
|
|
1033
|
-
|
|
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
|
-
|
|
1036
|
-
|
|
1021
|
+
dn as MtTree,
|
|
1022
|
+
er as WithContextMenu,
|
|
1023
|
+
tr as useMtToast
|
|
1037
1024
|
};
|