@qtalo/qt-ui-library 0.1.18 → 0.1.19
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/dist/index.cjs +16 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +173 -7
- package/dist/index.js +990 -635
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/styles.css +15 -1
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
|
-
import { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
3
|
+
import { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useId, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
4
4
|
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
5
5
|
import { createPortal } from "react-dom";
|
|
6
6
|
import { tv } from "tailwind-variants";
|
|
@@ -326,20 +326,20 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
|
|
|
326
326
|
function createDOMPurify() {
|
|
327
327
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
|
|
328
328
|
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
|
|
329
|
-
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e,
|
|
329
|
+
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e, Uo = c.prototype, g = lookupGetter(Uo, "cloneNode"), O = lookupGetter(Uo, "remove"), Wo = lookupGetter(Uo, "nextSibling"), Go = lookupGetter(Uo, "childNodes"), Ko = lookupGetter(Uo, "parentNode");
|
|
330
330
|
if (typeof o == "function") {
|
|
331
331
|
let e = n.createElement("template");
|
|
332
332
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
333
333
|
}
|
|
334
|
-
let
|
|
335
|
-
t.isSupported = typeof entries == "function" && typeof
|
|
336
|
-
let { MUSTACHE_EXPR:
|
|
334
|
+
let A, R = "", { implementation: qo, createNodeIterator: Jo, createDocumentFragment: Yo, getElementsByTagName: Xo } = n, { importNode: Zo } = r, B = _createHooksMap();
|
|
335
|
+
t.isSupported = typeof entries == "function" && typeof Ko == "function" && qo && qo.createHTMLDocument !== void 0;
|
|
336
|
+
let { MUSTACHE_EXPR: Qo, ERB_EXPR: $o, TMPLIT_EXPR: es, DATA_ATTR: ts, ARIA_ATTR: ns, IS_SCRIPT_OR_DATA: rs, ATTR_WHITESPACE: is, CUSTOM_ELEMENT: as } = EXPRESSIONS, { IS_ALLOWED_URI: os } = EXPRESSIONS, V = null, ss = addToSet({}, [
|
|
337
337
|
...html$1,
|
|
338
338
|
...svg$1,
|
|
339
339
|
...svgFilters,
|
|
340
340
|
...mathMl$1,
|
|
341
341
|
...text
|
|
342
|
-
]),
|
|
342
|
+
]), cs = null, ls = addToSet({}, [
|
|
343
343
|
...html,
|
|
344
344
|
...svg,
|
|
345
345
|
...mathMl,
|
|
@@ -363,7 +363,7 @@ function createDOMPurify() {
|
|
|
363
363
|
enumerable: !0,
|
|
364
364
|
value: !1
|
|
365
365
|
}
|
|
366
|
-
})),
|
|
366
|
+
})), us = null, ds = null, fs = Object.seal(create(null, {
|
|
367
367
|
tagCheck: {
|
|
368
368
|
writable: !0,
|
|
369
369
|
configurable: !1,
|
|
@@ -376,7 +376,7 @@ function createDOMPurify() {
|
|
|
376
376
|
enumerable: !0,
|
|
377
377
|
value: null
|
|
378
378
|
}
|
|
379
|
-
})),
|
|
379
|
+
})), ps = !0, ms = !0, hs = !1, gs = !0, _s = !1, vs = !0, ys = !1, bs = !1, xs = !1, Ss = !1, Cs = !1, ws = !1, Ts = !0, Es = !1, Ds = !0, Os = !1, ks = {}, As = null, js = addToSet({}, [
|
|
380
380
|
"annotation-xml",
|
|
381
381
|
"audio",
|
|
382
382
|
"colgroup",
|
|
@@ -402,14 +402,14 @@ function createDOMPurify() {
|
|
|
402
402
|
"title",
|
|
403
403
|
"video",
|
|
404
404
|
"xmp"
|
|
405
|
-
]),
|
|
405
|
+
]), Ms = null, Ns = addToSet({}, [
|
|
406
406
|
"audio",
|
|
407
407
|
"video",
|
|
408
408
|
"img",
|
|
409
409
|
"source",
|
|
410
410
|
"image",
|
|
411
411
|
"track"
|
|
412
|
-
]),
|
|
412
|
+
]), Ps = null, Fs = addToSet({}, [
|
|
413
413
|
"alt",
|
|
414
414
|
"class",
|
|
415
415
|
"for",
|
|
@@ -424,58 +424,58 @@ function createDOMPurify() {
|
|
|
424
424
|
"value",
|
|
425
425
|
"style",
|
|
426
426
|
"xmlns"
|
|
427
|
-
]),
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
], stringToString),
|
|
427
|
+
]), Is = "http://www.w3.org/1998/Math/MathML", Ls = "http://www.w3.org/2000/svg", Rs = "http://www.w3.org/1999/xhtml", zs = Rs, Bs = !1, Vs = null, Hs = addToSet({}, [
|
|
428
|
+
Is,
|
|
429
|
+
Ls,
|
|
430
|
+
Rs
|
|
431
|
+
], stringToString), Us = addToSet({}, [
|
|
432
432
|
"mi",
|
|
433
433
|
"mo",
|
|
434
434
|
"mn",
|
|
435
435
|
"ms",
|
|
436
436
|
"mtext"
|
|
437
|
-
]),
|
|
437
|
+
]), Ws = addToSet({}, ["annotation-xml"]), Gs = addToSet({}, [
|
|
438
438
|
"title",
|
|
439
439
|
"style",
|
|
440
440
|
"font",
|
|
441
441
|
"a",
|
|
442
442
|
"script"
|
|
443
|
-
]),
|
|
443
|
+
]), Ks = null, qs = ["application/xhtml+xml", "text/html"], Y = null, Js = null, Ys = n.createElement("form"), Xs = function(e) {
|
|
444
444
|
return e instanceof RegExp || e instanceof Function;
|
|
445
|
-
},
|
|
445
|
+
}, Zs = function() {
|
|
446
446
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
447
|
-
if (!(
|
|
448
|
-
if ((!e || typeof e != "object") && (e = {}), e = clone(e),
|
|
447
|
+
if (!(Js && Js === e)) {
|
|
448
|
+
if ((!e || typeof e != "object") && (e = {}), e = clone(e), Ks = qs.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = Ks === "application/xhtml+xml" ? stringToString : stringToLowerCase, V = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : ss, cs = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : ls, Vs = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : Hs, Ps = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Fs), e.ADD_URI_SAFE_ATTR, Y) : Fs, Ms = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Ns), e.ADD_DATA_URI_TAGS, Y) : Ns, As = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : js, us = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), ds = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), ks = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, ps = e.ALLOW_ARIA_ATTR !== !1, ms = e.ALLOW_DATA_ATTR !== !1, hs = e.ALLOW_UNKNOWN_PROTOCOLS || !1, gs = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, _s = e.SAFE_FOR_TEMPLATES || !1, vs = e.SAFE_FOR_XML !== !1, ys = e.WHOLE_DOCUMENT || !1, Ss = e.RETURN_DOM || !1, Cs = e.RETURN_DOM_FRAGMENT || !1, ws = e.RETURN_TRUSTED_TYPE || !1, xs = e.FORCE_BODY || !1, Ts = e.SANITIZE_DOM !== !1, Es = e.SANITIZE_NAMED_PROPS || !1, Ds = e.KEEP_CONTENT !== !1, Os = e.IN_PLACE || !1, os = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, zs = e.NAMESPACE || Rs, Us = e.MATHML_TEXT_INTEGRATION_POINTS || Us, Ws = e.HTML_INTEGRATION_POINTS || Ws, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Xs(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Xs(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (H.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), _s && (ms = !1), Cs && (Ss = !0), ks && (V = addToSet({}, text), cs = [], ks.html === !0 && (addToSet(V, html$1), addToSet(cs, html)), ks.svg === !0 && (addToSet(V, svg$1), addToSet(cs, svg), addToSet(cs, xml)), ks.svgFilters === !0 && (addToSet(V, svgFilters), addToSet(cs, svg), addToSet(cs, xml)), ks.mathMl === !0 && (addToSet(V, mathMl$1), addToSet(cs, mathMl), addToSet(cs, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? fs.tagCheck = e.ADD_TAGS : (V === ss && (V = clone(V)), addToSet(V, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? fs.attributeCheck = e.ADD_ATTR : (cs === ls && (cs = clone(cs)), addToSet(cs, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Ps, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (As === js && (As = clone(As)), addToSet(As, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (As === js && (As = clone(As)), addToSet(As, e.ADD_FORBID_CONTENTS, Y)), Ds && (V["#text"] = !0), ys && addToSet(V, [
|
|
449
449
|
"html",
|
|
450
450
|
"head",
|
|
451
451
|
"body"
|
|
452
|
-
]),
|
|
452
|
+
]), V.table && (addToSet(V, ["tbody"]), delete us.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
453
453
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
454
454
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
455
|
-
|
|
456
|
-
} else
|
|
457
|
-
freeze && freeze(e),
|
|
455
|
+
A = e.TRUSTED_TYPES_POLICY, R = A.createHTML("");
|
|
456
|
+
} else A === void 0 && (A = _createTrustedTypesPolicy(h, i)), A !== null && typeof R == "string" && (R = A.createHTML(""));
|
|
457
|
+
freeze && freeze(e), Js = e;
|
|
458
458
|
}
|
|
459
|
-
},
|
|
459
|
+
}, Qs = addToSet({}, [
|
|
460
460
|
...svg$1,
|
|
461
461
|
...svgFilters,
|
|
462
462
|
...svgDisallowed
|
|
463
|
-
]),
|
|
464
|
-
let t =
|
|
463
|
+
]), $s = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), ec = function(e) {
|
|
464
|
+
let t = Ko(e);
|
|
465
465
|
(!t || !t.tagName) && (t = {
|
|
466
|
-
namespaceURI:
|
|
466
|
+
namespaceURI: zs,
|
|
467
467
|
tagName: "template"
|
|
468
468
|
});
|
|
469
469
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
470
|
-
return
|
|
471
|
-
},
|
|
470
|
+
return Vs[e.namespaceURI] ? e.namespaceURI === Ls ? t.namespaceURI === Rs ? n === "svg" : t.namespaceURI === Is ? n === "svg" && (r === "annotation-xml" || Us[r]) : !!Qs[n] : e.namespaceURI === Is ? t.namespaceURI === Rs ? n === "math" : t.namespaceURI === Ls ? n === "math" && Ws[r] : !!$s[n] : e.namespaceURI === Rs ? t.namespaceURI === Ls && !Ws[r] || t.namespaceURI === Is && !Us[r] ? !1 : !$s[n] && (Gs[n] || !Qs[n]) : !!(Ks === "application/xhtml+xml" && Vs[e.namespaceURI]) : !1;
|
|
471
|
+
}, tc = function(e) {
|
|
472
472
|
arrayPush(t.removed, { element: e });
|
|
473
473
|
try {
|
|
474
|
-
|
|
474
|
+
Ko(e).removeChild(e);
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
O(e);
|
|
477
477
|
}
|
|
478
|
-
},
|
|
478
|
+
}, nc = function(e, n) {
|
|
479
479
|
try {
|
|
480
480
|
arrayPush(t.removed, {
|
|
481
481
|
attribute: n.getAttributeNode(e),
|
|
@@ -487,196 +487,196 @@ function createDOMPurify() {
|
|
|
487
487
|
from: n
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
if (n.removeAttribute(e), e === "is") if (
|
|
491
|
-
|
|
490
|
+
if (n.removeAttribute(e), e === "is") if (Ss || Cs) try {
|
|
491
|
+
tc(n);
|
|
492
492
|
} catch {}
|
|
493
493
|
else try {
|
|
494
494
|
n.setAttribute(e, "");
|
|
495
495
|
} catch {}
|
|
496
|
-
},
|
|
496
|
+
}, rc = function(e) {
|
|
497
497
|
let t = null, r = null;
|
|
498
|
-
if (
|
|
498
|
+
if (xs) e = "<remove></remove>" + e;
|
|
499
499
|
else {
|
|
500
500
|
let t = stringMatch(e, /^[\r\n\t ]+/);
|
|
501
501
|
r = t && t[0];
|
|
502
502
|
}
|
|
503
|
-
|
|
504
|
-
let i =
|
|
505
|
-
if (
|
|
506
|
-
t = new p().parseFromString(i,
|
|
503
|
+
Ks === "application/xhtml+xml" && zs === Rs && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
504
|
+
let i = A ? A.createHTML(e) : e;
|
|
505
|
+
if (zs === Rs) try {
|
|
506
|
+
t = new p().parseFromString(i, Ks);
|
|
507
507
|
} catch {}
|
|
508
508
|
if (!t || !t.documentElement) {
|
|
509
|
-
t =
|
|
509
|
+
t = qo.createDocument(zs, "template", null);
|
|
510
510
|
try {
|
|
511
|
-
t.documentElement.innerHTML =
|
|
511
|
+
t.documentElement.innerHTML = Bs ? R : i;
|
|
512
512
|
} catch {}
|
|
513
513
|
}
|
|
514
514
|
let a = t.body || t.documentElement;
|
|
515
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
516
|
-
},
|
|
517
|
-
return
|
|
518
|
-
},
|
|
515
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), zs === Rs ? Xo.call(t, ys ? "html" : "body")[0] : ys ? t.documentElement : a;
|
|
516
|
+
}, ic = function(e) {
|
|
517
|
+
return Jo.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
518
|
+
}, ac = function(e) {
|
|
519
519
|
return e instanceof f && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
520
|
-
},
|
|
520
|
+
}, oc = function(e) {
|
|
521
521
|
return typeof s == "function" && e instanceof s;
|
|
522
522
|
};
|
|
523
|
-
function
|
|
523
|
+
function sc(e, n, r) {
|
|
524
524
|
arrayForEach(e, (e) => {
|
|
525
|
-
e.call(t, n, r,
|
|
525
|
+
e.call(t, n, r, Js);
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
let
|
|
528
|
+
let cc = function(e) {
|
|
529
529
|
let n = null;
|
|
530
|
-
if (
|
|
530
|
+
if (sc(B.beforeSanitizeElements, e, null), ac(e)) return tc(e), !0;
|
|
531
531
|
let r = Y(e.nodeName);
|
|
532
|
-
if (
|
|
532
|
+
if (sc(B.uponSanitizeElement, e, {
|
|
533
533
|
tagName: r,
|
|
534
|
-
allowedTags:
|
|
535
|
-
}),
|
|
536
|
-
if (!(
|
|
537
|
-
if (!
|
|
538
|
-
if (
|
|
539
|
-
let t =
|
|
534
|
+
allowedTags: V
|
|
535
|
+
}), vs && e.hasChildNodes() && !oc(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || vs && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return tc(e), !0;
|
|
536
|
+
if (!(fs.tagCheck instanceof Function && fs.tagCheck(r)) && (!V[r] || us[r])) {
|
|
537
|
+
if (!us[r] && uc(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
|
|
538
|
+
if (Ds && !As[r]) {
|
|
539
|
+
let t = Ko(e) || e.parentNode, n = Go(e) || e.childNodes;
|
|
540
540
|
if (n && t) {
|
|
541
541
|
let r = n.length;
|
|
542
542
|
for (let i = r - 1; i >= 0; --i) {
|
|
543
|
-
let r =
|
|
544
|
-
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r,
|
|
543
|
+
let r = g(n[i], !0);
|
|
544
|
+
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, Wo(e));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
return
|
|
548
|
+
return tc(e), !0;
|
|
549
549
|
}
|
|
550
|
-
return e instanceof c && !
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
return e instanceof c && !ec(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (tc(e), !0) : (_s && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
|
|
551
|
+
Qo,
|
|
552
|
+
$o,
|
|
553
|
+
es
|
|
554
554
|
], (e) => {
|
|
555
555
|
n = stringReplace(n, e, " ");
|
|
556
|
-
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)),
|
|
557
|
-
},
|
|
558
|
-
if (
|
|
559
|
-
if (!(
|
|
560
|
-
if (!
|
|
561
|
-
if (!(
|
|
562
|
-
} else if (!
|
|
556
|
+
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), sc(B.afterSanitizeElements, e, null), !1);
|
|
557
|
+
}, lc = function(e, t, r) {
|
|
558
|
+
if (Ts && (t === "id" || t === "name") && (r in n || r in Ys)) return !1;
|
|
559
|
+
if (!(ms && !ds[t] && regExpTest(ts, t)) && !(ps && regExpTest(ns, t)) && !(fs.attributeCheck instanceof Function && fs.attributeCheck(t, e))) {
|
|
560
|
+
if (!cs[t] || ds[t]) {
|
|
561
|
+
if (!(uc(e) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, e) || H.tagNameCheck instanceof Function && H.tagNameCheck(e)) && (H.attributeNameCheck instanceof RegExp && regExpTest(H.attributeNameCheck, t) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(t, e)) || t === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r)))) return !1;
|
|
562
|
+
} else if (!Ps[t] && !regExpTest(os, stringReplace(r, is, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Ms[e]) && !(hs && !regExpTest(rs, stringReplace(r, is, ""))) && r) return !1;
|
|
563
563
|
}
|
|
564
564
|
return !0;
|
|
565
|
-
},
|
|
566
|
-
return e !== "annotation-xml" && stringMatch(e,
|
|
567
|
-
},
|
|
568
|
-
|
|
565
|
+
}, uc = function(e) {
|
|
566
|
+
return e !== "annotation-xml" && stringMatch(e, as);
|
|
567
|
+
}, dc = function(e) {
|
|
568
|
+
sc(B.beforeSanitizeAttributes, e, null);
|
|
569
569
|
let { attributes: n } = e;
|
|
570
|
-
if (!n ||
|
|
570
|
+
if (!n || ac(e)) return;
|
|
571
571
|
let r = {
|
|
572
572
|
attrName: "",
|
|
573
573
|
attrValue: "",
|
|
574
574
|
keepAttr: !0,
|
|
575
|
-
allowedAttributes:
|
|
575
|
+
allowedAttributes: cs,
|
|
576
576
|
forceKeepAttr: void 0
|
|
577
577
|
}, i = n.length;
|
|
578
578
|
for (; i--;) {
|
|
579
579
|
let { name: a, namespaceURI: o, value: s } = n[i], c = Y(a), l = s, u = a === "value" ? l : stringTrim(l);
|
|
580
|
-
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0,
|
|
581
|
-
|
|
580
|
+
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, sc(B.uponSanitizeAttribute, e, r), u = r.attrValue, Es && (c === "id" || c === "name") && (nc(a, e), u = "user-content-" + u), vs && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
581
|
+
nc(a, e);
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
584
584
|
if (c === "attributename" && stringMatch(u, "href")) {
|
|
585
|
-
|
|
585
|
+
nc(a, e);
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
588
|
if (r.forceKeepAttr) continue;
|
|
589
589
|
if (!r.keepAttr) {
|
|
590
|
-
|
|
590
|
+
nc(a, e);
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
|
-
if (!
|
|
594
|
-
|
|
593
|
+
if (!gs && regExpTest(/\/>/i, u)) {
|
|
594
|
+
nc(a, e);
|
|
595
595
|
continue;
|
|
596
596
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
_s && arrayForEach([
|
|
598
|
+
Qo,
|
|
599
|
+
$o,
|
|
600
|
+
es
|
|
601
601
|
], (e) => {
|
|
602
602
|
u = stringReplace(u, e, " ");
|
|
603
603
|
});
|
|
604
604
|
let f = Y(e.nodeName);
|
|
605
|
-
if (!
|
|
606
|
-
|
|
605
|
+
if (!lc(f, c, u)) {
|
|
606
|
+
nc(a, e);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
|
-
if (
|
|
609
|
+
if (A && typeof h == "object" && typeof h.getAttributeType == "function" && !o) switch (h.getAttributeType(f, c)) {
|
|
610
610
|
case "TrustedHTML":
|
|
611
|
-
u =
|
|
611
|
+
u = A.createHTML(u);
|
|
612
612
|
break;
|
|
613
613
|
case "TrustedScriptURL":
|
|
614
|
-
u =
|
|
614
|
+
u = A.createScriptURL(u);
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
if (u !== l) try {
|
|
618
|
-
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u),
|
|
618
|
+
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), ac(e) ? tc(e) : arrayPop(t.removed);
|
|
619
619
|
} catch {
|
|
620
|
-
|
|
620
|
+
nc(a, e);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
|
|
624
|
-
},
|
|
625
|
-
let n = null, r =
|
|
626
|
-
for (
|
|
627
|
-
|
|
623
|
+
sc(B.afterSanitizeAttributes, e, null);
|
|
624
|
+
}, fc = function e(t) {
|
|
625
|
+
let n = null, r = ic(t);
|
|
626
|
+
for (sc(B.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) sc(B.uponSanitizeShadowNode, n, null), cc(n), dc(n), n.content instanceof a && e(n.content);
|
|
627
|
+
sc(B.afterSanitizeShadowDOM, t, null);
|
|
628
628
|
};
|
|
629
629
|
return t.sanitize = function(e) {
|
|
630
630
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
|
|
631
|
-
if (
|
|
631
|
+
if (Bs = !e, Bs && (e = "<!-->"), typeof e != "string" && !oc(e)) if (typeof e.toString == "function") {
|
|
632
632
|
if (e = e.toString(), typeof e != "string") throw typeErrorCreate("dirty is not a string, aborting");
|
|
633
633
|
} else throw typeErrorCreate("toString is not a function");
|
|
634
634
|
if (!t.isSupported) return e;
|
|
635
|
-
if (
|
|
635
|
+
if (bs || Zs(n), t.removed = [], typeof e == "string" && (Os = !1), Os) {
|
|
636
636
|
if (e.nodeName) {
|
|
637
637
|
let t = Y(e.nodeName);
|
|
638
|
-
if (!
|
|
638
|
+
if (!V[t] || us[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
639
639
|
}
|
|
640
|
-
} else if (e instanceof s) i =
|
|
640
|
+
} else if (e instanceof s) i = rc("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
|
|
641
641
|
else {
|
|
642
|
-
if (!
|
|
643
|
-
if (i =
|
|
642
|
+
if (!Ss && !_s && !ys && e.indexOf("<") === -1) return A && ws ? A.createHTML(e) : e;
|
|
643
|
+
if (i = rc(e), !i) return Ss ? null : ws ? R : "";
|
|
644
644
|
}
|
|
645
|
-
i &&
|
|
646
|
-
let u =
|
|
647
|
-
for (; c = u.nextNode();)
|
|
648
|
-
if (
|
|
649
|
-
if (
|
|
650
|
-
if (
|
|
645
|
+
i && xs && tc(i.firstChild);
|
|
646
|
+
let u = ic(Os ? e : i);
|
|
647
|
+
for (; c = u.nextNode();) cc(c), dc(c), c.content instanceof a && fc(c.content);
|
|
648
|
+
if (Os) return e;
|
|
649
|
+
if (Ss) {
|
|
650
|
+
if (Cs) for (l = Yo.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
651
651
|
else l = i;
|
|
652
|
-
return (
|
|
652
|
+
return (cs.shadowroot || cs.shadowrootmode) && (l = Zo.call(r, l, !0)), l;
|
|
653
653
|
}
|
|
654
|
-
let f =
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
654
|
+
let f = ys ? i.outerHTML : i.innerHTML;
|
|
655
|
+
return ys && V["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), _s && arrayForEach([
|
|
656
|
+
Qo,
|
|
657
|
+
$o,
|
|
658
|
+
es
|
|
659
659
|
], (e) => {
|
|
660
660
|
f = stringReplace(f, e, " ");
|
|
661
|
-
}),
|
|
661
|
+
}), A && ws ? A.createHTML(f) : f;
|
|
662
662
|
}, t.setConfig = function() {
|
|
663
|
-
|
|
663
|
+
Zs(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), bs = !0;
|
|
664
664
|
}, t.clearConfig = function() {
|
|
665
|
-
|
|
665
|
+
Js = null, bs = !1;
|
|
666
666
|
}, t.isValidAttribute = function(e, t, n) {
|
|
667
|
-
return
|
|
667
|
+
return Js || Zs({}), lc(Y(e), Y(t), n);
|
|
668
668
|
}, t.addHook = function(e, t) {
|
|
669
|
-
typeof t == "function" && arrayPush(
|
|
669
|
+
typeof t == "function" && arrayPush(B[e], t);
|
|
670
670
|
}, t.removeHook = function(e, t) {
|
|
671
671
|
if (t !== void 0) {
|
|
672
|
-
let n = arrayLastIndexOf(
|
|
673
|
-
return n === -1 ? void 0 : arraySplice(
|
|
672
|
+
let n = arrayLastIndexOf(B[e], t);
|
|
673
|
+
return n === -1 ? void 0 : arraySplice(B[e], n, 1)[0];
|
|
674
674
|
}
|
|
675
|
-
return arrayPop(
|
|
675
|
+
return arrayPop(B[e]);
|
|
676
676
|
}, t.removeHooks = function(e) {
|
|
677
|
-
|
|
677
|
+
B[e] = [];
|
|
678
678
|
}, t.removeAllHooks = function() {
|
|
679
|
-
|
|
679
|
+
B = _createHooksMap();
|
|
680
680
|
}, t;
|
|
681
681
|
}
|
|
682
682
|
var purify = createDOMPurify();
|
|
@@ -21328,33 +21328,33 @@ function Button({ className: e, children: t, ...n }) {
|
|
|
21328
21328
|
});
|
|
21329
21329
|
}
|
|
21330
21330
|
function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, indeterminateIcon: i, onChange: a, disabled: o, children: s, className: c }) {
|
|
21331
|
-
let u = useRef(null), [f,
|
|
21331
|
+
let u = useRef(null), [f, p] = useState(t ?? !1), g = e ?? f;
|
|
21332
21332
|
useEffect(() => {
|
|
21333
21333
|
u.current && (u.current.indeterminate = !!r);
|
|
21334
21334
|
}, [r]);
|
|
21335
|
-
function
|
|
21335
|
+
function O(t) {
|
|
21336
21336
|
let n = t.target.checked;
|
|
21337
|
-
e === void 0 &&
|
|
21337
|
+
e === void 0 && p(n), a?.(n);
|
|
21338
21338
|
}
|
|
21339
21339
|
return /* @__PURE__ */ jsxs("label", {
|
|
21340
|
-
className: cn("relative inline-flex w-fit cursor-pointer items-center
|
|
21340
|
+
className: cn("gap-2 relative inline-flex w-fit cursor-pointer items-center select-none", o && "pointer-events-none opacity-50", c),
|
|
21341
21341
|
children: [
|
|
21342
21342
|
/* @__PURE__ */ jsx("input", {
|
|
21343
21343
|
ref: u,
|
|
21344
21344
|
type: "checkbox",
|
|
21345
|
-
className: cn("absolute h-px w-px overflow-hidden
|
|
21345
|
+
className: cn("p-0 absolute h-px w-px overflow-hidden whitespace-nowrap", "[clip-path:inset(50%)]", "border-0"),
|
|
21346
21346
|
disabled: o,
|
|
21347
|
-
onChange:
|
|
21347
|
+
onChange: O,
|
|
21348
21348
|
...e === void 0 ? { defaultChecked: t } : { checked: e }
|
|
21349
21349
|
}),
|
|
21350
21350
|
/* @__PURE__ */ jsx("span", {
|
|
21351
21351
|
role: "checkbox",
|
|
21352
|
-
"aria-checked": r ? "mixed" :
|
|
21352
|
+
"aria-checked": r ? "mixed" : g,
|
|
21353
21353
|
tabIndex: -1,
|
|
21354
|
-
"data-state": r ? "indeterminate" :
|
|
21354
|
+
"data-state": r ? "indeterminate" : g ? "checked" : "unchecked",
|
|
21355
21355
|
className: "checkbox-box inline-flex items-center justify-center",
|
|
21356
21356
|
children: /* @__PURE__ */ jsx("span", {
|
|
21357
|
-
className: cn("checkbox-icon", !(
|
|
21357
|
+
className: cn("checkbox-icon", !(g || r) && "opacity-0"),
|
|
21358
21358
|
children: r ? i ?? "—" : n ?? "✓"
|
|
21359
21359
|
})
|
|
21360
21360
|
}),
|
|
@@ -21371,60 +21371,75 @@ function useDropdown() {
|
|
|
21371
21371
|
if (!e) throw Error("useDropdown must be used inside Dropdown");
|
|
21372
21372
|
return e;
|
|
21373
21373
|
}
|
|
21374
|
-
function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1 }) {
|
|
21375
|
-
let [
|
|
21376
|
-
|
|
21377
|
-
|
|
21378
|
-
|
|
21374
|
+
function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1, openOnHover: c = !0, open: u, onOpenChange: p }) {
|
|
21375
|
+
let g = u !== void 0, [O, A] = useState(!1), R = g ? u : O, qo = useCallback((e) => {
|
|
21376
|
+
e !== R && (g || A(e), p?.(e));
|
|
21377
|
+
}, [
|
|
21378
|
+
R,
|
|
21379
|
+
g,
|
|
21380
|
+
p
|
|
21381
|
+
]), Jo = useRef(null), Yo = useRef(null), Xo = useRef(null), [Zo, B] = useState(null), Qo = useCallback(() => {
|
|
21382
|
+
if (!Jo.current || !Yo.current) return;
|
|
21383
|
+
let e = Jo.current.getBoundingClientRect(), t = Yo.current.getBoundingClientRect(), o = e.left;
|
|
21379
21384
|
n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
|
|
21380
|
-
let
|
|
21381
|
-
|
|
21382
|
-
top:
|
|
21385
|
+
let s;
|
|
21386
|
+
s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => B({
|
|
21387
|
+
top: s,
|
|
21383
21388
|
left: o
|
|
21384
21389
|
}));
|
|
21385
21390
|
}, [
|
|
21386
|
-
s,
|
|
21387
21391
|
n,
|
|
21388
21392
|
r,
|
|
21389
21393
|
i,
|
|
21390
21394
|
a
|
|
21391
21395
|
]);
|
|
21392
|
-
|
|
21393
|
-
|
|
21394
|
-
}
|
|
21395
|
-
|
|
21396
|
-
|
|
21397
|
-
|
|
21396
|
+
useLayoutEffect(() => {
|
|
21397
|
+
R && Qo();
|
|
21398
|
+
}, [R, Qo]), useEffect(() => {
|
|
21399
|
+
if (!R) return;
|
|
21400
|
+
let e = () => Qo();
|
|
21401
|
+
return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
21402
|
+
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
21403
|
+
};
|
|
21404
|
+
}, [R, Qo]);
|
|
21405
|
+
let $o = useCallback(() => {
|
|
21406
|
+
Xo.current &&= (clearTimeout(Xo.current), null), qo(!0);
|
|
21407
|
+
}, [qo]), es = useCallback(() => {
|
|
21408
|
+
Xo.current = window.setTimeout(() => {
|
|
21409
|
+
qo(!1);
|
|
21398
21410
|
}, 120);
|
|
21399
|
-
}
|
|
21411
|
+
}, [qo]);
|
|
21400
21412
|
return useEffect(() => {
|
|
21401
21413
|
function e(e) {
|
|
21402
21414
|
let t = e.target;
|
|
21403
|
-
|
|
21415
|
+
Jo.current?.contains(t) || Yo.current?.contains(t) || qo(!1);
|
|
21404
21416
|
}
|
|
21405
21417
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21406
|
-
}, []), useEffect(() => () => {
|
|
21407
|
-
|
|
21418
|
+
}, [qo]), useEffect(() => () => {
|
|
21419
|
+
Xo.current && clearTimeout(Xo.current);
|
|
21408
21420
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21409
|
-
value: {
|
|
21421
|
+
value: {
|
|
21422
|
+
close: () => qo(!1),
|
|
21423
|
+
open: $o
|
|
21424
|
+
},
|
|
21410
21425
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21411
|
-
ref:
|
|
21426
|
+
ref: Jo,
|
|
21412
21427
|
className: "inline-flex",
|
|
21413
|
-
onMouseEnter:
|
|
21414
|
-
onMouseLeave:
|
|
21415
|
-
onClick: () =>
|
|
21428
|
+
onMouseEnter: c ? $o : void 0,
|
|
21429
|
+
onMouseLeave: c ? es : void 0,
|
|
21430
|
+
onClick: () => qo(!R),
|
|
21416
21431
|
"aria-haspopup": "menu",
|
|
21417
|
-
"aria-expanded":
|
|
21432
|
+
"aria-expanded": R,
|
|
21418
21433
|
children: e
|
|
21419
|
-
}),
|
|
21420
|
-
ref:
|
|
21421
|
-
onMouseEnter:
|
|
21422
|
-
onMouseLeave:
|
|
21434
|
+
}), R && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21435
|
+
ref: Yo,
|
|
21436
|
+
onMouseEnter: c ? $o : void 0,
|
|
21437
|
+
onMouseLeave: c ? es : void 0,
|
|
21423
21438
|
style: {
|
|
21424
21439
|
position: "fixed",
|
|
21425
|
-
top:
|
|
21426
|
-
left:
|
|
21427
|
-
visibility:
|
|
21440
|
+
top: Zo?.top ?? 0,
|
|
21441
|
+
left: Zo?.left ?? 0,
|
|
21442
|
+
visibility: Zo ? "visible" : "hidden",
|
|
21428
21443
|
zIndex: 1e3
|
|
21429
21444
|
},
|
|
21430
21445
|
children: t
|
|
@@ -21433,11 +21448,11 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21433
21448
|
}
|
|
21434
21449
|
function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1, error: i = !1, placeholder: a, onChange: o, onKeyDown: s, className: c }) {
|
|
21435
21450
|
let [l, u] = useState(n ?? ""), f = t !== void 0, p = f ? t : l;
|
|
21436
|
-
function
|
|
21451
|
+
function h(e) {
|
|
21437
21452
|
let t = e.target.value;
|
|
21438
21453
|
f || u(t), o?.(t);
|
|
21439
21454
|
}
|
|
21440
|
-
function
|
|
21455
|
+
function g(e) {
|
|
21441
21456
|
s?.(e);
|
|
21442
21457
|
}
|
|
21443
21458
|
return /* @__PURE__ */ jsx("input", {
|
|
@@ -21447,8 +21462,8 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21447
21462
|
disabled: r,
|
|
21448
21463
|
"aria-disabled": r || void 0,
|
|
21449
21464
|
"aria-invalid": i || void 0,
|
|
21450
|
-
onChange:
|
|
21451
|
-
onKeyDown:
|
|
21465
|
+
onChange: h,
|
|
21466
|
+
onKeyDown: g,
|
|
21452
21467
|
className: cn("bg-transparent outline-none", r && "pointer-events-none", c)
|
|
21453
21468
|
});
|
|
21454
21469
|
}
|
|
@@ -21486,17 +21501,17 @@ function getVerticalAlign(e, t, n) {
|
|
|
21486
21501
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21487
21502
|
}
|
|
21488
21503
|
function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
|
|
21489
|
-
let a = useRef(null), o = useRef(null), s = useRef(null), [c,
|
|
21504
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, g] = useState(null), A = () => {
|
|
21490
21505
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21491
|
-
|
|
21506
|
+
u(!0);
|
|
21492
21507
|
}, r);
|
|
21493
|
-
},
|
|
21494
|
-
s.current &&= (clearTimeout(s.current), null),
|
|
21508
|
+
}, R = () => {
|
|
21509
|
+
s.current &&= (clearTimeout(s.current), null), u(!1);
|
|
21495
21510
|
};
|
|
21496
21511
|
return useLayoutEffect(() => {
|
|
21497
21512
|
if (!c || !a.current || !o.current) return;
|
|
21498
21513
|
let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
|
|
21499
|
-
r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)),
|
|
21514
|
+
r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), g((e) => e && e.top === l && e.left === u ? e : {
|
|
21500
21515
|
top: l,
|
|
21501
21516
|
left: u
|
|
21502
21517
|
});
|
|
@@ -21505,19 +21520,19 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
|
|
|
21505
21520
|
}, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
21506
21521
|
ref: a,
|
|
21507
21522
|
className: "inline-flex",
|
|
21508
|
-
onMouseEnter:
|
|
21509
|
-
onMouseLeave:
|
|
21510
|
-
onFocus:
|
|
21511
|
-
onBlur:
|
|
21523
|
+
onMouseEnter: A,
|
|
21524
|
+
onMouseLeave: R,
|
|
21525
|
+
onFocus: A,
|
|
21526
|
+
onBlur: R,
|
|
21512
21527
|
children: e
|
|
21513
21528
|
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21514
21529
|
ref: o,
|
|
21515
21530
|
role: "tooltip",
|
|
21516
21531
|
style: {
|
|
21517
21532
|
position: "fixed",
|
|
21518
|
-
top:
|
|
21519
|
-
left:
|
|
21520
|
-
visibility:
|
|
21533
|
+
top: p?.top ?? 0,
|
|
21534
|
+
left: p?.left ?? 0,
|
|
21535
|
+
visibility: p ? "visible" : "hidden",
|
|
21521
21536
|
zIndex: 1e3
|
|
21522
21537
|
},
|
|
21523
21538
|
className: cn(i),
|
|
@@ -22385,30 +22400,62 @@ function FireIcon({ pathProps: e, ...t }) {
|
|
|
22385
22400
|
})
|
|
22386
22401
|
});
|
|
22387
22402
|
}
|
|
22388
|
-
function
|
|
22403
|
+
function InsightFillIcon({ pathProps: e, ...t }) {
|
|
22389
22404
|
return /* @__PURE__ */ jsxs(Icon, {
|
|
22390
|
-
viewBox: "0 0
|
|
22405
|
+
viewBox: "0 0 20 20",
|
|
22391
22406
|
...t,
|
|
22392
22407
|
children: [
|
|
22393
22408
|
/* @__PURE__ */ jsx("path", {
|
|
22394
|
-
d: "
|
|
22409
|
+
d: "M9.45,9.14c.68,1.74,2.12,3.11,3.93,3.76-1.81.65-3.26,2.02-3.93,3.76-.68-1.74-2.12-3.11-3.93-3.76,1.81-.65,3.26-2.03,3.93-3.76Z",
|
|
22395
22410
|
fill: "currentColor",
|
|
22396
22411
|
stroke: "currentColor",
|
|
22397
|
-
strokeWidth: "1
|
|
22412
|
+
strokeWidth: "1",
|
|
22413
|
+
strokeMiterlimit: "10",
|
|
22398
22414
|
...e
|
|
22399
22415
|
}),
|
|
22400
22416
|
/* @__PURE__ */ jsx("path", {
|
|
22401
|
-
d: "
|
|
22417
|
+
d: "M12.6,4.96c.39.83,1.05,1.5,1.88,1.88-.83.39-1.5,1.05-1.88,1.88-.39-.83-1.05-1.5-1.88-1.88.83-.39,1.5-1.05,1.88-1.88Z",
|
|
22402
22418
|
fill: "currentColor",
|
|
22403
22419
|
stroke: "currentColor",
|
|
22404
|
-
strokeWidth: "1
|
|
22420
|
+
strokeWidth: "1",
|
|
22421
|
+
strokeMiterlimit: "10",
|
|
22405
22422
|
...e
|
|
22406
22423
|
}),
|
|
22407
22424
|
/* @__PURE__ */ jsx("path", {
|
|
22408
|
-
d: "
|
|
22425
|
+
d: "M7.87,3.34c.3.61.8,1.1,1.4,1.4-.61.3-1.1.8-1.4,1.4-.3-.61-.8-1.1-1.4-1.4.61-.3,1.1-.8,1.4-1.4Z",
|
|
22409
22426
|
fill: "currentColor",
|
|
22410
22427
|
stroke: "currentColor",
|
|
22411
|
-
strokeWidth: "1
|
|
22428
|
+
strokeWidth: "1",
|
|
22429
|
+
strokeMiterlimit: "10",
|
|
22430
|
+
...e
|
|
22431
|
+
})
|
|
22432
|
+
]
|
|
22433
|
+
});
|
|
22434
|
+
}
|
|
22435
|
+
function InsightIcon({ pathProps: e, ...t }) {
|
|
22436
|
+
return /* @__PURE__ */ jsxs(Icon, {
|
|
22437
|
+
viewBox: "0 0 20 20",
|
|
22438
|
+
...t,
|
|
22439
|
+
children: [
|
|
22440
|
+
/* @__PURE__ */ jsx("path", {
|
|
22441
|
+
d: "M9.45,9.14c.68,1.74,2.12,3.11,3.93,3.76-1.81.65-3.26,2.02-3.93,3.76-.68-1.74-2.12-3.11-3.93-3.76,1.81-.65,3.26-2.03,3.93-3.76Z",
|
|
22442
|
+
stroke: "currentColor",
|
|
22443
|
+
strokeWidth: "1.5",
|
|
22444
|
+
strokeMiterlimit: "10",
|
|
22445
|
+
...e
|
|
22446
|
+
}),
|
|
22447
|
+
/* @__PURE__ */ jsx("path", {
|
|
22448
|
+
d: "M12.6,4.96c.39.83,1.05,1.5,1.88,1.88-.83.39-1.5,1.05-1.88,1.88-.39-.83-1.05-1.5-1.88-1.88.83-.39,1.5-1.05,1.88-1.88Z",
|
|
22449
|
+
stroke: "currentColor",
|
|
22450
|
+
strokeWidth: "1.5",
|
|
22451
|
+
strokeMiterlimit: "10",
|
|
22452
|
+
...e
|
|
22453
|
+
}),
|
|
22454
|
+
/* @__PURE__ */ jsx("path", {
|
|
22455
|
+
d: "M7.87,3.34c.3.61.8,1.1,1.4,1.4-.61.3-1.1.8-1.4,1.4-.3-.61-.8-1.1-1.4-1.4.61-.3,1.1-.8,1.4-1.4Z",
|
|
22456
|
+
stroke: "currentColor",
|
|
22457
|
+
strokeWidth: "1.5",
|
|
22458
|
+
strokeMiterlimit: "10",
|
|
22412
22459
|
...e
|
|
22413
22460
|
})
|
|
22414
22461
|
]
|
|
@@ -22576,10 +22623,10 @@ function DarkIcon({ pathProps: e, ...t }) {
|
|
|
22576
22623
|
}
|
|
22577
22624
|
function EmptyBoxIcon({ pathProps: e, ...t }) {
|
|
22578
22625
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22579
|
-
viewBox: "0 0
|
|
22626
|
+
viewBox: "0 0 20 20",
|
|
22580
22627
|
...t,
|
|
22581
22628
|
children: /* @__PURE__ */ jsx("path", {
|
|
22582
|
-
d: "
|
|
22629
|
+
d: "M15.7,2.66H4.29c-.9,0-1.61.73-1.61,1.63v11.41c0,.9.71,1.63,1.61,1.63h11.42c.9,0,1.63-.73,1.63-1.63V4.3c0-.9-.73-1.63-1.63-1.63M15.7,12.44h-3.26c0,1.35-1.1,2.45-2.44,2.45s-2.44-1.09-2.44-2.45h-3.27V4.3h11.42v8.15Z",
|
|
22583
22630
|
fill: "currentColor",
|
|
22584
22631
|
...e
|
|
22585
22632
|
})
|
|
@@ -22598,10 +22645,21 @@ function ExternalLinkIcon({ pathProps: e, ...t }) {
|
|
|
22598
22645
|
}
|
|
22599
22646
|
function HomeIcon({ pathProps: e, ...t }) {
|
|
22600
22647
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22601
|
-
viewBox: "0 0
|
|
22648
|
+
viewBox: "0 0 20 20",
|
|
22649
|
+
...t,
|
|
22650
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
22651
|
+
d: "M4.79,16.03h2.91v-5.16h4.61v5.16h2.91v-7.82l-5.21-3.92-5.21,3.92v7.82ZM3.49,17.34V7.57l6.51-4.9,6.51,4.9v9.77h-5.51v-5.16h-2v5.16H3.49Z",
|
|
22652
|
+
fill: "currentColor",
|
|
22653
|
+
...e
|
|
22654
|
+
})
|
|
22655
|
+
});
|
|
22656
|
+
}
|
|
22657
|
+
function InboxIcon({ pathProps: e, ...t }) {
|
|
22658
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
22659
|
+
viewBox: "0 0 20 20",
|
|
22602
22660
|
...t,
|
|
22603
22661
|
children: /* @__PURE__ */ jsx("path", {
|
|
22604
|
-
d: "
|
|
22662
|
+
d: "M15.7,2.66H4.29c-.9,0-1.61.73-1.61,1.63v11.41c0,.9.71,1.63,1.61,1.63h11.42c.9,0,1.63-.73,1.63-1.63V4.3c0-.9-.73-1.63-1.63-1.63M15.7,12.44h-3.26c0,1.35-1.1,2.45-2.44,2.45s-2.44-1.09-2.44-2.45h-3.27V4.3h11.42v8.15ZM13.26,8.37h-1.63v-2.44h-3.26v2.44h-1.63l3.26,3.26,3.26-3.26Z",
|
|
22605
22663
|
fill: "currentColor",
|
|
22606
22664
|
...e
|
|
22607
22665
|
})
|
|
@@ -22618,6 +22676,17 @@ function LightIcon({ pathProps: e, ...t }) {
|
|
|
22618
22676
|
})
|
|
22619
22677
|
});
|
|
22620
22678
|
}
|
|
22679
|
+
function MailIcon({ pathProps: e, ...t }) {
|
|
22680
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
22681
|
+
viewBox: "0 0 20 20",
|
|
22682
|
+
...t,
|
|
22683
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
22684
|
+
d: "M4.13,15.87c-.4,0-.75-.14-1.04-.43s-.43-.63-.43-1.04V5.6c0-.4.14-.75.43-1.04s.63-.43,1.04-.43h11.74c.4,0,.75.14,1.04.43s.43.63.43,1.04v8.8c0,.4-.14.75-.43,1.04s-.63.43-1.04.43H4.13ZM10,10.73l-5.87-3.67v7.34h11.74v-7.34l-5.87,3.67ZM10,9.27l5.87-3.67H4.13l5.87,3.67ZM4.13,7.07v-1.47,8.8-7.34Z",
|
|
22685
|
+
fill: "currentColor",
|
|
22686
|
+
...e
|
|
22687
|
+
})
|
|
22688
|
+
});
|
|
22689
|
+
}
|
|
22621
22690
|
function MinusIcon({ pathProps: e, ...t }) {
|
|
22622
22691
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22623
22692
|
viewBox: "0 0 16 16",
|
|
@@ -22786,10 +22855,115 @@ function DropdownMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
|
22786
22855
|
})
|
|
22787
22856
|
});
|
|
22788
22857
|
}
|
|
22858
|
+
function HelpPanelEngine({ title: e, items: t, footer: n, closeLabel: r = "Close", defaultOpenValue: i, classNames: a }) {
|
|
22859
|
+
let o = useId(), { close: s } = useDropdown(), c = a ?? {}, l = i ?? t[0]?.value;
|
|
22860
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
22861
|
+
className: cn("rounded-md overflow-hidden bg-white", c.root),
|
|
22862
|
+
role: "dialog",
|
|
22863
|
+
"aria-modal": "true",
|
|
22864
|
+
"aria-labelledby": o,
|
|
22865
|
+
children: [
|
|
22866
|
+
/* @__PURE__ */ jsxs("header", {
|
|
22867
|
+
className: cn("gap-2 p-4 flex shrink-0 items-center justify-between", c.header),
|
|
22868
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
22869
|
+
id: o,
|
|
22870
|
+
className: c.title,
|
|
22871
|
+
children: e
|
|
22872
|
+
}), /* @__PURE__ */ jsx(Button, {
|
|
22873
|
+
type: "button",
|
|
22874
|
+
onClick: s,
|
|
22875
|
+
"aria-label": r,
|
|
22876
|
+
className: c.closeButton,
|
|
22877
|
+
children: /* @__PURE__ */ jsx(CloseIcon, {
|
|
22878
|
+
size: 18,
|
|
22879
|
+
"aria-hidden": !0
|
|
22880
|
+
})
|
|
22881
|
+
})]
|
|
22882
|
+
}),
|
|
22883
|
+
/* @__PURE__ */ jsx("div", {
|
|
22884
|
+
className: c.body,
|
|
22885
|
+
children: /* @__PURE__ */ jsx(Accordion, {
|
|
22886
|
+
type: "single",
|
|
22887
|
+
className: c.accordion,
|
|
22888
|
+
defaultValue: l,
|
|
22889
|
+
children: (e) => /* @__PURE__ */ jsx(Fragment$1, { children: t.map((t) => /* @__PURE__ */ jsxs(AccordionItem, {
|
|
22890
|
+
value: t.value,
|
|
22891
|
+
className: c.item,
|
|
22892
|
+
children: [/* @__PURE__ */ jsxs(AccordionTrigger, {
|
|
22893
|
+
value: t.value,
|
|
22894
|
+
className: cn("gap-2 p-3 flex w-full items-center justify-between", c.itemTrigger),
|
|
22895
|
+
children: [t.label, /* @__PURE__ */ jsx(ArrowIcon, {
|
|
22896
|
+
size: 20,
|
|
22897
|
+
direction: e.openItems.has(t.value) ? "up" : "down",
|
|
22898
|
+
className: "shrink-0 text-neutral-600"
|
|
22899
|
+
})]
|
|
22900
|
+
}), /* @__PURE__ */ jsx(AccordionContent, {
|
|
22901
|
+
value: t.value,
|
|
22902
|
+
className: cn("p-3", c.itemContent),
|
|
22903
|
+
children: t.content
|
|
22904
|
+
})]
|
|
22905
|
+
}, t.value)) })
|
|
22906
|
+
})
|
|
22907
|
+
}),
|
|
22908
|
+
n == null ? null : /* @__PURE__ */ jsx("div", {
|
|
22909
|
+
className: cn("p-3", c.footer),
|
|
22910
|
+
children: n
|
|
22911
|
+
})
|
|
22912
|
+
]
|
|
22913
|
+
});
|
|
22914
|
+
}
|
|
22915
|
+
function findActiveStep(e, t, n) {
|
|
22916
|
+
for (let r = 0; r < e.length; r++) {
|
|
22917
|
+
let i = e[r];
|
|
22918
|
+
if (!t.has(i.id) && i.isVisible(n)) return {
|
|
22919
|
+
step: i,
|
|
22920
|
+
index: r
|
|
22921
|
+
};
|
|
22922
|
+
}
|
|
22923
|
+
return null;
|
|
22924
|
+
}
|
|
22925
|
+
function OnboardingEngine({ steps: e, context: t, children: n }) {
|
|
22926
|
+
let [r, i] = useState(() => /* @__PURE__ */ new Set()), a = useMemo(() => findActiveStep(e, r, t), [
|
|
22927
|
+
e,
|
|
22928
|
+
r,
|
|
22929
|
+
t
|
|
22930
|
+
]), o = a?.step ?? null, c = a?.index ?? null, l = useCallback((e) => {
|
|
22931
|
+
i((t) => {
|
|
22932
|
+
if (t.has(e)) return t;
|
|
22933
|
+
let n = new Set(t);
|
|
22934
|
+
return n.add(e), n;
|
|
22935
|
+
});
|
|
22936
|
+
}, []), u = useCallback(() => {
|
|
22937
|
+
i((n) => {
|
|
22938
|
+
let r = findActiveStep(e, n, t);
|
|
22939
|
+
if (r == null || n.has(r.step.id)) return n;
|
|
22940
|
+
let i = new Set(n);
|
|
22941
|
+
return i.add(r.step.id), i;
|
|
22942
|
+
});
|
|
22943
|
+
}, [e, t]), f = useCallback(() => {
|
|
22944
|
+
i(new Set(e.map((e) => e.id)));
|
|
22945
|
+
}, [e]);
|
|
22946
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: n({
|
|
22947
|
+
context: t,
|
|
22948
|
+
currentStep: o,
|
|
22949
|
+
currentStepIndex: c,
|
|
22950
|
+
dismissedStepIds: r,
|
|
22951
|
+
actions: useMemo(() => ({
|
|
22952
|
+
dismissCurrentStep: u,
|
|
22953
|
+
dismissStep: l,
|
|
22954
|
+
skipAll: f,
|
|
22955
|
+
close: f
|
|
22956
|
+
}), [
|
|
22957
|
+
u,
|
|
22958
|
+
l,
|
|
22959
|
+
f
|
|
22960
|
+
])
|
|
22961
|
+
}) });
|
|
22962
|
+
}
|
|
22789
22963
|
function RichContent({ content: e, className: t }) {
|
|
22790
22964
|
let n = normalizeContent(e);
|
|
22791
22965
|
return /* @__PURE__ */ jsx("div", {
|
|
22792
|
-
className: cn("normalized-content text-sm leading-[1.3]
|
|
22966
|
+
className: cn("normalized-content text-sm font-normal leading-[1.3] text-neutral-900", t),
|
|
22793
22967
|
dangerouslySetInnerHTML: { __html: n }
|
|
22794
22968
|
});
|
|
22795
22969
|
}
|
|
@@ -22869,7 +23043,7 @@ function isTopPosition(e) {
|
|
|
22869
23043
|
function isRenderFn(e) {
|
|
22870
23044
|
return typeof e == "function";
|
|
22871
23045
|
}
|
|
22872
|
-
var subscribeNoop = () => () => {}, getClientSnapshot = () => !0, getServerSnapshot = () => !1;
|
|
23046
|
+
var subscribeNoop$1 = () => () => {}, getClientSnapshot$1 = () => !0, getServerSnapshot$1 = () => !1;
|
|
22873
23047
|
function groupByPosition(e) {
|
|
22874
23048
|
return e.reduce((e, t) => ((e[t.position] ??= []).push(t), e), {});
|
|
22875
23049
|
}
|
|
@@ -22940,7 +23114,7 @@ function useToastTimers(e, t) {
|
|
|
22940
23114
|
}), n;
|
|
22941
23115
|
});
|
|
22942
23116
|
}, COUNTDOWN_INTERVAL_MS);
|
|
22943
|
-
}, []),
|
|
23117
|
+
}, []), p = useCallback(() => {
|
|
22944
23118
|
if (o.current) return;
|
|
22945
23119
|
o.current = !0;
|
|
22946
23120
|
let e = Date.now();
|
|
@@ -22954,7 +23128,7 @@ function useToastTimers(e, t) {
|
|
|
22954
23128
|
isPaused: !0
|
|
22955
23129
|
});
|
|
22956
23130
|
}), a.current &&= (clearInterval(a.current), null);
|
|
22957
|
-
}, []),
|
|
23131
|
+
}, []), g = useCallback(() => {
|
|
22958
23132
|
o.current && (o.current = !1, i.current.forEach((t, n) => {
|
|
22959
23133
|
if (t.isPaused && t.remainingTime > 0) {
|
|
22960
23134
|
let r = e.find((e) => e.id === n);
|
|
@@ -22965,7 +23139,7 @@ function useToastTimers(e, t) {
|
|
|
22965
23139
|
e,
|
|
22966
23140
|
u,
|
|
22967
23141
|
f
|
|
22968
|
-
]),
|
|
23142
|
+
]), O = useCallback((e) => {
|
|
22969
23143
|
i.current.delete(e), r((t) => {
|
|
22970
23144
|
let n = new Map(t);
|
|
22971
23145
|
return n.delete(e), n;
|
|
@@ -22985,23 +23159,23 @@ function useToastTimers(e, t) {
|
|
|
22985
23159
|
a.current && clearInterval(a.current);
|
|
22986
23160
|
}, []), {
|
|
22987
23161
|
remainingTimes: n,
|
|
22988
|
-
pauseAll:
|
|
22989
|
-
resumeAll:
|
|
22990
|
-
cleanupTimer:
|
|
23162
|
+
pauseAll: p,
|
|
23163
|
+
resumeAll: g,
|
|
23164
|
+
cleanupTimer: O
|
|
22991
23165
|
};
|
|
22992
23166
|
}
|
|
22993
23167
|
function Toaster() {
|
|
22994
|
-
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer:
|
|
23168
|
+
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer: p } = useToastTimers(e, a);
|
|
22995
23169
|
useEffect(() => toastStore.subscribe(t), []);
|
|
22996
|
-
let
|
|
23170
|
+
let A = useSyncExternalStore(subscribeNoop$1, getClientSnapshot$1, getServerSnapshot$1), R = useCallback((e) => {
|
|
22997
23171
|
e.callbacks?.onOpen?.();
|
|
22998
|
-
}, []),
|
|
23172
|
+
}, []), qo = useCallback((e, t) => {
|
|
22999
23173
|
t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
23000
23174
|
}, []);
|
|
23001
23175
|
useEffect(() => {
|
|
23002
23176
|
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
23003
23177
|
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
23004
|
-
|
|
23178
|
+
qo(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
23005
23179
|
}), r((r) => {
|
|
23006
23180
|
let i = r.map((e) => {
|
|
23007
23181
|
let t = n.get(e.id);
|
|
@@ -23010,7 +23184,7 @@ function Toaster() {
|
|
|
23010
23184
|
content: t.content,
|
|
23011
23185
|
duration: t.duration
|
|
23012
23186
|
} : e;
|
|
23013
|
-
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (
|
|
23187
|
+
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (R(e), {
|
|
23014
23188
|
...e,
|
|
23015
23189
|
animationState: "entering"
|
|
23016
23190
|
})), ...i];
|
|
@@ -23018,20 +23192,20 @@ function Toaster() {
|
|
|
23018
23192
|
}), i.current = t;
|
|
23019
23193
|
}, [
|
|
23020
23194
|
e,
|
|
23021
|
-
|
|
23022
|
-
|
|
23195
|
+
R,
|
|
23196
|
+
qo
|
|
23023
23197
|
]);
|
|
23024
|
-
let
|
|
23198
|
+
let Jo = useCallback((e) => {
|
|
23025
23199
|
r((t) => {
|
|
23026
23200
|
let n = t.filter((t) => t.id !== e);
|
|
23027
23201
|
return o.current = n, n;
|
|
23028
|
-
}),
|
|
23029
|
-
}, [
|
|
23202
|
+
}), p(e), toastStore.cleanup(e);
|
|
23203
|
+
}, [p]), Yo = useCallback((e) => {
|
|
23030
23204
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
23031
23205
|
}, []);
|
|
23032
|
-
if (!
|
|
23033
|
-
let
|
|
23034
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23206
|
+
if (!A) return null;
|
|
23207
|
+
let Xo = groupByPosition(n);
|
|
23208
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Xo).map(([e, t]) => {
|
|
23035
23209
|
let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
23036
23210
|
className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
|
|
23037
23211
|
children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
|
|
@@ -23040,8 +23214,8 @@ function Toaster() {
|
|
|
23040
23214
|
children: /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23041
23215
|
toast: e,
|
|
23042
23216
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23043
|
-
onExitComplete:
|
|
23044
|
-
onClose:
|
|
23217
|
+
onExitComplete: Jo,
|
|
23218
|
+
onClose: Yo,
|
|
23045
23219
|
onHoverStart: u,
|
|
23046
23220
|
onHoverEnd: f
|
|
23047
23221
|
})
|
|
@@ -23049,13 +23223,13 @@ function Toaster() {
|
|
|
23049
23223
|
}) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23050
23224
|
toast: e,
|
|
23051
23225
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23052
|
-
onExitComplete:
|
|
23053
|
-
onClose:
|
|
23226
|
+
onExitComplete: Jo,
|
|
23227
|
+
onClose: Yo,
|
|
23054
23228
|
onHoverStart: u,
|
|
23055
23229
|
onHoverEnd: f
|
|
23056
23230
|
}, e.id));
|
|
23057
23231
|
return /* @__PURE__ */ jsx("div", {
|
|
23058
|
-
className: cn("pointer-events-none fixed z-1000 flex flex-col items-end
|
|
23232
|
+
className: cn("gap-2 p-4 pointer-events-none fixed z-1000 flex flex-col items-end", POSITION_CLASSES[e]),
|
|
23059
23233
|
children: isTopPosition(e) ? /* @__PURE__ */ jsxs(Fragment$1, { children: [i, a] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [a, i] })
|
|
23060
23234
|
}, e);
|
|
23061
23235
|
}) }), document.body);
|
|
@@ -23143,7 +23317,7 @@ const AVATAR_COLOR = {
|
|
|
23143
23317
|
}
|
|
23144
23318
|
}, AVATAR_COLOR_KEYS = Object.keys(AVATAR_COLOR);
|
|
23145
23319
|
var avatarStyles = tv({
|
|
23146
|
-
base: "flex shrink-0 items-center justify-center rounded-full leading-none
|
|
23320
|
+
base: "font-semibold flex shrink-0 items-center justify-center rounded-full leading-none select-none",
|
|
23147
23321
|
variants: { size: {
|
|
23148
23322
|
xs: "h-[16px] w-[16px] text-[0.5em]",
|
|
23149
23323
|
sm: "h-[20px] w-[20px] text-[0.625em]",
|
|
@@ -23167,8 +23341,8 @@ function Avatar({ name: e, size: t = "sm", className: n }) {
|
|
|
23167
23341
|
}
|
|
23168
23342
|
var statusBadgeStyles = tv({
|
|
23169
23343
|
slots: {
|
|
23170
|
-
root: "relative flex items-center
|
|
23171
|
-
text: "
|
|
23344
|
+
root: "gap-1 relative flex items-center rounded-full border",
|
|
23345
|
+
text: "text-xs font-semibold truncate whitespace-nowrap"
|
|
23172
23346
|
},
|
|
23173
23347
|
variants: { status: {
|
|
23174
23348
|
fire: {
|
|
@@ -23205,21 +23379,21 @@ var statusBadgeStyles = tv({
|
|
|
23205
23379
|
}
|
|
23206
23380
|
};
|
|
23207
23381
|
function StatusBadge({ className: e, label: t, status: n, onAction: r, density: i = "normal" }) {
|
|
23208
|
-
let [a, o] = useState(!1), s = i === "compact", c = STATUS_CONFIG[n], l = s ? c.compact : c.normal, u = statusBadgeStyles({ status: n }), f = l.includes("icon"), p = l.includes("label"),
|
|
23382
|
+
let [a, o] = useState(!1), s = i === "compact", c = STATUS_CONFIG[n], l = s ? c.compact : c.normal, u = statusBadgeStyles({ status: n }), f = l.includes("icon"), p = l.includes("label"), h = l.includes("action") && r;
|
|
23209
23383
|
return /* @__PURE__ */ jsx(Badge, {
|
|
23210
23384
|
className: cn(u.root(), s ? "h-6 w-6" : "py-1 pr-2.5 pl-2", e),
|
|
23211
23385
|
icon: f ? /* @__PURE__ */ jsx(c.icon, {
|
|
23212
23386
|
size: 16,
|
|
23213
|
-
className: cn(u.text(), s &&
|
|
23387
|
+
className: cn(u.text(), s && h && "inset-0 absolute m-auto", s && h && a && "opacity-0")
|
|
23214
23388
|
}) : void 0,
|
|
23215
23389
|
label: p ? /* @__PURE__ */ jsx("span", {
|
|
23216
|
-
className: cn(u.text(), s && "
|
|
23390
|
+
className: cn(u.text(), s && "inset-0 absolute flex items-center justify-center text-center text-[10px]"),
|
|
23217
23391
|
children: t ?? c.label
|
|
23218
23392
|
}) : void 0,
|
|
23219
|
-
action:
|
|
23393
|
+
action: h ? /* @__PURE__ */ jsx(Button, {
|
|
23220
23394
|
onClick: r,
|
|
23221
23395
|
"aria-label": "Dismiss status",
|
|
23222
|
-
className: cn("group", s ? cn("
|
|
23396
|
+
className: cn("group", s ? cn("inset-0 absolute m-auto transition-opacity", a ? "opacity-100" : "opacity-0") : void 0),
|
|
23223
23397
|
children: /* @__PURE__ */ jsx(CloseIcon, {
|
|
23224
23398
|
size: 16,
|
|
23225
23399
|
className: cn(u.text(), "group-hover:scale-90")
|
|
@@ -23231,15 +23405,15 @@ function StatusBadge({ className: e, label: t, status: n, onAction: r, density:
|
|
|
23231
23405
|
}
|
|
23232
23406
|
function BulkActionsSkeleton({ className: e }) {
|
|
23233
23407
|
return /* @__PURE__ */ jsxs("div", {
|
|
23234
|
-
className: cn("grid grid-cols-[minmax(0,1fr)_auto_auto] items-center
|
|
23408
|
+
className: cn("gap-4 grid grid-cols-[minmax(0,1fr)_auto_auto] items-center", e),
|
|
23235
23409
|
children: [
|
|
23236
23410
|
/* @__PURE__ */ jsxs("div", {
|
|
23237
|
-
className: "flex items-center
|
|
23411
|
+
className: "gap-2 flex items-center",
|
|
23238
23412
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-30" })]
|
|
23239
23413
|
}),
|
|
23240
23414
|
/* @__PURE__ */ jsx("div", { className: "flex items-center divide-x divide-neutral-400-variant-1" }),
|
|
23241
23415
|
/* @__PURE__ */ jsxs("div", {
|
|
23242
|
-
className: "flex items-center
|
|
23416
|
+
className: "gap-2 flex items-center",
|
|
23243
23417
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "m-1 h-5 w-5 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "m-1 h-5 w-5 rounded" })]
|
|
23244
23418
|
})
|
|
23245
23419
|
]
|
|
@@ -23258,17 +23432,17 @@ function IconButton({ icon: e, ...t }) {
|
|
|
23258
23432
|
function InfoTooltip({ className: e, ...t }) {
|
|
23259
23433
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
23260
23434
|
...t,
|
|
23261
|
-
className: cn("rounded
|
|
23435
|
+
className: cn("rounded px-2 py-1 font-medium bg-neutral-700 text-[0.625em] whitespace-nowrap text-white", e)
|
|
23262
23436
|
});
|
|
23263
23437
|
}
|
|
23264
23438
|
function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n, actions: r, defaultDensity: i = "normal", onDensityChange: a, className: o }) {
|
|
23265
|
-
let s = e > 0, c = s && t === e, l = s && t > 0 && t < e, u = c ? `All (${e})` : l ? `${t}/${e} selected` : `Select all (${e})`, [f, p] = useState(i ?? "normal"),
|
|
23439
|
+
let s = e > 0, c = s && t === e, l = s && t > 0 && t < e, u = c ? `All (${e})` : l ? `${t}/${e} selected` : `Select all (${e})`, [f, p] = useState(i ?? "normal"), h = () => {
|
|
23266
23440
|
n(!c);
|
|
23267
23441
|
};
|
|
23268
|
-
function
|
|
23442
|
+
function g(e) {
|
|
23269
23443
|
p(e), a?.(e);
|
|
23270
23444
|
}
|
|
23271
|
-
let
|
|
23445
|
+
let Ko = {
|
|
23272
23446
|
fire: [{
|
|
23273
23447
|
id: "fire",
|
|
23274
23448
|
tooltip: "Mark as fire",
|
|
@@ -23320,7 +23494,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23320
23494
|
}),
|
|
23321
23495
|
onClick: r.read.off
|
|
23322
23496
|
}]
|
|
23323
|
-
},
|
|
23497
|
+
}, A = [{
|
|
23324
23498
|
value: "normal",
|
|
23325
23499
|
tooltip: "Normal density",
|
|
23326
23500
|
icon: /* @__PURE__ */ jsx(NormalDensityIcon, { size: 20 })
|
|
@@ -23330,12 +23504,12 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23330
23504
|
icon: /* @__PURE__ */ jsx(CompactDensityIcon, { size: 20 })
|
|
23331
23505
|
}];
|
|
23332
23506
|
return /* @__PURE__ */ jsxs("div", {
|
|
23333
|
-
className: cn("grid grid-cols-[minmax(0,1fr)_auto_auto] items-center
|
|
23507
|
+
className: cn("gap-4 grid grid-cols-[minmax(0,1fr)_auto_auto] items-center", o),
|
|
23334
23508
|
children: [
|
|
23335
23509
|
/* @__PURE__ */ jsx(Checkbox, {
|
|
23336
23510
|
checked: c,
|
|
23337
23511
|
indeterminate: l,
|
|
23338
|
-
onChange:
|
|
23512
|
+
onChange: h,
|
|
23339
23513
|
icon: /* @__PURE__ */ jsx(CheckboxIcon, {
|
|
23340
23514
|
size: 16,
|
|
23341
23515
|
className: "text-white-variant-7"
|
|
@@ -23349,8 +23523,8 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23349
23523
|
}),
|
|
23350
23524
|
/* @__PURE__ */ jsx("div", {
|
|
23351
23525
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23352
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23353
|
-
className: "
|
|
23526
|
+
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Ko).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
23527
|
+
className: "gap-2 px-1 flex items-center",
|
|
23354
23528
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23355
23529
|
content: e.tooltip,
|
|
23356
23530
|
className: "border-black",
|
|
@@ -23363,14 +23537,14 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23363
23537
|
}, e)) })
|
|
23364
23538
|
}),
|
|
23365
23539
|
/* @__PURE__ */ jsx("div", {
|
|
23366
|
-
className: "flex items-center
|
|
23367
|
-
children:
|
|
23540
|
+
className: "gap-2 flex items-center",
|
|
23541
|
+
children: A.map(({ value: e, tooltip: t, icon: n }) => {
|
|
23368
23542
|
let r = f === e;
|
|
23369
23543
|
return /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23370
23544
|
content: t,
|
|
23371
23545
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
23372
23546
|
className: cn("h-7 w-7 p-0 text-neutral-900", r && "bg-white-variant-4"),
|
|
23373
|
-
onClick: () =>
|
|
23547
|
+
onClick: () => g(e),
|
|
23374
23548
|
icon: n,
|
|
23375
23549
|
"aria-pressed": r
|
|
23376
23550
|
})
|
|
@@ -23382,8 +23556,8 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23382
23556
|
}
|
|
23383
23557
|
var filterButtonStyles = tv({
|
|
23384
23558
|
slots: {
|
|
23385
|
-
root: "inline-flex w-fit items-center
|
|
23386
|
-
label: "flex shrink-0 items-center
|
|
23559
|
+
root: "gap-1 px-2 py-1 inline-flex w-fit items-center rounded-full border-[1.5px] transition-colors",
|
|
23560
|
+
label: "gap-1 text-xs flex shrink-0 items-center whitespace-nowrap"
|
|
23387
23561
|
},
|
|
23388
23562
|
variants: {
|
|
23389
23563
|
variant: {
|
|
@@ -23449,6 +23623,7 @@ var filterButtonStyles = tv({
|
|
|
23449
23623
|
},
|
|
23450
23624
|
insight: {
|
|
23451
23625
|
icon: InsightIcon,
|
|
23626
|
+
selectedIcon: InsightFillIcon,
|
|
23452
23627
|
label: "Insights",
|
|
23453
23628
|
iconColor: "text-primary-600"
|
|
23454
23629
|
},
|
|
@@ -23497,9 +23672,9 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23497
23672
|
function IconCountButtonSkeleton({ orientation: e = "vertical", className: t }) {
|
|
23498
23673
|
let n = e === "vertical";
|
|
23499
23674
|
return /* @__PURE__ */ jsxs("div", {
|
|
23500
|
-
className: cn("flex w-fit items-center", n ? "flex-col
|
|
23675
|
+
className: cn("flex w-fit items-center", n ? "gap-1 flex-col" : "gap-2 flex-row", t),
|
|
23501
23676
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-8 rounded-full" }), /* @__PURE__ */ jsx("div", {
|
|
23502
|
-
className: cn("flex items-center
|
|
23677
|
+
className: cn("gap-1 flex items-center", n && "text-[9px]"),
|
|
23503
23678
|
children: /* @__PURE__ */ jsx(Skeleton, { className: cn("h-3", n ? "w-10" : "w-14") })
|
|
23504
23679
|
})]
|
|
23505
23680
|
});
|
|
@@ -23507,8 +23682,8 @@ function IconCountButtonSkeleton({ orientation: e = "vertical", className: t })
|
|
|
23507
23682
|
var iconCountButtonStyles = tv({
|
|
23508
23683
|
slots: {
|
|
23509
23684
|
root: "flex w-fit items-center",
|
|
23510
|
-
bubble: "
|
|
23511
|
-
label: "flex items-center
|
|
23685
|
+
bubble: "size-8 flex items-center justify-center rounded-full border-[1.5px] transition-opacity hover:opacity-70",
|
|
23686
|
+
label: "gap-1 flex items-center transition-colors",
|
|
23512
23687
|
count: "font-normal",
|
|
23513
23688
|
icon: ""
|
|
23514
23689
|
},
|
|
@@ -23527,11 +23702,11 @@ var iconCountButtonStyles = tv({
|
|
|
23527
23702
|
},
|
|
23528
23703
|
orientation: {
|
|
23529
23704
|
vertical: {
|
|
23530
|
-
root: "flex-col
|
|
23531
|
-
label: "text-[9px]
|
|
23705
|
+
root: "gap-1 flex-col",
|
|
23706
|
+
label: "font-semibold text-[9px]"
|
|
23532
23707
|
},
|
|
23533
23708
|
horizontal: {
|
|
23534
|
-
root: "flex-row
|
|
23709
|
+
root: "gap-2 flex-row",
|
|
23535
23710
|
label: "text-xs font-semibold"
|
|
23536
23711
|
}
|
|
23537
23712
|
}
|
|
@@ -23605,12 +23780,12 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
|
|
|
23605
23780
|
tabIndex: 0,
|
|
23606
23781
|
"aria-pressed": e,
|
|
23607
23782
|
"aria-label": c,
|
|
23608
|
-
className: "
|
|
23783
|
+
className: "size-5 flex cursor-pointer items-center justify-center rounded-full bg-white",
|
|
23609
23784
|
onMouseEnter: r,
|
|
23610
23785
|
onMouseLeave: i,
|
|
23611
23786
|
onClick: a,
|
|
23612
23787
|
children: /* @__PURE__ */ jsxs("div", {
|
|
23613
|
-
className: cn("
|
|
23788
|
+
className: cn("size-4 flex items-center justify-center rounded-full border", e ? "border-tertiary-500" : "border-neutral-800"),
|
|
23614
23789
|
children: [o && /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full bg-neutral-800" }), e && /* @__PURE__ */ jsx(CloseIcon, {
|
|
23615
23790
|
size: 12,
|
|
23616
23791
|
className: "text-tertiary-500"
|
|
@@ -23620,20 +23795,20 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
|
|
|
23620
23795
|
})
|
|
23621
23796
|
}), document.body);
|
|
23622
23797
|
}
|
|
23623
|
-
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange:
|
|
23624
|
-
let
|
|
23798
|
+
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...g }) {
|
|
23799
|
+
let O = iconCountButtonStyles({
|
|
23625
23800
|
variant: r,
|
|
23626
23801
|
orientation: i,
|
|
23627
23802
|
status: a
|
|
23628
|
-
}),
|
|
23629
|
-
function
|
|
23630
|
-
c === void 0 &&
|
|
23803
|
+
}), Ko = useRef(null), [A, R] = useState(!1), [qo, Jo] = useState(!1), [Yo, Xo] = useState(l), [Zo, B] = useState(null), Qo = c ?? Yo, $o = s && (A || qo || Qo), es = typeof n == "number" && n > 0 && (o || a === "active");
|
|
23804
|
+
function ts(e) {
|
|
23805
|
+
c === void 0 && Xo(e), u?.(e);
|
|
23631
23806
|
}
|
|
23632
23807
|
return useLayoutEffect(() => {
|
|
23633
|
-
if (
|
|
23808
|
+
if (!$o || !Ko.current) return;
|
|
23634
23809
|
function e() {
|
|
23635
|
-
let e =
|
|
23636
|
-
e &&
|
|
23810
|
+
let e = Ko.current?.getBoundingClientRect();
|
|
23811
|
+
e && B({
|
|
23637
23812
|
top: e.top - 8,
|
|
23638
23813
|
left: e.right - 12
|
|
23639
23814
|
});
|
|
@@ -23641,30 +23816,30 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23641
23816
|
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
23642
23817
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
23643
23818
|
};
|
|
23644
|
-
}, [
|
|
23645
|
-
...
|
|
23646
|
-
className: cn(
|
|
23647
|
-
onMouseEnter: () =>
|
|
23648
|
-
onMouseLeave: () =>
|
|
23819
|
+
}, [$o]), /* @__PURE__ */ jsxs(Button, {
|
|
23820
|
+
...g,
|
|
23821
|
+
className: cn(O.root(), p?.root),
|
|
23822
|
+
onMouseEnter: () => R(!0),
|
|
23823
|
+
onMouseLeave: () => R(!1),
|
|
23649
23824
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23650
23825
|
className: "relative",
|
|
23651
23826
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23652
|
-
ref:
|
|
23653
|
-
className: cn(
|
|
23654
|
-
children: renderIcon(e,
|
|
23655
|
-
}),
|
|
23656
|
-
isPressed:
|
|
23657
|
-
isPortalHovered:
|
|
23658
|
-
portalPosition:
|
|
23659
|
-
onMouseEnter: () =>
|
|
23660
|
-
onMouseLeave: () =>
|
|
23661
|
-
onToggle: () =>
|
|
23827
|
+
ref: Ko,
|
|
23828
|
+
className: cn(O.bubble(), p?.bubble),
|
|
23829
|
+
children: renderIcon(e, O.icon())
|
|
23830
|
+
}), $o && Zo && typeof document < "u" && ToggleControlPortal({
|
|
23831
|
+
isPressed: Qo,
|
|
23832
|
+
isPortalHovered: qo,
|
|
23833
|
+
portalPosition: Zo,
|
|
23834
|
+
onMouseEnter: () => Jo(!0),
|
|
23835
|
+
onMouseLeave: () => Jo(!1),
|
|
23836
|
+
onToggle: () => ts(!Qo)
|
|
23662
23837
|
})]
|
|
23663
23838
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23664
|
-
className: cn(
|
|
23665
|
-
children: [/* @__PURE__ */ jsx("span", { children: t }),
|
|
23839
|
+
className: cn(O.label(), p?.label),
|
|
23840
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), es && /* @__PURE__ */ jsxs("span", {
|
|
23666
23841
|
"aria-label": `${n} items`,
|
|
23667
|
-
className: cn(
|
|
23842
|
+
className: cn(O.count(), p?.count),
|
|
23668
23843
|
children: [
|
|
23669
23844
|
"(",
|
|
23670
23845
|
formatCount(n),
|
|
@@ -23676,7 +23851,7 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23676
23851
|
}
|
|
23677
23852
|
function ActionMenuItem({ icon: e, label: t, className: n, selected: r, ...a }) {
|
|
23678
23853
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23679
|
-
className: cn("flex items-center justify-start
|
|
23854
|
+
className: cn("gap-2 px-3 py-2 flex items-center justify-start bg-white hover:bg-neutral-100", r && "bg-primary-500 text-white hover:bg-primary-bright", n),
|
|
23680
23855
|
...a,
|
|
23681
23856
|
children: [e && cloneElement(e, {
|
|
23682
23857
|
size: e.props.size ?? 16,
|
|
@@ -23690,13 +23865,13 @@ function ActionMenuItem({ icon: e, label: t, className: n, selected: r, ...a })
|
|
|
23690
23865
|
function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
23691
23866
|
return /* @__PURE__ */ jsx(DropdownMenu, {
|
|
23692
23867
|
trigger: e,
|
|
23693
|
-
className: cn("mt-1 min-w-20 overflow-hidden
|
|
23868
|
+
className: cn("mt-1 min-w-20 rounded p-0 shadow-lg overflow-hidden border border-neutral-400 bg-white", n),
|
|
23694
23869
|
...r,
|
|
23695
23870
|
children: t
|
|
23696
23871
|
});
|
|
23697
23872
|
}
|
|
23698
23873
|
function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
|
|
23699
|
-
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t),
|
|
23874
|
+
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [g, O] = useState(() => {
|
|
23700
23875
|
let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
|
|
23701
23876
|
return {
|
|
23702
23877
|
year: r.getFullYear(),
|
|
@@ -23704,28 +23879,28 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23704
23879
|
};
|
|
23705
23880
|
});
|
|
23706
23881
|
useEffect(() => {
|
|
23707
|
-
(e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !==
|
|
23708
|
-
if (e === "single" && t)
|
|
23882
|
+
(e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !== f.current.startDate?.getTime() || n.endDate?.getTime() !== f.current.endDate?.getTime())) && queueMicrotask(() => {
|
|
23883
|
+
if (e === "single" && t) O({
|
|
23709
23884
|
year: t.getFullYear(),
|
|
23710
23885
|
month: t.getMonth()
|
|
23711
23886
|
});
|
|
23712
23887
|
else if (e === "range") {
|
|
23713
23888
|
let e = n.startDate ?? n.endDate;
|
|
23714
|
-
e &&
|
|
23889
|
+
e && O({
|
|
23715
23890
|
year: e.getFullYear(),
|
|
23716
23891
|
month: e.getMonth()
|
|
23717
23892
|
});
|
|
23718
23893
|
}
|
|
23719
|
-
}), u.current = t,
|
|
23894
|
+
}), u.current = t, f.current = n;
|
|
23720
23895
|
}, [
|
|
23721
23896
|
e,
|
|
23722
23897
|
t,
|
|
23723
23898
|
n
|
|
23724
23899
|
]);
|
|
23725
|
-
let
|
|
23726
|
-
function
|
|
23900
|
+
let Ko = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
|
|
23901
|
+
function A(t) {
|
|
23727
23902
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23728
|
-
if ((o !==
|
|
23903
|
+
if ((o !== g.month || s !== g.year) && O({
|
|
23729
23904
|
year: s,
|
|
23730
23905
|
month: o
|
|
23731
23906
|
}), e === "single") r(t), a();
|
|
@@ -23740,8 +23915,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23740
23915
|
}), a());
|
|
23741
23916
|
}
|
|
23742
23917
|
}
|
|
23743
|
-
function
|
|
23744
|
-
|
|
23918
|
+
function R() {
|
|
23919
|
+
O((e) => e.month === 0 ? {
|
|
23745
23920
|
year: e.year - 1,
|
|
23746
23921
|
month: 11
|
|
23747
23922
|
} : {
|
|
@@ -23749,8 +23924,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23749
23924
|
month: e.month - 1
|
|
23750
23925
|
});
|
|
23751
23926
|
}
|
|
23752
|
-
function
|
|
23753
|
-
|
|
23927
|
+
function qo() {
|
|
23928
|
+
O((e) => e.month === 11 ? {
|
|
23754
23929
|
year: e.year + 1,
|
|
23755
23930
|
month: 0
|
|
23756
23931
|
} : {
|
|
@@ -23758,28 +23933,28 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23758
23933
|
month: e.month + 1
|
|
23759
23934
|
});
|
|
23760
23935
|
}
|
|
23761
|
-
let
|
|
23936
|
+
let Jo = getWeekdays();
|
|
23762
23937
|
return /* @__PURE__ */ jsxs("div", {
|
|
23763
|
-
className: "mt-1
|
|
23938
|
+
className: "mt-1 rounded-lg p-2 shadow-lg w-fit border border-neutral-400 bg-white",
|
|
23764
23939
|
children: [
|
|
23765
23940
|
/* @__PURE__ */ jsxs("div", {
|
|
23766
|
-
className: "mb-4 flex items-center justify-between border-b border-neutral-400
|
|
23941
|
+
className: "mb-4 pb-2 flex items-center justify-between border-b border-neutral-400",
|
|
23767
23942
|
children: [
|
|
23768
23943
|
/* @__PURE__ */ jsx(IconButton, {
|
|
23769
23944
|
icon: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
23770
23945
|
direction: "left",
|
|
23771
23946
|
size: 20
|
|
23772
23947
|
}),
|
|
23773
|
-
onClick:
|
|
23948
|
+
onClick: R,
|
|
23774
23949
|
className: "hover:opacity-60",
|
|
23775
23950
|
"aria-label": "Previous month"
|
|
23776
23951
|
}),
|
|
23777
23952
|
/* @__PURE__ */ jsxs("div", {
|
|
23778
|
-
className: "text-[10px]
|
|
23953
|
+
className: "font-bold text-[10px] text-neutral-900",
|
|
23779
23954
|
children: [
|
|
23780
|
-
getMonthName(
|
|
23955
|
+
getMonthName(g.month),
|
|
23781
23956
|
" ",
|
|
23782
|
-
|
|
23957
|
+
g.year
|
|
23783
23958
|
]
|
|
23784
23959
|
}),
|
|
23785
23960
|
/* @__PURE__ */ jsx(IconButton, {
|
|
@@ -23787,7 +23962,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23787
23962
|
direction: "right",
|
|
23788
23963
|
size: 20
|
|
23789
23964
|
}),
|
|
23790
|
-
onClick:
|
|
23965
|
+
onClick: qo,
|
|
23791
23966
|
className: "hover:opacity-60",
|
|
23792
23967
|
"aria-label": "Next month"
|
|
23793
23968
|
})
|
|
@@ -23795,20 +23970,20 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23795
23970
|
}),
|
|
23796
23971
|
/* @__PURE__ */ jsx("div", {
|
|
23797
23972
|
className: "mb-2 grid grid-cols-7",
|
|
23798
|
-
children:
|
|
23799
|
-
className: "flex items-center justify-center
|
|
23973
|
+
children: Jo.map((e) => /* @__PURE__ */ jsx("div", {
|
|
23974
|
+
className: "p-0.5 font-bold flex items-center justify-center text-[9px] text-neutral-900",
|
|
23800
23975
|
children: e
|
|
23801
23976
|
}, e))
|
|
23802
23977
|
}),
|
|
23803
23978
|
/* @__PURE__ */ jsx("div", {
|
|
23804
23979
|
className: "grid grid-cols-7",
|
|
23805
|
-
children:
|
|
23806
|
-
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f),
|
|
23807
|
-
e === "range" && u && !f && s && !isDateBefore(s, u) ? (
|
|
23808
|
-
let
|
|
23980
|
+
children: Ko.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
23981
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), Uo = u, g = s;
|
|
23982
|
+
e === "range" && u && !f && s && !isDateBefore(s, u) ? (Uo = u, g = s) : (Uo = null, g = null);
|
|
23983
|
+
let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, Uo, g)), Go = l || p || h;
|
|
23809
23984
|
return /* @__PURE__ */ jsx(Button, {
|
|
23810
23985
|
type: "button",
|
|
23811
|
-
onClick: () =>
|
|
23986
|
+
onClick: () => A(i),
|
|
23812
23987
|
onMouseEnter: () => {
|
|
23813
23988
|
e === "range" && u && !f && !isDateBefore(i, u) && c(i);
|
|
23814
23989
|
},
|
|
@@ -23817,9 +23992,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23817
23992
|
},
|
|
23818
23993
|
className: "p-0.5",
|
|
23819
23994
|
"aria-label": `Select ${formatDate(i)}`,
|
|
23820
|
-
"aria-selected":
|
|
23995
|
+
"aria-selected": Go || void 0,
|
|
23821
23996
|
children: /* @__PURE__ */ jsx("div", {
|
|
23822
|
-
className: cn("flex h-[26px] w-[26px] items-center justify-center
|
|
23997
|
+
className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", Go && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", O && !Go && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Go && !O && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Go && !O && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
23823
23998
|
children: r
|
|
23824
23999
|
})
|
|
23825
24000
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -23835,7 +24010,7 @@ function DatePickerTrigger({ displayText: e, disabled: t, className: n, onClear:
|
|
|
23835
24010
|
}
|
|
23836
24011
|
return /* @__PURE__ */ jsxs(Pressable, {
|
|
23837
24012
|
disabled: t,
|
|
23838
|
-
className: cn("flex items-center justify-start
|
|
24013
|
+
className: cn("gap-1 px-2 py-1 text-xs flex items-center justify-start rounded-full border border-neutral-300 bg-white text-left text-neutral-800 transition-colors hover:border-neutral-500", e && "border-primary-400 hover:border-primary-500 hover:bg-primary-light", n),
|
|
23839
24014
|
children: [
|
|
23840
24015
|
/* @__PURE__ */ jsx(CalendarIcon, {
|
|
23841
24016
|
size: 20,
|
|
@@ -23881,14 +24056,14 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23881
24056
|
startDate: null,
|
|
23882
24057
|
endDate: null
|
|
23883
24058
|
};
|
|
23884
|
-
function
|
|
24059
|
+
function h(t) {
|
|
23885
24060
|
e === "single" && (u || s(t), r?.(t));
|
|
23886
24061
|
}
|
|
23887
|
-
function
|
|
24062
|
+
function g(t) {
|
|
23888
24063
|
e === "range" && (u || l(t), r?.(t));
|
|
23889
24064
|
}
|
|
23890
|
-
function
|
|
23891
|
-
e === "single" ?
|
|
24065
|
+
function Go() {
|
|
24066
|
+
e === "single" ? h(null) : g({
|
|
23892
24067
|
startDate: null,
|
|
23893
24068
|
endDate: null
|
|
23894
24069
|
});
|
|
@@ -23898,15 +24073,15 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23898
24073
|
displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
|
|
23899
24074
|
disabled: i,
|
|
23900
24075
|
className: a,
|
|
23901
|
-
onClear:
|
|
24076
|
+
onClear: Go
|
|
23902
24077
|
}),
|
|
23903
24078
|
disabled: i,
|
|
23904
24079
|
children: /* @__PURE__ */ jsx(CalendarPanel, {
|
|
23905
24080
|
mode: e,
|
|
23906
24081
|
selectedDate: f,
|
|
23907
24082
|
selectedRange: p,
|
|
23908
|
-
onDateSelect:
|
|
23909
|
-
onRangeSelect:
|
|
24083
|
+
onDateSelect: h,
|
|
24084
|
+
onRangeSelect: g
|
|
23910
24085
|
})
|
|
23911
24086
|
}) });
|
|
23912
24087
|
}
|
|
@@ -23925,14 +24100,14 @@ const EVENT_CARD_HEIGHT_SIZE = {
|
|
|
23925
24100
|
};
|
|
23926
24101
|
function EventCardSkeleton({ density: e = "normal", className: t, style: n }) {
|
|
23927
24102
|
return /* @__PURE__ */ jsx(Card, {
|
|
23928
|
-
className: cn("w-full
|
|
24103
|
+
className: cn("rounded-lg p-4 w-full bg-white-variant-5", e === "normal" ? `${EVENT_CARD_HEIGHT_SIZE.normal.style}` : `${EVENT_CARD_HEIGHT_SIZE.compact.style}`, t),
|
|
23929
24104
|
style: n,
|
|
23930
24105
|
children: e === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
23931
24106
|
className: "gap-x-2 gap-y-1",
|
|
23932
24107
|
children: [
|
|
23933
24108
|
/* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5" }) }),
|
|
23934
24109
|
/* @__PURE__ */ jsxs(CardHeader, {
|
|
23935
|
-
className: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center
|
|
24110
|
+
className: "gap-2 grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center",
|
|
23936
24111
|
children: [
|
|
23937
24112
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4" }),
|
|
23938
24113
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" }),
|
|
@@ -23941,17 +24116,17 @@ function EventCardSkeleton({ density: e = "normal", className: t, style: n }) {
|
|
|
23941
24116
|
]
|
|
23942
24117
|
}),
|
|
23943
24118
|
/* @__PURE__ */ jsx(CardTitle, {
|
|
23944
|
-
className: "
|
|
24119
|
+
className: "h-5 flex items-center",
|
|
23945
24120
|
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-48" })
|
|
23946
24121
|
}),
|
|
23947
24122
|
/* @__PURE__ */ jsxs(CardContent, { children: [/* @__PURE__ */ jsx(Skeleton, { className: "my-1 h-4 w-full" }), /* @__PURE__ */ jsx(Skeleton, { className: "my-1 h-4 w-3/4" })] }),
|
|
23948
24123
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
23949
|
-
className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center
|
|
24124
|
+
className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
|
|
23950
24125
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23951
|
-
className: "
|
|
24126
|
+
className: "gap-2 flex",
|
|
23952
24127
|
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-23 rounded-full" })
|
|
23953
24128
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23954
|
-
className: "
|
|
24129
|
+
className: "gap-2 flex",
|
|
23955
24130
|
children: [
|
|
23956
24131
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-6 rounded-full" }),
|
|
23957
24132
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-6 rounded-full" }),
|
|
@@ -23961,16 +24136,16 @@ function EventCardSkeleton({ density: e = "normal", className: t, style: n }) {
|
|
|
23961
24136
|
})
|
|
23962
24137
|
]
|
|
23963
24138
|
}) : /* @__PURE__ */ jsxs(CardLayout, {
|
|
23964
|
-
className: "grid grid-cols-[auto_1fr] grid-rows-1
|
|
24139
|
+
className: "gap-x-2 grid grid-cols-[auto_1fr] grid-rows-1",
|
|
23965
24140
|
children: [/* @__PURE__ */ jsx(CardSidebar, {
|
|
23966
24141
|
className: "flex items-center justify-center",
|
|
23967
24142
|
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5" })
|
|
23968
24143
|
}), /* @__PURE__ */ jsxs(CardHeader, {
|
|
23969
|
-
className: "
|
|
24144
|
+
className: "min-w-0 gap-2 flex items-center",
|
|
23970
24145
|
children: [
|
|
23971
24146
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4" }),
|
|
23972
24147
|
/* @__PURE__ */ jsx("div", {
|
|
23973
|
-
className: "
|
|
24148
|
+
className: "min-w-0 gap-2 flex items-center",
|
|
23974
24149
|
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-32" })
|
|
23975
24150
|
}),
|
|
23976
24151
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
@@ -24010,7 +24185,7 @@ var EVENT_ACTION_CONFIG = {
|
|
|
24010
24185
|
})
|
|
24011
24186
|
}
|
|
24012
24187
|
}, eventCardStyles = tv({
|
|
24013
|
-
base: "w-full
|
|
24188
|
+
base: "rounded-lg p-4 w-full border-[1.5px] bg-white-variant-5",
|
|
24014
24189
|
variants: {
|
|
24015
24190
|
tone: {
|
|
24016
24191
|
default: "hover:bg-primary-light",
|
|
@@ -24088,7 +24263,7 @@ function EventCheckbox({ checked: e, onCheckedChange: t }) {
|
|
|
24088
24263
|
}
|
|
24089
24264
|
function EventStatusesList({ statusBadges: e, density: t }) {
|
|
24090
24265
|
return Object.keys(e).length === 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
24091
|
-
className: "
|
|
24266
|
+
className: "gap-2 flex",
|
|
24092
24267
|
children: /* @__PURE__ */ jsx(StopPropagation, { children: Object.keys(e).map((n) => {
|
|
24093
24268
|
let r = e[n];
|
|
24094
24269
|
return r ? /* @__PURE__ */ jsx(StatusBadge, {
|
|
@@ -24102,7 +24277,7 @@ function EventStatusesList({ statusBadges: e, density: t }) {
|
|
|
24102
24277
|
}
|
|
24103
24278
|
function EventActionsList({ actions: e, className: t }) {
|
|
24104
24279
|
return Object.keys(e).length === 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
24105
|
-
className: cn("
|
|
24280
|
+
className: cn("gap-2 flex", t),
|
|
24106
24281
|
children: /* @__PURE__ */ jsx(StopPropagation, { children: Object.keys(e).map((t) => {
|
|
24107
24282
|
let n = e[t];
|
|
24108
24283
|
return n ? /* @__PURE__ */ jsx(IconButton, {
|
|
@@ -24112,18 +24287,18 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
24112
24287
|
}) })
|
|
24113
24288
|
});
|
|
24114
24289
|
}
|
|
24115
|
-
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions:
|
|
24290
|
+
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: Uo = {}, density: g = "normal", className: O, style: Ko, isPriority: A, isDone: R }) {
|
|
24116
24291
|
return /* @__PURE__ */ jsx(Card, {
|
|
24117
24292
|
as: Pressable,
|
|
24118
24293
|
onPress: u,
|
|
24119
24294
|
className: cn(eventCardStyles({
|
|
24120
|
-
tone:
|
|
24295
|
+
tone: A ? "priority" : R ? "done" : "default",
|
|
24121
24296
|
state: l ? "selected" : c ? "read" : "unread",
|
|
24122
|
-
density:
|
|
24123
|
-
}),
|
|
24124
|
-
style:
|
|
24297
|
+
density: g
|
|
24298
|
+
}), O),
|
|
24299
|
+
style: Ko,
|
|
24125
24300
|
"data-service": t,
|
|
24126
|
-
children:
|
|
24301
|
+
children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
24127
24302
|
className: "gap-x-2 gap-y-1",
|
|
24128
24303
|
children: [
|
|
24129
24304
|
/* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
@@ -24131,11 +24306,11 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24131
24306
|
onCheckedChange: p
|
|
24132
24307
|
}) }),
|
|
24133
24308
|
/* @__PURE__ */ jsxs(CardHeader, {
|
|
24134
|
-
className: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center
|
|
24309
|
+
className: "gap-2 grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center",
|
|
24135
24310
|
children: [
|
|
24136
24311
|
e,
|
|
24137
24312
|
/* @__PURE__ */ jsx("span", {
|
|
24138
|
-
className: cn("min-w-0 -translate-x-0.5
|
|
24313
|
+
className: cn("min-w-0 -translate-x-0.5 text-sm font-bold truncate text-neutral-900", c && "font-medium"),
|
|
24139
24314
|
children: n
|
|
24140
24315
|
}),
|
|
24141
24316
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -24149,23 +24324,23 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24149
24324
|
]
|
|
24150
24325
|
}),
|
|
24151
24326
|
/* @__PURE__ */ jsx(CardTitle, {
|
|
24152
|
-
className: cn("
|
|
24327
|
+
className: cn("text-sm font-bold line-clamp-1 text-neutral-900", c && "font-medium"),
|
|
24153
24328
|
children: r
|
|
24154
24329
|
}),
|
|
24155
24330
|
/* @__PURE__ */ jsx(CardContent, {
|
|
24156
|
-
className: "
|
|
24331
|
+
className: "min-w-0 text-sm line-clamp-2 text-neutral-900",
|
|
24157
24332
|
children: i
|
|
24158
24333
|
}),
|
|
24159
24334
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
24160
|
-
className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center
|
|
24335
|
+
className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
|
|
24161
24336
|
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
24162
|
-
actions:
|
|
24337
|
+
actions: Uo,
|
|
24163
24338
|
className: "col-start-2 justify-self-end"
|
|
24164
24339
|
})]
|
|
24165
24340
|
})
|
|
24166
24341
|
]
|
|
24167
24342
|
}) : /* @__PURE__ */ jsxs(CardLayout, {
|
|
24168
|
-
className: "grid grid-cols-[auto_1fr] grid-rows-1
|
|
24343
|
+
className: "gap-x-2 grid grid-cols-[auto_1fr] grid-rows-1",
|
|
24169
24344
|
children: [/* @__PURE__ */ jsx(CardSidebar, {
|
|
24170
24345
|
className: "flex items-center justify-center",
|
|
24171
24346
|
children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
@@ -24173,22 +24348,22 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24173
24348
|
onCheckedChange: p
|
|
24174
24349
|
})
|
|
24175
24350
|
}), /* @__PURE__ */ jsxs(CardHeader, {
|
|
24176
|
-
className: "
|
|
24351
|
+
className: "min-w-0 gap-2 flex items-center",
|
|
24177
24352
|
children: [
|
|
24178
24353
|
e,
|
|
24179
24354
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
24180
24355
|
statusBadges: h,
|
|
24181
|
-
density:
|
|
24356
|
+
density: g
|
|
24182
24357
|
}),
|
|
24183
24358
|
/* @__PURE__ */ jsxs("div", {
|
|
24184
|
-
className: cn("
|
|
24359
|
+
className: cn("min-w-0 gap-2 text-sm font-bold flex items-center whitespace-nowrap text-neutral-900", c && "font-medium"),
|
|
24185
24360
|
children: [
|
|
24186
24361
|
/* @__PURE__ */ jsx("span", {
|
|
24187
24362
|
className: "truncate",
|
|
24188
24363
|
children: n
|
|
24189
24364
|
}),
|
|
24190
24365
|
/* @__PURE__ */ jsx("span", {
|
|
24191
|
-
className: "shrink-0 text-
|
|
24366
|
+
className: "text-sm shrink-0 text-neutral-500",
|
|
24192
24367
|
children: "•"
|
|
24193
24368
|
}),
|
|
24194
24369
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -24198,7 +24373,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24198
24373
|
]
|
|
24199
24374
|
}),
|
|
24200
24375
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
24201
|
-
/* @__PURE__ */ jsx(EventActionsList, { actions:
|
|
24376
|
+
/* @__PURE__ */ jsx(EventActionsList, { actions: Uo }),
|
|
24202
24377
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
24203
24378
|
content: o,
|
|
24204
24379
|
children: /* @__PURE__ */ jsx("span", {
|
|
@@ -24217,12 +24392,12 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24217
24392
|
}
|
|
24218
24393
|
function EventDetailContentDetailsPanel({ title: e, rows: t }) {
|
|
24219
24394
|
return /* @__PURE__ */ jsxs("div", {
|
|
24220
|
-
className: "
|
|
24395
|
+
className: "gap-2 rounded-lg p-4 text-sm flex flex-col bg-neutral-100-variant-3 text-neutral-800",
|
|
24221
24396
|
children: [e && /* @__PURE__ */ jsx("div", {
|
|
24222
24397
|
className: "font-bold",
|
|
24223
24398
|
children: e
|
|
24224
24399
|
}), /* @__PURE__ */ jsx("div", {
|
|
24225
|
-
className: "
|
|
24400
|
+
className: "gap-x-4 gap-y-1 grid grid-cols-[auto_1fr]",
|
|
24226
24401
|
children: t.map(({ label: e, value: t }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
24227
24402
|
className: "font-bold",
|
|
24228
24403
|
children: [e, ":"]
|
|
@@ -24254,25 +24429,22 @@ function EventDetailContentCalendarDetails({ from: e, to: t, link: n, location:
|
|
|
24254
24429
|
] });
|
|
24255
24430
|
}
|
|
24256
24431
|
function EventDetailPriority({ priorityText: e }) {
|
|
24257
|
-
return /* @__PURE__ */
|
|
24258
|
-
className: "
|
|
24259
|
-
children:
|
|
24260
|
-
|
|
24261
|
-
className: "text-tertiary-500-variant-2"
|
|
24262
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
24263
|
-
className: "py-1 text-xs leading-[1.2] font-normal text-neutral-800",
|
|
24432
|
+
return /* @__PURE__ */ jsx("div", {
|
|
24433
|
+
className: "top-14 min-h-14 gap-4 px-4 py-3 sticky z-5 flex shrink-0 items-center bg-tertiary-50",
|
|
24434
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
24435
|
+
className: "py-1 text-xs font-normal leading-[1.2] text-neutral-800",
|
|
24264
24436
|
children: [/* @__PURE__ */ jsx("span", {
|
|
24265
|
-
className: "font-bold",
|
|
24437
|
+
className: "font-bold text-tertiary-500",
|
|
24266
24438
|
children: "High Urgency:\xA0"
|
|
24267
24439
|
}), e]
|
|
24268
|
-
})
|
|
24440
|
+
})
|
|
24269
24441
|
});
|
|
24270
24442
|
}
|
|
24271
24443
|
function EventDetailSummary({ summary: e }) {
|
|
24272
24444
|
return /* @__PURE__ */ jsxs("div", {
|
|
24273
|
-
className: "
|
|
24445
|
+
className: "gap-2 rounded-lg p-4 flex bg-neutral-100-variant-3",
|
|
24274
24446
|
children: [/* @__PURE__ */ jsx(SummaryIcon, { size: 24 }), /* @__PURE__ */ jsxs("p", {
|
|
24275
|
-
className: "text-sm leading-[1.3]
|
|
24447
|
+
className: "text-sm font-normal leading-[1.3] text-neutral-800",
|
|
24276
24448
|
children: [/* @__PURE__ */ jsx("span", {
|
|
24277
24449
|
className: "font-bold",
|
|
24278
24450
|
children: "Summary:\xA0"
|
|
@@ -24280,17 +24452,13 @@ function EventDetailSummary({ summary: e }) {
|
|
|
24280
24452
|
})]
|
|
24281
24453
|
});
|
|
24282
24454
|
}
|
|
24283
|
-
function EventDetailContentHeader({ summary: e, priorityText: t,
|
|
24455
|
+
function EventDetailContentHeader({ summary: e, priorityText: t, children: n, className: r }) {
|
|
24284
24456
|
return /* @__PURE__ */ jsxs("div", {
|
|
24285
|
-
className: cn("flex flex-col",
|
|
24286
|
-
children: [
|
|
24287
|
-
|
|
24288
|
-
|
|
24289
|
-
|
|
24290
|
-
className: "flex flex-col gap-4 p-4",
|
|
24291
|
-
children: [e != null && /* @__PURE__ */ jsx(EventDetailSummary, { summary: e }), r]
|
|
24292
|
-
})
|
|
24293
|
-
]
|
|
24457
|
+
className: cn("flex flex-col", r),
|
|
24458
|
+
children: [t != null && /* @__PURE__ */ jsx(EventDetailPriority, { priorityText: t }), /* @__PURE__ */ jsxs("div", {
|
|
24459
|
+
className: "gap-4 p-4 flex flex-col",
|
|
24460
|
+
children: [e != null && /* @__PURE__ */ jsx(EventDetailSummary, { summary: e }), n]
|
|
24461
|
+
})]
|
|
24294
24462
|
});
|
|
24295
24463
|
}
|
|
24296
24464
|
function EventDetailContentCalendar({ detail: { summary: e, body: t, priorityText: n, from: r, to: i, link: a, location: o }, className: s }) {
|
|
@@ -24333,7 +24501,6 @@ function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText:
|
|
|
24333
24501
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24334
24502
|
summary: e,
|
|
24335
24503
|
priorityText: n,
|
|
24336
|
-
highlightPriority: !!n,
|
|
24337
24504
|
className: s,
|
|
24338
24505
|
children: [/* @__PURE__ */ jsx(EventDetailContentEmailDetails, {
|
|
24339
24506
|
subject: r,
|
|
@@ -24341,18 +24508,18 @@ function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText:
|
|
|
24341
24508
|
date: a,
|
|
24342
24509
|
from: o
|
|
24343
24510
|
}), /* @__PURE__ */ jsx(RichContent, {
|
|
24344
|
-
className: "max-w-[1260px]
|
|
24511
|
+
className: "px-4 max-w-[1260px]",
|
|
24345
24512
|
content: t
|
|
24346
24513
|
})]
|
|
24347
24514
|
});
|
|
24348
24515
|
}
|
|
24349
24516
|
function DateSeparator({ timestamp: e }) {
|
|
24350
24517
|
return /* @__PURE__ */ jsxs("div", {
|
|
24351
|
-
className: "flex items-center
|
|
24518
|
+
className: "gap-4 flex items-center",
|
|
24352
24519
|
children: [
|
|
24353
24520
|
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-neutral-300-variant-2" }),
|
|
24354
24521
|
/* @__PURE__ */ jsx("span", {
|
|
24355
|
-
className: "rounded-full border border-neutral-300-variant-2
|
|
24522
|
+
className: "px-3 py-1 text-xs font-semibold rounded-full border border-neutral-300-variant-2 text-neutral-600",
|
|
24356
24523
|
children: e
|
|
24357
24524
|
}),
|
|
24358
24525
|
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-neutral-300-variant-2" })
|
|
@@ -24386,7 +24553,7 @@ function MessageContent({ content: e }) {
|
|
|
24386
24553
|
function RepliesTrigger({ replyId: e, replyCount: t }) {
|
|
24387
24554
|
let { openItems: n } = useAccordion();
|
|
24388
24555
|
return /* @__PURE__ */ jsxs("div", {
|
|
24389
|
-
className: "
|
|
24556
|
+
className: "gap-2 p-1.5 px-2 text-xs font-medium flex items-center text-neutral-600",
|
|
24390
24557
|
children: [/* @__PURE__ */ jsx(ArrowIcon, {
|
|
24391
24558
|
direction: n.has(`replies-${e}`) ? "up" : "down",
|
|
24392
24559
|
size: 12,
|
|
@@ -24407,26 +24574,26 @@ function MessageReplies({ replies: e }) {
|
|
|
24407
24574
|
defaultValue: [`replies-${t}`],
|
|
24408
24575
|
children: /* @__PURE__ */ jsxs(AccordionItem, {
|
|
24409
24576
|
value: `replies-${t}`,
|
|
24410
|
-
className: "flex flex-col
|
|
24577
|
+
className: "gap-2 flex flex-col",
|
|
24411
24578
|
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
24412
24579
|
value: `replies-${t}`,
|
|
24413
|
-
className: "flex items-center justify-between
|
|
24580
|
+
className: "rounded hover:bg-neutral-50 flex items-center justify-between transition-colors",
|
|
24414
24581
|
children: /* @__PURE__ */ jsx(RepliesTrigger, {
|
|
24415
24582
|
replyId: t,
|
|
24416
24583
|
replyCount: e.length
|
|
24417
24584
|
})
|
|
24418
24585
|
}), /* @__PURE__ */ jsx(AccordionContent, {
|
|
24419
24586
|
value: `replies-${t}`,
|
|
24420
|
-
className: "ml-3 flex flex-col
|
|
24587
|
+
className: "ml-3 gap-4 pl-4 flex flex-col border-l-2 border-neutral-500",
|
|
24421
24588
|
children: e.map((e) => /* @__PURE__ */ jsxs("div", {
|
|
24422
|
-
className: "
|
|
24589
|
+
className: "gap-3 flex",
|
|
24423
24590
|
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
24424
24591
|
name: e.author,
|
|
24425
24592
|
size: "lg"
|
|
24426
24593
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24427
24594
|
className: "min-w-0 flex-1",
|
|
24428
24595
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24429
|
-
className: "flex items-center
|
|
24596
|
+
className: "gap-2 flex items-center",
|
|
24430
24597
|
children: [/* @__PURE__ */ jsx("div", {
|
|
24431
24598
|
className: "text-sm font-semibold text-neutral-900",
|
|
24432
24599
|
children: e.author
|
|
@@ -24445,16 +24612,16 @@ function MessageItem({ message: e, isPriority: t = !1 }) {
|
|
|
24445
24612
|
return /* @__PURE__ */ jsx("div", {
|
|
24446
24613
|
className: "transition-colors",
|
|
24447
24614
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24448
|
-
className: "
|
|
24615
|
+
className: "gap-3 flex",
|
|
24449
24616
|
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
24450
24617
|
name: e.author,
|
|
24451
24618
|
size: t ? "xl" : "lg"
|
|
24452
24619
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24453
|
-
className: "
|
|
24620
|
+
className: "min-w-0 gap-2 flex flex-1 flex-col",
|
|
24454
24621
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24455
|
-
className: "flex flex-col
|
|
24622
|
+
className: "gap-1 flex flex-col",
|
|
24456
24623
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24457
|
-
className: "flex items-center
|
|
24624
|
+
className: "gap-2 flex items-center",
|
|
24458
24625
|
children: [
|
|
24459
24626
|
/* @__PURE__ */ jsx("div", {
|
|
24460
24627
|
className: "text-sm font-semibold text-neutral-900",
|
|
@@ -24480,14 +24647,14 @@ function PriorityNavigation({ priorityIndex: e, priorityTotal: t, onPreviousPrio
|
|
|
24480
24647
|
if (!e || !t || t <= 1) return null;
|
|
24481
24648
|
let i = e > 1, a = e < t;
|
|
24482
24649
|
return !a && !i ? null : /* @__PURE__ */ jsx("div", {
|
|
24483
|
-
className: "mb-3 flex justify-center
|
|
24650
|
+
className: "mb-3 px-2 flex justify-center",
|
|
24484
24651
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24485
|
-
className: "flex w-full items-center justify-center
|
|
24652
|
+
className: "gap-4 flex w-full items-center justify-center",
|
|
24486
24653
|
children: [
|
|
24487
24654
|
/* @__PURE__ */ jsx("div", {
|
|
24488
24655
|
className: "flex flex-1 justify-end",
|
|
24489
24656
|
children: a && /* @__PURE__ */ jsxs(Button, {
|
|
24490
|
-
className: "
|
|
24657
|
+
className: "gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium flex border border-tertiary-500 bg-white text-tertiary-500 transition-colors hover:bg-tertiary-50",
|
|
24491
24658
|
"aria-label": "Previous Fire",
|
|
24492
24659
|
onClick: n,
|
|
24493
24660
|
children: [/* @__PURE__ */ jsx(ArrowIcon, {
|
|
@@ -24507,7 +24674,7 @@ function PriorityNavigation({ priorityIndex: e, priorityTotal: t, onPreviousPrio
|
|
|
24507
24674
|
/* @__PURE__ */ jsx("div", {
|
|
24508
24675
|
className: "flex-1",
|
|
24509
24676
|
children: i && /* @__PURE__ */ jsxs(Button, {
|
|
24510
|
-
className: "
|
|
24677
|
+
className: "gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium flex border border-tertiary-500 bg-white text-tertiary-500 transition-colors hover:bg-tertiary-50",
|
|
24511
24678
|
"aria-label": "Next Fire",
|
|
24512
24679
|
onClick: r,
|
|
24513
24680
|
children: [/* @__PURE__ */ jsx("span", { children: "Next Fire" }), /* @__PURE__ */ jsx(ArrowIcon, {
|
|
@@ -24522,15 +24689,15 @@ function PriorityNavigation({ priorityIndex: e, priorityTotal: t, onPreviousPrio
|
|
|
24522
24689
|
}
|
|
24523
24690
|
function PriorityGroupHeader({ title: e, onMarkAsNotFireClick: t }) {
|
|
24524
24691
|
return e ? /* @__PURE__ */ jsx("div", {
|
|
24525
|
-
className: "border-b border-neutral-200
|
|
24692
|
+
className: "pb-3 border-b border-neutral-200",
|
|
24526
24693
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24527
|
-
className: "flex items-center
|
|
24694
|
+
className: "gap-2 flex items-center",
|
|
24528
24695
|
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
24529
24696
|
icon: /* @__PURE__ */ jsx(FireIcon, {
|
|
24530
24697
|
size: 16,
|
|
24531
24698
|
className: "text-tertiary-500"
|
|
24532
24699
|
}),
|
|
24533
|
-
className: "
|
|
24700
|
+
className: "h-6 w-6 relative flex shrink-0 items-center justify-center rounded-full border border-tertiary-400 bg-tertiary-50 transition-opacity hover:opacity-70",
|
|
24534
24701
|
"aria-label": "Priority",
|
|
24535
24702
|
onClick: t
|
|
24536
24703
|
}), /* @__PURE__ */ jsx("h4", {
|
|
@@ -24550,7 +24717,7 @@ function PriorityGroup({ group: e, children: t, onPreviousPriority: n, onNextPri
|
|
|
24550
24717
|
onPreviousPriority: n,
|
|
24551
24718
|
onNextPriority: r
|
|
24552
24719
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24553
|
-
className: "
|
|
24720
|
+
className: "gap-4 rounded-r-lg p-4 relative flex flex-col border-l-[3px] border-tertiary-500 bg-tertiary-50-alpha-50",
|
|
24554
24721
|
children: [/* @__PURE__ */ jsx(PriorityGroupHeader, {
|
|
24555
24722
|
title: e.priorityText,
|
|
24556
24723
|
onMarkAsNotFireClick: i
|
|
@@ -24560,7 +24727,7 @@ function PriorityGroup({ group: e, children: t, onPreviousPriority: n, onNextPri
|
|
|
24560
24727
|
}
|
|
24561
24728
|
function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
|
|
24562
24729
|
return /* @__PURE__ */ jsxs("div", {
|
|
24563
|
-
className: "flex flex-col
|
|
24730
|
+
className: "gap-4 flex flex-col",
|
|
24564
24731
|
children: [/* @__PURE__ */ jsx(DateSeparator, { timestamp: e.timestamp }), /* @__PURE__ */ jsx(PriorityGroup, {
|
|
24565
24732
|
group: e,
|
|
24566
24733
|
onPreviousPriority: t,
|
|
@@ -24598,7 +24765,7 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
24598
24765
|
className: r,
|
|
24599
24766
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24600
24767
|
ref: a,
|
|
24601
|
-
className: "flex flex-col
|
|
24768
|
+
className: "gap-4 flex flex-col",
|
|
24602
24769
|
children: [e.map((e) => {
|
|
24603
24770
|
let t = e.isPriority ? c-- : 0, n = t ? () => {
|
|
24604
24771
|
let e = t + 1;
|
|
@@ -24675,12 +24842,11 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
|
|
|
24675
24842
|
]
|
|
24676
24843
|
})] });
|
|
24677
24844
|
}
|
|
24678
|
-
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related: h }, className:
|
|
24845
|
+
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related: h }, className: Uo }) {
|
|
24679
24846
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24680
24847
|
summary: e,
|
|
24681
24848
|
priorityText: n,
|
|
24682
|
-
|
|
24683
|
-
className: g,
|
|
24849
|
+
className: Uo,
|
|
24684
24850
|
children: [
|
|
24685
24851
|
/* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
|
|
24686
24852
|
issue: r,
|
|
@@ -24700,18 +24866,149 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
24700
24866
|
children: "Description"
|
|
24701
24867
|
}),
|
|
24702
24868
|
/* @__PURE__ */ jsx(RichContent, {
|
|
24703
|
-
className: "max-w-[1260px]
|
|
24869
|
+
className: "px-4 max-w-[1260px]",
|
|
24704
24870
|
content: t
|
|
24705
24871
|
})
|
|
24706
24872
|
]
|
|
24707
24873
|
});
|
|
24708
24874
|
}
|
|
24709
|
-
|
|
24875
|
+
var eventSummaryCardStyles = tv({
|
|
24876
|
+
base: "gap-1 rounded-lg p-4 flex w-full flex-col justify-between border-[1.5px] bg-white-variant-5",
|
|
24877
|
+
variants: {
|
|
24878
|
+
tone: {
|
|
24879
|
+
default: "hover:bg-primary-light",
|
|
24880
|
+
priority: "hover:bg-tertiary-500-variant-4"
|
|
24881
|
+
},
|
|
24882
|
+
state: {
|
|
24883
|
+
normal: "",
|
|
24884
|
+
selected: ""
|
|
24885
|
+
}
|
|
24886
|
+
},
|
|
24887
|
+
compoundVariants: [
|
|
24888
|
+
{
|
|
24889
|
+
tone: "default",
|
|
24890
|
+
state: "normal",
|
|
24891
|
+
class: "border-neutral-400"
|
|
24892
|
+
},
|
|
24893
|
+
{
|
|
24894
|
+
tone: "default",
|
|
24895
|
+
state: "selected",
|
|
24896
|
+
class: "border-primary-500 bg-primary-light"
|
|
24897
|
+
},
|
|
24898
|
+
{
|
|
24899
|
+
tone: "priority",
|
|
24900
|
+
state: "normal",
|
|
24901
|
+
class: "border-tertiary-500-variant-3"
|
|
24902
|
+
},
|
|
24903
|
+
{
|
|
24904
|
+
tone: "priority",
|
|
24905
|
+
state: "selected",
|
|
24906
|
+
class: "border-tertiary-500-variant-2 bg-tertiary-500-variant-4"
|
|
24907
|
+
}
|
|
24908
|
+
]
|
|
24909
|
+
});
|
|
24910
|
+
function insightLabelVisible(e) {
|
|
24911
|
+
return e != null && e !== "";
|
|
24912
|
+
}
|
|
24913
|
+
function EventSummaryInsightChip({ label: e }) {
|
|
24710
24914
|
return /* @__PURE__ */ jsxs("div", {
|
|
24711
|
-
className:
|
|
24712
|
-
|
|
24713
|
-
|
|
24714
|
-
className: "
|
|
24915
|
+
className: "h-5 gap-1 px-1.5 inline-flex shrink-0 items-center rounded-full border border-primary-400 bg-primary-light",
|
|
24916
|
+
children: [/* @__PURE__ */ jsx(InsightIcon, {
|
|
24917
|
+
size: 13,
|
|
24918
|
+
className: "text-primary-500"
|
|
24919
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
24920
|
+
className: "font-semibold text-[10px] leading-none whitespace-nowrap text-primary-500",
|
|
24921
|
+
children: e
|
|
24922
|
+
})]
|
|
24923
|
+
});
|
|
24924
|
+
}
|
|
24925
|
+
function EventSummaryFireButton({ active: e, onClick: t }) {
|
|
24926
|
+
return /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
|
|
24927
|
+
className: cn("group h-5 w-5 rounded-full border border-neutral-300 hover:border-tertiary-400 hover:bg-tertiary-50", e && "border-tertiary-400 bg-tertiary-50"),
|
|
24928
|
+
icon: e ? /* @__PURE__ */ jsxs("span", {
|
|
24929
|
+
className: "contents",
|
|
24930
|
+
children: [/* @__PURE__ */ jsx(FireFillIcon, {
|
|
24931
|
+
size: 16,
|
|
24932
|
+
className: "block text-tertiary-500-variant-2 opacity-100 group-hover:hidden group-hover:opacity-0"
|
|
24933
|
+
}), /* @__PURE__ */ jsx(CloseIcon, {
|
|
24934
|
+
size: 12,
|
|
24935
|
+
className: "hidden text-neutral-500 opacity-0 group-hover:block group-hover:text-tertiary-500-variant-2 group-hover:opacity-100",
|
|
24936
|
+
strokeWidth: 2
|
|
24937
|
+
})]
|
|
24938
|
+
}) : /* @__PURE__ */ jsx(FireIcon, {
|
|
24939
|
+
size: 16,
|
|
24940
|
+
className: "text-neutral-500 group-hover:text-tertiary-500-variant-2"
|
|
24941
|
+
}),
|
|
24942
|
+
onClick: t,
|
|
24943
|
+
"aria-pressed": e
|
|
24944
|
+
}) });
|
|
24945
|
+
}
|
|
24946
|
+
function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, workspace: o, selected: s = !1, onSelect: c, actions: l, className: u }) {
|
|
24947
|
+
let { fire: f, insight: p, link: h } = l, Uo = p?.label ?? null;
|
|
24948
|
+
return /* @__PURE__ */ jsxs(Pressable, {
|
|
24949
|
+
onPress: c,
|
|
24950
|
+
className: cn(eventSummaryCardStyles({
|
|
24951
|
+
tone: f.active ? "priority" : "default",
|
|
24952
|
+
state: s ? "selected" : "normal"
|
|
24953
|
+
}), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
|
|
24954
|
+
"data-service": t,
|
|
24955
|
+
children: [
|
|
24956
|
+
/* @__PURE__ */ jsxs("div", {
|
|
24957
|
+
className: "gap-1.5 flex items-center justify-between",
|
|
24958
|
+
children: [
|
|
24959
|
+
e,
|
|
24960
|
+
/* @__PURE__ */ jsx("span", {
|
|
24961
|
+
className: "min-w-0 -translate-x-0.5 text-sm font-medium truncate text-neutral-900",
|
|
24962
|
+
children: n
|
|
24963
|
+
}),
|
|
24964
|
+
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
24965
|
+
content: o,
|
|
24966
|
+
children: /* @__PURE__ */ jsx(Avatar, {
|
|
24967
|
+
name: o,
|
|
24968
|
+
size: "xs"
|
|
24969
|
+
})
|
|
24970
|
+
}),
|
|
24971
|
+
/* @__PURE__ */ jsx("span", {
|
|
24972
|
+
className: "text-xs leading-tight font-semibold tracking-wide flex-1 text-right whitespace-nowrap text-neutral-800",
|
|
24973
|
+
children: a
|
|
24974
|
+
}),
|
|
24975
|
+
insightLabelVisible(Uo) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: Uo }),
|
|
24976
|
+
/* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
24977
|
+
active: f.active,
|
|
24978
|
+
onClick: f.onClick
|
|
24979
|
+
})
|
|
24980
|
+
]
|
|
24981
|
+
}),
|
|
24982
|
+
/* @__PURE__ */ jsx("div", {
|
|
24983
|
+
className: "text-sm font-medium line-clamp-1 text-neutral-900",
|
|
24984
|
+
children: r
|
|
24985
|
+
}),
|
|
24986
|
+
/* @__PURE__ */ jsxs("div", {
|
|
24987
|
+
className: "gap-2 flex",
|
|
24988
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
24989
|
+
className: "min-w-0 text-sm font-normal line-clamp-1 flex-1 text-neutral-700",
|
|
24990
|
+
children: i
|
|
24991
|
+
}), /* @__PURE__ */ jsx(InfoTooltip, {
|
|
24992
|
+
content: h.tooltip,
|
|
24993
|
+
children: /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
|
|
24994
|
+
type: "button",
|
|
24995
|
+
icon: /* @__PURE__ */ jsx(ExternalLinkIcon, {
|
|
24996
|
+
size: 16,
|
|
24997
|
+
className: "text-neutral-800"
|
|
24998
|
+
}),
|
|
24999
|
+
className: "text-primary-500",
|
|
25000
|
+
onClick: h.onClick
|
|
25001
|
+
}) })
|
|
25002
|
+
})]
|
|
25003
|
+
})
|
|
25004
|
+
]
|
|
25005
|
+
});
|
|
25006
|
+
}
|
|
25007
|
+
function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, timestamp: a, isPriority: o, isOpen: s, isFirstEvent: c, isSingleEvent: l, className: u, onFireClick: f }) {
|
|
25008
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25009
|
+
className: cn("h-14 min-w-0 px-4 py-2 flex w-full items-center overflow-hidden bg-white", u),
|
|
25010
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
25011
|
+
className: "min-w-0 gap-3 flex w-full items-center overflow-hidden",
|
|
24715
25012
|
children: [
|
|
24716
25013
|
c && /* @__PURE__ */ jsx(IconButton, {
|
|
24717
25014
|
icon: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
@@ -24720,41 +25017,36 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
|
|
|
24720
25017
|
className: "text-neutral-700"
|
|
24721
25018
|
}),
|
|
24722
25019
|
"aria-label": "Go back",
|
|
24723
|
-
className: "rounded p-1 hover:bg-neutral-100
|
|
24724
|
-
}),
|
|
24725
|
-
/* @__PURE__ */ jsx("div", {
|
|
24726
|
-
className: "relative shrink-0",
|
|
24727
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
24728
|
-
className: "relative flex items-center justify-center",
|
|
24729
|
-
children: [cloneElement(e, { size: 36 }), !s && o && /* @__PURE__ */ jsx(FireIcon, {
|
|
24730
|
-
size: 16,
|
|
24731
|
-
className: "absolute right-[-12px] bottom-0 text-tertiary-500-variant-2"
|
|
24732
|
-
})]
|
|
24733
|
-
})
|
|
25020
|
+
className: "rounded p-1 md:hidden hover:bg-neutral-100"
|
|
24734
25021
|
}),
|
|
25022
|
+
cloneElement(e, { size: 36 }),
|
|
24735
25023
|
/* @__PURE__ */ jsxs("div", {
|
|
24736
25024
|
className: "w-0 min-w-0 flex-1 overflow-hidden",
|
|
24737
25025
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
24738
|
-
className: "block truncate
|
|
25026
|
+
className: "text-sm font-bold block truncate leading-[1.3] text-neutral-900",
|
|
24739
25027
|
children: n
|
|
24740
25028
|
}), /* @__PURE__ */ jsx("div", {
|
|
24741
|
-
className: "block truncate
|
|
25029
|
+
className: "text-sm font-normal block truncate leading-[1.3] text-neutral-900",
|
|
24742
25030
|
children: t
|
|
24743
25031
|
})]
|
|
24744
25032
|
}),
|
|
24745
25033
|
/* @__PURE__ */ jsxs("div", {
|
|
24746
|
-
className: "flex max-w-[180px]
|
|
25034
|
+
className: "min-w-0 gap-1 text-xs flex max-w-[180px] shrink items-center text-right leading-[1.2] tracking-[0.12px]",
|
|
24747
25035
|
children: [r != null && /* @__PURE__ */ jsx("span", {
|
|
24748
|
-
className: "min-w-0
|
|
25036
|
+
className: "min-w-0 font-normal truncate text-neutral-600",
|
|
24749
25037
|
children: r
|
|
24750
25038
|
}), /* @__PURE__ */ jsx("span", {
|
|
24751
|
-
className: "shrink-0
|
|
25039
|
+
className: "font-medium shrink-0 whitespace-nowrap text-neutral-600",
|
|
24752
25040
|
children: a
|
|
24753
25041
|
})]
|
|
24754
25042
|
}),
|
|
24755
|
-
/* @__PURE__ */
|
|
24756
|
-
|
|
24757
|
-
|
|
25043
|
+
/* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
25044
|
+
active: o,
|
|
25045
|
+
onClick: f
|
|
25046
|
+
}),
|
|
25047
|
+
!l && /* @__PURE__ */ jsx("div", {
|
|
25048
|
+
className: "gap-2 flex shrink-0 items-center",
|
|
25049
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
24758
25050
|
icon: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
24759
25051
|
size: 24,
|
|
24760
25052
|
className: "text-neutral-700",
|
|
@@ -24762,17 +25054,21 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
|
|
|
24762
25054
|
}),
|
|
24763
25055
|
"aria-label": "Toggle event",
|
|
24764
25056
|
className: "rounded p-1 hover:bg-neutral-100"
|
|
24765
|
-
})
|
|
25057
|
+
})
|
|
25058
|
+
}),
|
|
25059
|
+
c && /* @__PURE__ */ jsx("div", {
|
|
25060
|
+
className: "gap-2 md:hidden flex shrink-0 items-center",
|
|
25061
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
24766
25062
|
icon: /* @__PURE__ */ jsx(MoreIcon, {
|
|
24767
25063
|
size: 24,
|
|
24768
25064
|
className: "text-neutral-700"
|
|
24769
25065
|
}),
|
|
24770
25066
|
"aria-label": "Close",
|
|
24771
|
-
className: "rounded p-1 hover:bg-neutral-100
|
|
24772
|
-
})
|
|
25067
|
+
className: "rounded p-1 hover:bg-neutral-100"
|
|
25068
|
+
})
|
|
24773
25069
|
})
|
|
24774
25070
|
]
|
|
24775
|
-
})
|
|
25071
|
+
})
|
|
24776
25072
|
});
|
|
24777
25073
|
}
|
|
24778
25074
|
function EventDetailSkeleton({ className: e }) {
|
|
@@ -24783,13 +25079,13 @@ function EventDetailSkeleton({ className: e }) {
|
|
|
24783
25079
|
}
|
|
24784
25080
|
function EventDetailHeaderSkeleton({ className: e }) {
|
|
24785
25081
|
return /* @__PURE__ */ jsx("div", {
|
|
24786
|
-
className: cn("
|
|
25082
|
+
className: cn("h-14 px-4 py-2 flex w-full items-center bg-white", e),
|
|
24787
25083
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24788
|
-
className: "flex w-full items-center
|
|
25084
|
+
className: "gap-4 flex w-full items-center",
|
|
24789
25085
|
children: [
|
|
24790
25086
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-9 rounded-full" }),
|
|
24791
25087
|
/* @__PURE__ */ jsxs("div", {
|
|
24792
|
-
className: "min-w-0
|
|
25088
|
+
className: "min-w-0 space-y-2 flex-1",
|
|
24793
25089
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-3/12" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-9/12" })]
|
|
24794
25090
|
}),
|
|
24795
25091
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-14" })
|
|
@@ -24801,11 +25097,11 @@ function EventDetailContentSkeleton() {
|
|
|
24801
25097
|
return /* @__PURE__ */ jsx("div", {
|
|
24802
25098
|
className: "flex flex-col",
|
|
24803
25099
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24804
|
-
className: "
|
|
25100
|
+
className: "gap-4 p-4 flex flex-col",
|
|
24805
25101
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24806
|
-
className: "
|
|
25102
|
+
className: "gap-2 rounded-lg p-4 flex bg-neutral-100-variant-3",
|
|
24807
25103
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-6 rounded" }), /* @__PURE__ */ jsxs("div", {
|
|
24808
|
-
className: "
|
|
25104
|
+
className: "space-y-2 flex-1",
|
|
24809
25105
|
children: [
|
|
24810
25106
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-6/12" }),
|
|
24811
25107
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-10/12" }),
|
|
@@ -24847,7 +25143,7 @@ function renderEventContent(e) {
|
|
|
24847
25143
|
function getEventValue(e, t) {
|
|
24848
25144
|
return e.id ?? `${e.type}-${e.timestamp}-${t}`;
|
|
24849
25145
|
}
|
|
24850
|
-
function EventDetail({ events: e, expandedEventIndex: t }) {
|
|
25146
|
+
function EventDetail({ events: e, expandedEventIndex: t, onFireClick: n }) {
|
|
24851
25147
|
if (e.length === 0) return null;
|
|
24852
25148
|
if (e.length === 1) {
|
|
24853
25149
|
let t = e[0];
|
|
@@ -24863,67 +25159,69 @@ function EventDetail({ events: e, expandedEventIndex: t }) {
|
|
|
24863
25159
|
isOpen: !0,
|
|
24864
25160
|
isFirstEvent: !0,
|
|
24865
25161
|
isSingleEvent: !0,
|
|
24866
|
-
className: "
|
|
25162
|
+
className: "top-0 sticky z-10 border-b border-neutral-400",
|
|
25163
|
+
onFireClick: n
|
|
24867
25164
|
}), renderEventContent(t)]
|
|
24868
25165
|
});
|
|
24869
25166
|
}
|
|
24870
25167
|
return /* @__PURE__ */ jsx(Accordion, {
|
|
24871
25168
|
className: "w-full",
|
|
24872
25169
|
defaultValue: t === void 0 ? getEventValue(e[0], 0) : getEventValue(e[t], t),
|
|
24873
|
-
children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment$1, { children: e.map((
|
|
24874
|
-
let
|
|
25170
|
+
children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment$1, { children: e.map((r, i) => {
|
|
25171
|
+
let a = getEventValue(r, i), o = t.has(a);
|
|
24875
25172
|
return /* @__PURE__ */ jsxs(AccordionItem, {
|
|
24876
|
-
value:
|
|
25173
|
+
value: a,
|
|
24877
25174
|
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
24878
|
-
value:
|
|
24879
|
-
className: "
|
|
25175
|
+
value: a,
|
|
25176
|
+
className: "top-0 sticky z-10",
|
|
24880
25177
|
children: /* @__PURE__ */ jsx(EventDetailHeader, {
|
|
24881
|
-
icon:
|
|
24882
|
-
subject:
|
|
24883
|
-
from:
|
|
24884
|
-
prefixTimestamp:
|
|
24885
|
-
timestamp:
|
|
24886
|
-
isPriority:
|
|
24887
|
-
isFirstEvent:
|
|
25178
|
+
icon: r.icon,
|
|
25179
|
+
subject: r.subject,
|
|
25180
|
+
from: r.from,
|
|
25181
|
+
prefixTimestamp: r.prefixTimestamp,
|
|
25182
|
+
timestamp: r.timestamp,
|
|
25183
|
+
isPriority: r.isPriority,
|
|
25184
|
+
isFirstEvent: i === 0,
|
|
24888
25185
|
isSingleEvent: !1,
|
|
24889
|
-
isOpen:
|
|
24890
|
-
className: "border-b border-neutral-400"
|
|
25186
|
+
isOpen: o,
|
|
25187
|
+
className: "border-b border-neutral-400",
|
|
25188
|
+
onFireClick: n
|
|
24891
25189
|
})
|
|
24892
25190
|
}), /* @__PURE__ */ jsx(AccordionContent, {
|
|
24893
|
-
value:
|
|
24894
|
-
className: cn(
|
|
24895
|
-
children: renderEventContent(
|
|
25191
|
+
value: a,
|
|
25192
|
+
className: cn(i < e.length - 1 && o && "border-b border-neutral-400"),
|
|
25193
|
+
children: renderEventContent(r)
|
|
24896
25194
|
})]
|
|
24897
|
-
},
|
|
25195
|
+
}, a);
|
|
24898
25196
|
}) })
|
|
24899
25197
|
});
|
|
24900
25198
|
}
|
|
24901
25199
|
const EventEmptyState = ({ icon: e, title: t, description: n }) => /* @__PURE__ */ jsxs("div", {
|
|
24902
|
-
className: "flex w-full flex-1 flex-col items-center justify-center
|
|
25200
|
+
className: "gap-3 p-4 flex w-full flex-1 flex-col items-center justify-center",
|
|
24903
25201
|
children: [cloneElement(e, {
|
|
24904
25202
|
size: e.props.size ?? 35,
|
|
24905
25203
|
className: "text-neutral-500"
|
|
24906
25204
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24907
|
-
className: "flex flex-col items-center justify-center
|
|
25205
|
+
className: "gap-1 flex flex-col items-center justify-center",
|
|
24908
25206
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
24909
|
-
className: "text-base leading-[1.3]
|
|
25207
|
+
className: "text-base font-medium leading-[1.3] text-neutral-900",
|
|
24910
25208
|
children: t
|
|
24911
25209
|
}), /* @__PURE__ */ jsx("p", {
|
|
24912
|
-
className: "w-full text-center
|
|
25210
|
+
className: "text-xs font-normal w-full text-center leading-[1.3] text-neutral-600",
|
|
24913
25211
|
children: n
|
|
24914
25212
|
})]
|
|
24915
25213
|
})]
|
|
24916
25214
|
});
|
|
24917
25215
|
function EventSummaryCardSkeleton({ className: e, style: t }) {
|
|
24918
25216
|
return /* @__PURE__ */ jsxs("div", {
|
|
24919
|
-
className: cn("flex w-full flex-col justify-between
|
|
25217
|
+
className: cn("gap-1 rounded-lg p-4 flex w-full flex-col justify-between bg-white-variant-5", EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, e),
|
|
24920
25218
|
style: t,
|
|
24921
25219
|
children: [
|
|
24922
25220
|
/* @__PURE__ */ jsxs("div", {
|
|
24923
|
-
className: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto_auto_auto] items-center
|
|
25221
|
+
className: "gap-1.5 grid grid-cols-[auto_minmax(0,1fr)_auto_auto_auto_auto] items-center",
|
|
24924
25222
|
children: [
|
|
24925
25223
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4" }),
|
|
24926
|
-
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-
|
|
25224
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 max-w-40 w-full" }),
|
|
24927
25225
|
/* @__PURE__ */ jsx(Skeleton, { className: "size-4 rounded-full" }),
|
|
24928
25226
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-12" }),
|
|
24929
25227
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-full" }),
|
|
@@ -24932,162 +25230,47 @@ function EventSummaryCardSkeleton({ className: e, style: t }) {
|
|
|
24932
25230
|
}),
|
|
24933
25231
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-7/12" }),
|
|
24934
25232
|
/* @__PURE__ */ jsxs("div", {
|
|
24935
|
-
className: "flex items-center
|
|
25233
|
+
className: "gap-2 flex items-center",
|
|
24936
25234
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 min-w-0 flex-1" }), /* @__PURE__ */ jsx(Skeleton, { className: "size-5 shrink-0" })]
|
|
24937
25235
|
})
|
|
24938
25236
|
]
|
|
24939
25237
|
});
|
|
24940
25238
|
}
|
|
24941
|
-
var eventSummaryCardStyles = tv({
|
|
24942
|
-
base: "flex w-full flex-col justify-between gap-1 rounded-lg border-[1.5px] bg-white-variant-5 p-4",
|
|
24943
|
-
variants: {
|
|
24944
|
-
tone: {
|
|
24945
|
-
default: "hover:bg-primary-light",
|
|
24946
|
-
priority: "hover:bg-tertiary-500-variant-4"
|
|
24947
|
-
},
|
|
24948
|
-
state: {
|
|
24949
|
-
normal: "",
|
|
24950
|
-
selected: ""
|
|
24951
|
-
}
|
|
24952
|
-
},
|
|
24953
|
-
compoundVariants: [
|
|
24954
|
-
{
|
|
24955
|
-
tone: "default",
|
|
24956
|
-
state: "normal",
|
|
24957
|
-
class: "border-neutral-400"
|
|
24958
|
-
},
|
|
24959
|
-
{
|
|
24960
|
-
tone: "default",
|
|
24961
|
-
state: "selected",
|
|
24962
|
-
class: "border-primary-500 bg-primary-light"
|
|
24963
|
-
},
|
|
24964
|
-
{
|
|
24965
|
-
tone: "priority",
|
|
24966
|
-
state: "normal",
|
|
24967
|
-
class: "border-tertiary-500-variant-3"
|
|
24968
|
-
},
|
|
24969
|
-
{
|
|
24970
|
-
tone: "priority",
|
|
24971
|
-
state: "selected",
|
|
24972
|
-
class: "border-tertiary-500-variant-2 bg-tertiary-500-variant-4"
|
|
24973
|
-
}
|
|
24974
|
-
]
|
|
24975
|
-
});
|
|
24976
|
-
function insightLabelVisible(e) {
|
|
24977
|
-
return e != null && e !== "";
|
|
24978
|
-
}
|
|
24979
|
-
function EventSummaryInsightChip({ label: e }) {
|
|
24980
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
24981
|
-
className: "inline-flex h-5 shrink-0 items-center gap-1 rounded-full border border-primary-400 bg-primary-light px-1.5",
|
|
24982
|
-
children: [/* @__PURE__ */ jsx(InsightIcon, {
|
|
24983
|
-
size: 13,
|
|
24984
|
-
className: "text-primary-500"
|
|
24985
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
24986
|
-
className: "text-[10px] leading-none font-semibold whitespace-nowrap text-primary-500",
|
|
24987
|
-
children: e
|
|
24988
|
-
})]
|
|
24989
|
-
});
|
|
24990
|
-
}
|
|
24991
|
-
function EventSummaryFireButton({ active: e, onClick: t }) {
|
|
24992
|
-
return /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
|
|
24993
|
-
className: cn("group h-5 w-5 rounded-full border border-neutral-300 hover:border-tertiary-400 hover:bg-tertiary-50", e && "border-tertiary-400 bg-tertiary-50"),
|
|
24994
|
-
icon: e ? /* @__PURE__ */ jsxs("span", {
|
|
24995
|
-
className: "contents",
|
|
24996
|
-
children: [/* @__PURE__ */ jsx(FireFillIcon, {
|
|
24997
|
-
size: 16,
|
|
24998
|
-
className: "block text-tertiary-500-variant-2 opacity-100 group-hover:hidden group-hover:opacity-0"
|
|
24999
|
-
}), /* @__PURE__ */ jsx(CloseIcon, {
|
|
25000
|
-
size: 12,
|
|
25001
|
-
className: "hidden text-neutral-500 opacity-0 group-hover:block group-hover:text-tertiary-500-variant-2 group-hover:opacity-100",
|
|
25002
|
-
strokeWidth: 2
|
|
25003
|
-
})]
|
|
25004
|
-
}) : /* @__PURE__ */ jsx(FireIcon, {
|
|
25005
|
-
size: 16,
|
|
25006
|
-
className: "text-neutral-500 group-hover:text-tertiary-500-variant-2"
|
|
25007
|
-
}),
|
|
25008
|
-
onClick: t,
|
|
25009
|
-
"aria-pressed": e
|
|
25010
|
-
}) });
|
|
25011
|
-
}
|
|
25012
|
-
function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, workspace: o, selected: s = !1, onSelect: c, actions: l, className: u }) {
|
|
25013
|
-
let { fire: f, insight: p, link: h } = l, g = p?.label ?? null;
|
|
25014
|
-
return /* @__PURE__ */ jsxs(Pressable, {
|
|
25015
|
-
onPress: c,
|
|
25016
|
-
className: cn(eventSummaryCardStyles({
|
|
25017
|
-
tone: f.active ? "priority" : "default",
|
|
25018
|
-
state: s ? "selected" : "normal"
|
|
25019
|
-
}), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
|
|
25020
|
-
"data-service": t,
|
|
25021
|
-
children: [
|
|
25022
|
-
/* @__PURE__ */ jsxs("div", {
|
|
25023
|
-
className: "flex items-center justify-between gap-1.5",
|
|
25024
|
-
children: [
|
|
25025
|
-
e,
|
|
25026
|
-
/* @__PURE__ */ jsx("span", {
|
|
25027
|
-
className: "min-w-0 -translate-x-0.5 truncate text-sm font-medium text-neutral-900",
|
|
25028
|
-
children: n
|
|
25029
|
-
}),
|
|
25030
|
-
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
25031
|
-
content: o,
|
|
25032
|
-
children: /* @__PURE__ */ jsx(Avatar, {
|
|
25033
|
-
name: o,
|
|
25034
|
-
size: "xs"
|
|
25035
|
-
})
|
|
25036
|
-
}),
|
|
25037
|
-
/* @__PURE__ */ jsx("span", {
|
|
25038
|
-
className: "flex-1 text-right text-xs leading-tight font-semibold tracking-wide whitespace-nowrap text-neutral-800",
|
|
25039
|
-
children: a
|
|
25040
|
-
}),
|
|
25041
|
-
insightLabelVisible(g) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: g }),
|
|
25042
|
-
/* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
25043
|
-
active: f.active,
|
|
25044
|
-
onClick: f.onClick
|
|
25045
|
-
})
|
|
25046
|
-
]
|
|
25047
|
-
}),
|
|
25048
|
-
/* @__PURE__ */ jsx("div", {
|
|
25049
|
-
className: "line-clamp-1 text-sm font-medium text-neutral-900",
|
|
25050
|
-
children: r
|
|
25051
|
-
}),
|
|
25052
|
-
/* @__PURE__ */ jsxs("div", {
|
|
25053
|
-
className: "flex gap-2",
|
|
25054
|
-
children: [/* @__PURE__ */ jsx("div", {
|
|
25055
|
-
className: "line-clamp-1 min-w-0 flex-1 text-sm font-normal text-neutral-700",
|
|
25056
|
-
children: i
|
|
25057
|
-
}), /* @__PURE__ */ jsx(InfoTooltip, {
|
|
25058
|
-
content: h.tooltip,
|
|
25059
|
-
children: /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
|
|
25060
|
-
type: "button",
|
|
25061
|
-
icon: /* @__PURE__ */ jsx(ExternalLinkIcon, {
|
|
25062
|
-
size: 16,
|
|
25063
|
-
className: "text-neutral-800"
|
|
25064
|
-
}),
|
|
25065
|
-
className: "text-primary-500",
|
|
25066
|
-
onClick: h.onClick
|
|
25067
|
-
}) })
|
|
25068
|
-
})]
|
|
25069
|
-
})
|
|
25070
|
-
]
|
|
25071
|
-
});
|
|
25072
|
-
}
|
|
25073
25239
|
function FilterBarSkeleton({ itemCount: e = 3, className: t }) {
|
|
25074
25240
|
return /* @__PURE__ */ jsx("div", {
|
|
25075
|
-
className: cn("flex flex-wrap items-center
|
|
25241
|
+
className: cn("gap-2 flex flex-wrap items-center", t),
|
|
25076
25242
|
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ jsx(FilterChipSkeleton, {}, t))
|
|
25077
25243
|
});
|
|
25078
25244
|
}
|
|
25079
25245
|
function FilterChipSkeleton() {
|
|
25080
25246
|
return /* @__PURE__ */ jsxs("div", {
|
|
25081
|
-
className: "flex items-center
|
|
25247
|
+
className: "gap-1 px-2 py-1 flex items-center rounded-full border border-neutral-300 bg-white",
|
|
25082
25248
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "m-0.5 size-4 rounded-full" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-15" })]
|
|
25083
25249
|
});
|
|
25084
25250
|
}
|
|
25085
25251
|
function FilterBar({ children: e, className: t }) {
|
|
25086
25252
|
return /* @__PURE__ */ jsx("div", {
|
|
25087
|
-
className: cn("flex flex-wrap items-center
|
|
25253
|
+
className: cn("gap-2 flex flex-wrap items-center", t),
|
|
25088
25254
|
children: e.map((e, t) => cloneElement(e, { key: t }))
|
|
25089
25255
|
});
|
|
25090
25256
|
}
|
|
25257
|
+
function HelpPanel({ classNames: e, ...t }) {
|
|
25258
|
+
return /* @__PURE__ */ jsx(HelpPanelEngine, {
|
|
25259
|
+
...t,
|
|
25260
|
+
classNames: {
|
|
25261
|
+
root: cn("right-3 rounded-2xl shadow-2xl top-[68px] z-99999 max-h-[calc(100vh-84px)] w-[300px] border border-neutral-200 bg-white", e?.root),
|
|
25262
|
+
header: cn("p-4 bg-primary-500", e?.header),
|
|
25263
|
+
title: cn("text-sm font-semibold text-white", e?.title),
|
|
25264
|
+
closeButton: cn("text-white/70 hover:text-white", e?.closeButton),
|
|
25265
|
+
body: e?.body,
|
|
25266
|
+
accordion: e?.accordion,
|
|
25267
|
+
item: e?.item,
|
|
25268
|
+
itemTrigger: cn("p-3 font-semibold hover:bg-neutral-100", e?.itemTrigger),
|
|
25269
|
+
itemContent: cn("p-4", e?.itemContent),
|
|
25270
|
+
footer: cn("px-4 py-3 border-t border-neutral-200", e?.footer)
|
|
25271
|
+
}
|
|
25272
|
+
});
|
|
25273
|
+
}
|
|
25091
25274
|
var dividerStyles = tv({
|
|
25092
25275
|
base: "bg-neutral-400-variant-4",
|
|
25093
25276
|
variants: {
|
|
@@ -25143,7 +25326,7 @@ function Divider({ className: e, ...t }) {
|
|
|
25143
25326
|
return /* @__PURE__ */ jsx("div", { className: cn(dividerStyles(t), e) });
|
|
25144
25327
|
}
|
|
25145
25328
|
function IntegrationBarSkeleton({ orientation: e = "vertical", itemCount: t = 3, className: n }) {
|
|
25146
|
-
let r = e === "vertical", i = cn("size-full", r ? "overflow-x-hidden" : "overflow-y-hidden"), a = cn("grid h-full w-full place-items-center
|
|
25329
|
+
let r = e === "vertical", i = cn("size-full", r ? "overflow-x-hidden" : "overflow-y-hidden"), a = cn("gap-4 grid h-full w-full place-items-center", r ? "grid-cols-1" : "auto-cols-max grid-flow-col", n), o = cn("flex w-fit items-center", r ? "gap-1 flex-col" : "gap-2 flex-row"), s = cn("h-3", r ? "w-12 text-[9px]" : "w-16 text-xs"), c = cn("h-3", r ? "w-8 text-[9px]" : "w-10 text-xs");
|
|
25147
25330
|
return /* @__PURE__ */ jsx("div", {
|
|
25148
25331
|
className: i,
|
|
25149
25332
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -25164,10 +25347,10 @@ function IntegrationBarSkeleton({ orientation: e = "vertical", itemCount: t = 3,
|
|
|
25164
25347
|
}
|
|
25165
25348
|
function IntegrationBar({ orientation: e = "vertical", children: t, onAddMore: n, className: r }) {
|
|
25166
25349
|
return /* @__PURE__ */ jsxs("div", {
|
|
25167
|
-
className: cn("
|
|
25350
|
+
className: cn("min-h-0 min-w-0 flex size-full", e === "vertical" ? "flex-col items-center" : "flex-row items-center", r),
|
|
25168
25351
|
children: [
|
|
25169
25352
|
/* @__PURE__ */ jsx("div", {
|
|
25170
|
-
className: cn("
|
|
25353
|
+
className: cn("min-h-0 min-w-0 grid place-items-center", e === "vertical" ? "w-full flex-1 grid-cols-1 overflow-x-hidden overflow-y-auto" : "h-full flex-1 auto-cols-max grid-flow-col overflow-x-auto overflow-y-hidden"),
|
|
25171
25354
|
children: t.map((t) => cloneElement(t, { classNames: { root: e === "vertical" ? "py-2" : "px-2" } }))
|
|
25172
25355
|
}),
|
|
25173
25356
|
/* @__PURE__ */ jsx(Divider, { orientation: e === "vertical" ? "horizontal" : "vertical" }),
|
|
@@ -25186,9 +25369,9 @@ function IntegrationItemSkeleton() {
|
|
|
25186
25369
|
return /* @__PURE__ */ jsx("div", {
|
|
25187
25370
|
className: "flex w-full items-center justify-center",
|
|
25188
25371
|
children: /* @__PURE__ */ jsx("div", {
|
|
25189
|
-
className: "flex w-full flex-col
|
|
25372
|
+
className: "gap-2 rounded-lg px-3 py-3 flex w-full flex-col bg-neutral-100-variant-3",
|
|
25190
25373
|
children: /* @__PURE__ */ jsxs("div", {
|
|
25191
|
-
className: "flex items-center justify-between
|
|
25374
|
+
className: "gap-2 flex items-center justify-between",
|
|
25192
25375
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/3" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/8" })]
|
|
25193
25376
|
})
|
|
25194
25377
|
})
|
|
@@ -25197,14 +25380,14 @@ function IntegrationItemSkeleton() {
|
|
|
25197
25380
|
function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, connectLabel: a, onConnect: o, isLoading: s, children: c }) {
|
|
25198
25381
|
let l = Children.toArray(c).length;
|
|
25199
25382
|
return /* @__PURE__ */ jsxs("div", {
|
|
25200
|
-
className: "
|
|
25383
|
+
className: "gap-4 rounded-lg p-4 flex flex-col border border-neutral-400 bg-white",
|
|
25201
25384
|
children: [
|
|
25202
25385
|
/* @__PURE__ */ jsxs("div", {
|
|
25203
25386
|
className: "flex items-center justify-between",
|
|
25204
25387
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25205
|
-
className: "
|
|
25388
|
+
className: "min-w-0 gap-2 flex flex-1 items-center",
|
|
25206
25389
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25207
|
-
className: "
|
|
25390
|
+
className: "h-11 w-11 flex shrink-0 items-center justify-center",
|
|
25208
25391
|
children: /* @__PURE__ */ jsx("div", {
|
|
25209
25392
|
className: "flex items-center justify-center",
|
|
25210
25393
|
children: cloneElement(e, {
|
|
@@ -25213,9 +25396,9 @@ function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, conne
|
|
|
25213
25396
|
})
|
|
25214
25397
|
})
|
|
25215
25398
|
}), /* @__PURE__ */ jsxs("div", {
|
|
25216
|
-
className: "
|
|
25399
|
+
className: "min-w-0 flex flex-1 flex-col",
|
|
25217
25400
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25218
|
-
className: "
|
|
25401
|
+
className: "text-xs font-bold truncate text-neutral-800",
|
|
25219
25402
|
children: t
|
|
25220
25403
|
}), /* @__PURE__ */ jsx("div", {
|
|
25221
25404
|
className: "text-xs font-normal text-neutral-800",
|
|
@@ -25223,14 +25406,14 @@ function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, conne
|
|
|
25223
25406
|
})]
|
|
25224
25407
|
})]
|
|
25225
25408
|
}), l < r && !s && /* @__PURE__ */ jsx(Button, {
|
|
25226
|
-
className: "
|
|
25409
|
+
className: "gap-1 rounded-lg px-2 py-1 text-xs font-bold flex shrink-0 items-center border border-brand-primary bg-white text-brand-primary transition-opacity hover:opacity-70",
|
|
25227
25410
|
onClick: o,
|
|
25228
25411
|
children: a
|
|
25229
25412
|
})]
|
|
25230
25413
|
}),
|
|
25231
25414
|
s && /* @__PURE__ */ jsx(IntegrationItemSkeleton, {}),
|
|
25232
25415
|
l > 0 && c && /* @__PURE__ */ jsx("div", {
|
|
25233
|
-
className: "flex flex-col
|
|
25416
|
+
className: "gap-2 flex flex-col",
|
|
25234
25417
|
children: c
|
|
25235
25418
|
})
|
|
25236
25419
|
]
|
|
@@ -25238,19 +25421,19 @@ function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, conne
|
|
|
25238
25421
|
}
|
|
25239
25422
|
function IntegrationItem({ account: e, valid: t, disconnectLabel: n, onDisconnect: r, invalidLabel: i, invalidDescription: a }) {
|
|
25240
25423
|
return /* @__PURE__ */ jsxs("div", {
|
|
25241
|
-
className: cn("
|
|
25424
|
+
className: cn("gap-2 rounded-lg px-3 py-3 flex flex-col border", t === !1 ? "border-error-base bg-error-base/5" : "border-brand-primary bg-neutral-100-variant-3"),
|
|
25242
25425
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25243
|
-
className: "flex items-center justify-between
|
|
25426
|
+
className: "gap-2 flex items-center justify-between",
|
|
25244
25427
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25245
|
-
className: "
|
|
25428
|
+
className: "text-xs font-bold flex-1 truncate text-neutral-800",
|
|
25246
25429
|
children: e
|
|
25247
25430
|
}), /* @__PURE__ */ jsx(Button, {
|
|
25248
|
-
className: "
|
|
25431
|
+
className: "text-xs font-medium shrink-0 text-error-base underline transition-opacity hover:opacity-70",
|
|
25249
25432
|
onClick: r,
|
|
25250
25433
|
children: n
|
|
25251
25434
|
})]
|
|
25252
25435
|
}), t === !1 && /* @__PURE__ */ jsxs("div", {
|
|
25253
|
-
className: "
|
|
25436
|
+
className: "gap-2 flex",
|
|
25254
25437
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25255
25438
|
className: "text-xs font-semibold text-error-base",
|
|
25256
25439
|
children: i
|
|
@@ -25261,17 +25444,189 @@ function IntegrationItem({ account: e, valid: t, disconnectLabel: n, onDisconnec
|
|
|
25261
25444
|
})]
|
|
25262
25445
|
});
|
|
25263
25446
|
}
|
|
25447
|
+
function ArrowTowardCardEnd() {
|
|
25448
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25449
|
+
className: "h-0 w-0 shrink-0 border-y-8 border-r-10 border-y-transparent border-r-primary-500",
|
|
25450
|
+
"aria-hidden": !0
|
|
25451
|
+
});
|
|
25452
|
+
}
|
|
25453
|
+
function ArrowTowardCardStart() {
|
|
25454
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25455
|
+
className: "h-0 w-0 shrink-0 border-y-8 border-l-10 border-y-transparent border-l-primary-500",
|
|
25456
|
+
"aria-hidden": !0
|
|
25457
|
+
});
|
|
25458
|
+
}
|
|
25459
|
+
function ArrowTowardCardBelow() {
|
|
25460
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25461
|
+
className: "h-0 w-0 shrink-0 border-x-8 border-b-10 border-x-transparent border-b-primary-500",
|
|
25462
|
+
"aria-hidden": !0
|
|
25463
|
+
});
|
|
25464
|
+
}
|
|
25465
|
+
function ArrowTowardCardAbove() {
|
|
25466
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25467
|
+
className: "h-0 w-0 shrink-0 border-x-8 border-t-10 border-x-transparent border-t-primary-500",
|
|
25468
|
+
"aria-hidden": !0
|
|
25469
|
+
});
|
|
25470
|
+
}
|
|
25471
|
+
function OnboardingCardArrow({ layout: e, placement: t }) {
|
|
25472
|
+
return jsx(e === "horizontal" ? t === "before" ? ArrowTowardCardEnd : ArrowTowardCardStart : t === "before" ? ArrowTowardCardBelow : ArrowTowardCardAbove, {});
|
|
25473
|
+
}
|
|
25474
|
+
function wrapArrow(e, t, n) {
|
|
25475
|
+
return t == null && n == null ? e : /* @__PURE__ */ jsx("div", {
|
|
25476
|
+
className: t,
|
|
25477
|
+
style: n,
|
|
25478
|
+
"aria-hidden": !0,
|
|
25479
|
+
children: e
|
|
25480
|
+
});
|
|
25481
|
+
}
|
|
25482
|
+
function OnboardingCard({ stepLabel: e, title: t, description: n, titleAccessory: r, primaryAction: i, secondaryAction: a, layout: o, arrowPlacement: s = "before", arrowWrapperClassName: c, arrowWrapperStyle: l, className: u, cardClassName: f }) {
|
|
25483
|
+
let p = i != null || a != null, h = /* @__PURE__ */ jsxs("div", {
|
|
25484
|
+
className: cn("rounded-xl p-4 shadow-xl bg-primary-500 text-white", f),
|
|
25485
|
+
children: [
|
|
25486
|
+
e != null && /* @__PURE__ */ jsx("p", {
|
|
25487
|
+
className: "mb-1 font-semibold tracking-widest text-[10px] text-white uppercase opacity-70",
|
|
25488
|
+
children: e
|
|
25489
|
+
}),
|
|
25490
|
+
r == null ? /* @__PURE__ */ jsx("div", {
|
|
25491
|
+
className: "mb-1 text-sm leading-snug font-semibold",
|
|
25492
|
+
children: t
|
|
25493
|
+
}) : /* @__PURE__ */ jsxs("div", {
|
|
25494
|
+
className: "mb-1 gap-1.5 flex items-center",
|
|
25495
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
25496
|
+
className: "text-sm leading-snug font-semibold",
|
|
25497
|
+
children: t
|
|
25498
|
+
}), r]
|
|
25499
|
+
}),
|
|
25500
|
+
/* @__PURE__ */ jsx("div", {
|
|
25501
|
+
className: "mb-4 text-xs leading-relaxed font-normal opacity-90",
|
|
25502
|
+
children: n
|
|
25503
|
+
}),
|
|
25504
|
+
p && /* @__PURE__ */ jsxs("div", {
|
|
25505
|
+
className: "gap-2 flex items-center",
|
|
25506
|
+
children: [i, a]
|
|
25507
|
+
})
|
|
25508
|
+
]
|
|
25509
|
+
}), Uo = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
|
|
25510
|
+
layout: o,
|
|
25511
|
+
placement: s
|
|
25512
|
+
}), c, l), g = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [Uo, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, Uo] });
|
|
25513
|
+
return o === "horizontal" ? /* @__PURE__ */ jsx("div", {
|
|
25514
|
+
className: cn("flex items-center", u),
|
|
25515
|
+
children: g
|
|
25516
|
+
}) : /* @__PURE__ */ jsx("div", {
|
|
25517
|
+
className: cn("flex flex-col items-center", u),
|
|
25518
|
+
children: g
|
|
25519
|
+
});
|
|
25520
|
+
}
|
|
25521
|
+
var subscribeNoop = () => () => {}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, PRIMARY_BTN = "rounded-lg bg-white px-4 py-1.5 text-xs font-semibold text-primary-500 transition-opacity hover:opacity-90", GHOST_BTN = "text-xs font-semibold text-white/70 transition-colors hover:text-white";
|
|
25522
|
+
function measureStepPosition(e, t) {
|
|
25523
|
+
let n = t.getBoundingClientRect();
|
|
25524
|
+
return e.layout === "horizontal" ? {
|
|
25525
|
+
mode: "horizontal",
|
|
25526
|
+
top: (e.horizontalAlign ?? "target-center") === "viewport-center" ? window.innerHeight / 2 : n.top + n.height / 2,
|
|
25527
|
+
left: n.right + 12
|
|
25528
|
+
} : {
|
|
25529
|
+
mode: "vertical",
|
|
25530
|
+
top: n.bottom + 10,
|
|
25531
|
+
left: n.left,
|
|
25532
|
+
arrowMarginLeft: n.width / 2 - 8
|
|
25533
|
+
};
|
|
25534
|
+
}
|
|
25535
|
+
function measureActiveStep(e) {
|
|
25536
|
+
if (e == null) return null;
|
|
25537
|
+
let t = document.getElementById(e.targetId);
|
|
25538
|
+
return t ? measureStepPosition(e, t) : null;
|
|
25539
|
+
}
|
|
25540
|
+
function OnboardingPortal({ currentStep: e, actions: t, steps: n, onFinish: r }) {
|
|
25541
|
+
let i = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), [a, o] = useState(null), s = useRef(!1), c = e != null;
|
|
25542
|
+
if (useLayoutEffect(() => {
|
|
25543
|
+
if (!i || !c) {
|
|
25544
|
+
let e = requestAnimationFrame(() => o(null));
|
|
25545
|
+
return () => cancelAnimationFrame(e);
|
|
25546
|
+
}
|
|
25547
|
+
let t = 0, n = () => {
|
|
25548
|
+
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
25549
|
+
o(measureActiveStep(e));
|
|
25550
|
+
});
|
|
25551
|
+
};
|
|
25552
|
+
return n(), window.addEventListener("scroll", n, !0), window.addEventListener("resize", n), () => {
|
|
25553
|
+
cancelAnimationFrame(t), window.removeEventListener("scroll", n, !0), window.removeEventListener("resize", n);
|
|
25554
|
+
};
|
|
25555
|
+
}, [
|
|
25556
|
+
i,
|
|
25557
|
+
c,
|
|
25558
|
+
e,
|
|
25559
|
+
n
|
|
25560
|
+
]), useEffect(() => {
|
|
25561
|
+
s.current && !c && r?.(), s.current = c;
|
|
25562
|
+
}, [c, r]), !i || typeof document > "u" || !c || a == null) return null;
|
|
25563
|
+
let u = e.layout === "vertical" && a.mode === "vertical" ? {
|
|
25564
|
+
marginLeft: a.arrowMarginLeft,
|
|
25565
|
+
...e.arrowWrapperStyle
|
|
25566
|
+
} : e.arrowWrapperStyle, p = /* @__PURE__ */ jsx(OnboardingCard, {
|
|
25567
|
+
stepLabel: e.stepLabel,
|
|
25568
|
+
title: e.title,
|
|
25569
|
+
description: e.description,
|
|
25570
|
+
titleAccessory: e.titleAccessory,
|
|
25571
|
+
layout: e.layout,
|
|
25572
|
+
arrowPlacement: e.arrowPlacement ?? "before",
|
|
25573
|
+
className: cn("tour-fade-in-up", e.layout === "vertical" && "items-start", e.className),
|
|
25574
|
+
cardClassName: e.cardClassName,
|
|
25575
|
+
arrowWrapperClassName: e.arrowWrapperClassName,
|
|
25576
|
+
arrowWrapperStyle: u,
|
|
25577
|
+
primaryAction: /* @__PURE__ */ jsx(Button, {
|
|
25578
|
+
type: "button",
|
|
25579
|
+
className: PRIMARY_BTN,
|
|
25580
|
+
onClick: () => t.dismissCurrentStep(),
|
|
25581
|
+
children: "Got it"
|
|
25582
|
+
}),
|
|
25583
|
+
secondaryAction: /* @__PURE__ */ jsx(Button, {
|
|
25584
|
+
type: "button",
|
|
25585
|
+
className: GHOST_BTN,
|
|
25586
|
+
onClick: () => t.skipAll(),
|
|
25587
|
+
children: "Skip"
|
|
25588
|
+
})
|
|
25589
|
+
}, e.id);
|
|
25590
|
+
return createPortal(/* @__PURE__ */ jsx("div", {
|
|
25591
|
+
...a.mode === "horizontal" ? {
|
|
25592
|
+
className: "pointer-events-auto fixed z-[999999] flex items-center",
|
|
25593
|
+
style: {
|
|
25594
|
+
top: a.top,
|
|
25595
|
+
left: a.left,
|
|
25596
|
+
transform: "translateY(-50%)"
|
|
25597
|
+
}
|
|
25598
|
+
} : {
|
|
25599
|
+
className: "pointer-events-auto fixed z-[999999] flex flex-col items-start",
|
|
25600
|
+
style: {
|
|
25601
|
+
top: a.top,
|
|
25602
|
+
left: a.left
|
|
25603
|
+
}
|
|
25604
|
+
},
|
|
25605
|
+
children: p
|
|
25606
|
+
}), document.body);
|
|
25607
|
+
}
|
|
25608
|
+
function Onboarding({ steps: e, context: t, onFinish: n }) {
|
|
25609
|
+
return /* @__PURE__ */ jsx(OnboardingEngine, {
|
|
25610
|
+
steps: e,
|
|
25611
|
+
context: t,
|
|
25612
|
+
children: (t) => /* @__PURE__ */ jsx(OnboardingPortal, {
|
|
25613
|
+
...t,
|
|
25614
|
+
steps: e,
|
|
25615
|
+
onFinish: n
|
|
25616
|
+
})
|
|
25617
|
+
});
|
|
25618
|
+
}
|
|
25264
25619
|
function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...", onChange: r, onKeyDown: i, onClear: a, disabled: o = !1, className: s }) {
|
|
25265
25620
|
let [c, l] = useState(t ?? ""), u = typeof e == "string", f = u ? e : c, p = f.length > 0;
|
|
25266
|
-
function
|
|
25621
|
+
function h(e) {
|
|
25267
25622
|
u || l(e), r?.(e);
|
|
25268
25623
|
}
|
|
25269
|
-
function
|
|
25624
|
+
function g() {
|
|
25270
25625
|
u || l(""), r?.(""), a?.();
|
|
25271
25626
|
}
|
|
25272
25627
|
return /* @__PURE__ */ jsxs("fieldset", {
|
|
25273
25628
|
role: "search",
|
|
25274
|
-
className: cn("
|
|
25629
|
+
className: cn("h-8 min-w-0 gap-1.5 px-2 py-1 flex items-center rounded-full border border-neutral-500-variant-3 bg-white", o && "pointer-events-none bg-neutral-200 opacity-70", s),
|
|
25275
25630
|
disabled: o,
|
|
25276
25631
|
children: [
|
|
25277
25632
|
/* @__PURE__ */ jsx(SearchIcon, {
|
|
@@ -25282,9 +25637,9 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25282
25637
|
type: "text",
|
|
25283
25638
|
value: f,
|
|
25284
25639
|
placeholder: n,
|
|
25285
|
-
onChange:
|
|
25640
|
+
onChange: h,
|
|
25286
25641
|
onKeyDown: i,
|
|
25287
|
-
className: cn("m-0 h-5 min-w-0 flex-1 border-0
|
|
25642
|
+
className: cn("m-0 h-5 min-w-0 p-0 text-xs flex-1 border-0 text-neutral-800", "bg-transparent outline-none", "placeholder:text-neutral-700-alpha-60", o && "text-neutral-700-alpha-60")
|
|
25288
25643
|
}),
|
|
25289
25644
|
p && !o && /* @__PURE__ */ jsx(IconButton, {
|
|
25290
25645
|
type: "button",
|
|
@@ -25292,7 +25647,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25292
25647
|
size: 16,
|
|
25293
25648
|
className: "text-neutral-700"
|
|
25294
25649
|
}),
|
|
25295
|
-
onClick:
|
|
25650
|
+
onClick: g,
|
|
25296
25651
|
"aria-label": "Clear search",
|
|
25297
25652
|
className: "rounded p-0 transition-opacity hover:opacity-70"
|
|
25298
25653
|
})
|
|
@@ -25363,9 +25718,9 @@ function ConfirmationToast({ title: e, description: t, cancelLabel: n, acceptLab
|
|
|
25363
25718
|
}
|
|
25364
25719
|
function ConfirmationTemplate({ title: e, description: t, cancelLabel: n, acceptLabel: r, onCancel: i, onAccept: a }) {
|
|
25365
25720
|
return /* @__PURE__ */ jsxs("div", {
|
|
25366
|
-
className: "
|
|
25721
|
+
className: "max-w-md gap-6 rounded-lg p-6 shadow-xl flex w-full flex-col justify-center bg-white",
|
|
25367
25722
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25368
|
-
className: "flex flex-col justify-center
|
|
25723
|
+
className: "gap-3 flex flex-col justify-center",
|
|
25369
25724
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
25370
25725
|
className: "text-base font-medium text-neutral-900",
|
|
25371
25726
|
children: e
|
|
@@ -25374,13 +25729,13 @@ function ConfirmationTemplate({ title: e, description: t, cancelLabel: n, accept
|
|
|
25374
25729
|
children: t
|
|
25375
25730
|
})]
|
|
25376
25731
|
}), /* @__PURE__ */ jsxs("div", {
|
|
25377
|
-
className: "flex items-center justify-end
|
|
25732
|
+
className: "gap-3 flex items-center justify-end",
|
|
25378
25733
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
25379
|
-
className: "rounded-lg
|
|
25734
|
+
className: "rounded-lg px-4 py-2 text-sm font-medium border border-neutral-300 text-neutral-900 transition-opacity hover:opacity-70",
|
|
25380
25735
|
onClick: () => i(close),
|
|
25381
25736
|
children: n
|
|
25382
25737
|
}), /* @__PURE__ */ jsx(Button, {
|
|
25383
|
-
className: "rounded-lg
|
|
25738
|
+
className: "rounded-lg px-4 py-2 text-sm font-medium bg-error-base text-white transition-opacity hover:opacity-90",
|
|
25384
25739
|
onClick: () => a(close),
|
|
25385
25740
|
children: r
|
|
25386
25741
|
})]
|
|
@@ -25398,12 +25753,12 @@ function UndoToast({ title: e, subtitle: t, description: n, onUndo: r, onClose:
|
|
|
25398
25753
|
}
|
|
25399
25754
|
function UndoToastTemplate({ title: e, subtitle: t, description: n, onUndo: r, onClose: i }) {
|
|
25400
25755
|
return /* @__PURE__ */ jsxs("div", {
|
|
25401
|
-
className: "grid max-w-[400px] min-w-[280px] grid-cols-[auto_1fr]
|
|
25756
|
+
className: "gap-3 rounded-lg p-4 grid max-w-[400px] min-w-[280px] grid-cols-[auto_1fr] bg-success-base",
|
|
25402
25757
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25403
|
-
className: "flex flex-col justify-center
|
|
25758
|
+
className: "gap-1 flex flex-col justify-center",
|
|
25404
25759
|
children: [
|
|
25405
25760
|
/* @__PURE__ */ jsxs("div", {
|
|
25406
|
-
className: "flex items-center
|
|
25761
|
+
className: "gap-2 flex items-center",
|
|
25407
25762
|
children: [/* @__PURE__ */ jsx("span", {
|
|
25408
25763
|
className: "text-xs font-medium text-white",
|
|
25409
25764
|
children: e
|
|
@@ -25414,11 +25769,11 @@ function UndoToastTemplate({ title: e, subtitle: t, description: n, onUndo: r, o
|
|
|
25414
25769
|
})]
|
|
25415
25770
|
}),
|
|
25416
25771
|
t && /* @__PURE__ */ jsx("div", {
|
|
25417
|
-
className: "
|
|
25772
|
+
className: "text-xs font-semibold line-clamp-2 text-white-alpha-90",
|
|
25418
25773
|
children: t
|
|
25419
25774
|
}),
|
|
25420
25775
|
n && /* @__PURE__ */ jsx("div", {
|
|
25421
|
-
className: "line-clamp-2 text-
|
|
25776
|
+
className: "text-xs line-clamp-2 text-white-alpha-80",
|
|
25422
25777
|
children: n
|
|
25423
25778
|
})
|
|
25424
25779
|
]
|
|
@@ -25479,6 +25834,6 @@ function QtaloImage({ size: e = 40, className: t, ...n }) {
|
|
|
25479
25834
|
}) })]
|
|
25480
25835
|
});
|
|
25481
25836
|
}
|
|
25482
|
-
export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddCircleIcon, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, CheckSquareIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EVENT_SUMMARY_CARD_HEIGHT_SIZE, EmptyBoxIcon, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, EventEmptyState, EventSummaryCard, EventSummaryCardSkeleton, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireFillIcon, FireIcon, GmailIcon, GoogleCalendarIcon, HomeIcon, Icon, IconButton, IconCountButton, IconCountButtonSkeleton, InfoTooltip, Input, InsightIcon, IntegrationBar, IntegrationBarSkeleton, IntegrationItem, IntegrationItemSkeleton, IntegrationsCard, JiraIcon, LightIcon, LogoIcon, MinusIcon, MoreIcon, NormalDensityIcon, NotFireIcon, OutlookCalendarIcon, OutlookIcon, Pressable, QtaloImage, ReadIcon, RichContent, SearchIcon, SearchInput, SignOutIcon, Skeleton, SlackIcon, StatusBadge, StopPropagation, SummaryIcon, SystemIcon, TeamsIcon, Toaster, Tooltip, UnreadIcon, capitalize, cn, colors, formatDate, formatDateRange, formatTimestamp, generateCalendarDays, getDaysInMonth, getFirstDayOfMonth, getInitials, getMonthName, getWeekdays, isDateBefore, isDateInRange, isSameDay, isToday, normalizeContent, parseDate, pickColorFromPalette, stringHash, toMondayBased, toast, toastStore, useAccordion, useDropdown, useLongPress };
|
|
25837
|
+
export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddCircleIcon, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, CheckSquareIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EVENT_SUMMARY_CARD_HEIGHT_SIZE, EmptyBoxIcon, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, EventEmptyState, EventSummaryCard, EventSummaryCardSkeleton, EventSummaryFireButton, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireFillIcon, FireIcon, GmailIcon, GoogleCalendarIcon, HelpPanel, HelpPanelEngine, HomeIcon, Icon, IconButton, IconCountButton, IconCountButtonSkeleton, InboxIcon, InfoTooltip, Input, InsightFillIcon, InsightIcon, IntegrationBar, IntegrationBarSkeleton, IntegrationItem, IntegrationItemSkeleton, IntegrationsCard, JiraIcon, LightIcon, LogoIcon, MailIcon, MinusIcon, MoreIcon, NormalDensityIcon, NotFireIcon, Onboarding, OnboardingCard, OnboardingEngine, OutlookCalendarIcon, OutlookIcon, Pressable, QtaloImage, ReadIcon, RichContent, SearchIcon, SearchInput, SignOutIcon, Skeleton, SlackIcon, StatusBadge, StopPropagation, SummaryIcon, SystemIcon, TeamsIcon, Toaster, Tooltip, UnreadIcon, capitalize, cn, colors, formatDate, formatDateRange, formatTimestamp, generateCalendarDays, getDaysInMonth, getFirstDayOfMonth, getInitials, getMonthName, getWeekdays, isDateBefore, isDateInRange, isSameDay, isToday, normalizeContent, parseDate, pickColorFromPalette, stringHash, toMondayBased, toast, toastStore, useAccordion, useDropdown, useLongPress };
|
|
25483
25838
|
|
|
25484
25839
|
//# sourceMappingURL=index.js.map
|