@qtalo/qt-ui-library 0.1.16 → 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 +233 -7
- package/dist/index.js +1024 -470
- 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:
|
|
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
543
|
let r = g(n[i], !0);
|
|
544
|
-
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r,
|
|
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();
|
|
@@ -20157,14 +20157,14 @@ ${c}` : c;
|
|
|
20157
20157
|
if (this.options.pedantic ? (f = 2, s = c.trimStart()) : u ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, s = c.slice(f), f += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
20158
20158
|
let t = this.rules.other.nextBulletRegex(f), n = this.rules.other.hrRegex(f), i = this.rules.other.fencesBeginRegex(f), a = this.rules.other.headingBeginRegex(f), o = this.rules.other.htmlBeginRegex(f);
|
|
20159
20159
|
for (; e;) {
|
|
20160
|
-
let p = e.split("\n", 1)[0],
|
|
20161
|
-
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "),
|
|
20162
|
-
if (
|
|
20160
|
+
let p = e.split("\n", 1)[0], h;
|
|
20161
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), h = l) : h = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
|
|
20162
|
+
if (h.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + h.slice(f);
|
|
20163
20163
|
else {
|
|
20164
20164
|
if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
|
|
20165
20165
|
s += "\n" + l;
|
|
20166
20166
|
}
|
|
20167
|
-
!u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c =
|
|
20167
|
+
!u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c = h.slice(f);
|
|
20168
20168
|
}
|
|
20169
20169
|
}
|
|
20170
20170
|
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
|
|
@@ -21328,21 +21328,21 @@ 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
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
21347
|
onChange: O,
|
|
21348
21348
|
...e === void 0 ? { defaultChecked: t } : { checked: e }
|
|
@@ -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
|
|
@@ -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),
|
|
@@ -22363,29 +22378,89 @@ function CheckCircleIcon({ pathProps: e, ...t }) {
|
|
|
22363
22378
|
})
|
|
22364
22379
|
});
|
|
22365
22380
|
}
|
|
22366
|
-
function
|
|
22381
|
+
function FireFillIcon({ pathProps: e, ...t }) {
|
|
22367
22382
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22368
22383
|
viewBox: "0 0 20 20",
|
|
22369
22384
|
...t,
|
|
22370
22385
|
children: /* @__PURE__ */ jsx("path", {
|
|
22371
|
-
d: "
|
|
22386
|
+
d: "M3.72,11.13c0-1.23.27-2.35.82-3.33.54-.99,1.16-1.84,1.85-2.56.69-.72,1.35-1.29,1.98-1.73.63-.44,1.04-.72,1.21-.84v2.01c0,.65.22,1.16.65,1.53.43.38.92.56,1.46.56.25,0,.49-.05.72-.14.23-.09.45-.24.65-.43l.37-.37c.86.56,1.55,1.31,2.07,2.25.52.93.78,1.95.78,3.05,0,1.25-.33,2.38-1,3.38-.66,1-1.53,1.75-2.58,2.24.27-.3.48-.64.63-1.01.15-.38.23-.78.23-1.21,0-.47-.09-.91-.27-1.33-.18-.42-.43-.8-.76-1.13l-2.53-2.47-2.51,2.47c-.34.34-.6.72-.78,1.13-.18.42-.27.86-.27,1.33,0,.43.08.84.23,1.21.15.38.36.72.63,1.01-1.06-.49-1.92-1.23-2.58-2.24-.66-1-1-2.13-1-3.38ZM10,11.33l1.63,1.6c.22.22.38.46.5.72.11.27.17.55.17.86,0,.62-.22,1.16-.67,1.6-.45.44-.99.66-1.63.66s-1.18-.22-1.63-.66c-.45-.44-.67-.97-.67-1.6,0-.29.06-.58.17-.85.11-.27.28-.52.5-.74l1.63-1.6Z",
|
|
22372
22387
|
fill: "currentColor",
|
|
22373
22388
|
...e
|
|
22374
22389
|
})
|
|
22375
22390
|
});
|
|
22376
22391
|
}
|
|
22377
|
-
function
|
|
22392
|
+
function FireIcon({ pathProps: e, ...t }) {
|
|
22378
22393
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22379
|
-
viewBox: "0 0
|
|
22394
|
+
viewBox: "0 0 20 20",
|
|
22380
22395
|
...t,
|
|
22381
22396
|
children: /* @__PURE__ */ jsx("path", {
|
|
22382
|
-
d: "
|
|
22383
|
-
|
|
22384
|
-
strokeWidth: "1.25",
|
|
22397
|
+
d: "M5,11.09c0,.84.2,1.62.6,2.34.4.72.95,1.31,1.65,1.75-.06-.12-.11-.23-.13-.35-.03-.12-.04-.24-.04-.37,0-.39.07-.75.22-1.09.15-.34.36-.65.64-.93l2.06-2.02,2.07,2.02c.28.28.49.59.63.93.15.34.22.7.22,1.09,0,.13-.01.25-.04.37-.03.12-.07.23-.13.35.7-.44,1.25-1.03,1.65-1.75.4-.72.6-1.5.6-2.34,0-.69-.13-1.35-.39-1.97-.26-.62-.63-1.17-1.11-1.66-.28.18-.57.32-.87.41-.31.09-.62.14-.94.14-.87,0-1.62-.28-2.25-.85-.63-.57-.99-1.28-1.09-2.12-.54.45-1.02.93-1.44,1.42-.42.49-.77,1-1.05,1.51-.28.51-.5,1.03-.65,1.56-.15.53-.22,1.05-.22,1.57ZM10,12.17l-1.19,1.17c-.15.15-.27.33-.35.52-.08.19-.12.4-.12.6,0,.44.16.83.49,1.15.33.32.72.48,1.18.48s.85-.16,1.18-.48c.33-.32.49-.7.49-1.15,0-.22-.04-.43-.12-.61s-.2-.36-.35-.51l-1.19-1.17ZM9.58,2.66v2c0,.59.2,1.08.61,1.48.41.4.9.6,1.49.6.26,0,.5-.05.73-.14.23-.1.44-.24.64-.42l.37-.37c.88.56,1.57,1.31,2.07,2.25.5.94.76,1.95.76,3.02,0,1.74-.61,3.22-1.82,4.43-1.21,1.21-2.69,1.82-4.43,1.82s-3.22-.61-4.43-1.82c-1.21-1.21-1.82-2.69-1.82-4.43,0-1.61.52-3.16,1.57-4.65,1.05-1.49,2.47-2.75,4.26-3.77Z",
|
|
22398
|
+
fill: "currentColor",
|
|
22385
22399
|
...e
|
|
22386
22400
|
})
|
|
22387
22401
|
});
|
|
22388
22402
|
}
|
|
22403
|
+
function InsightFillIcon({ pathProps: e, ...t }) {
|
|
22404
|
+
return /* @__PURE__ */ jsxs(Icon, {
|
|
22405
|
+
viewBox: "0 0 20 20",
|
|
22406
|
+
...t,
|
|
22407
|
+
children: [
|
|
22408
|
+
/* @__PURE__ */ jsx("path", {
|
|
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",
|
|
22410
|
+
fill: "currentColor",
|
|
22411
|
+
stroke: "currentColor",
|
|
22412
|
+
strokeWidth: "1",
|
|
22413
|
+
strokeMiterlimit: "10",
|
|
22414
|
+
...e
|
|
22415
|
+
}),
|
|
22416
|
+
/* @__PURE__ */ jsx("path", {
|
|
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",
|
|
22418
|
+
fill: "currentColor",
|
|
22419
|
+
stroke: "currentColor",
|
|
22420
|
+
strokeWidth: "1",
|
|
22421
|
+
strokeMiterlimit: "10",
|
|
22422
|
+
...e
|
|
22423
|
+
}),
|
|
22424
|
+
/* @__PURE__ */ jsx("path", {
|
|
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",
|
|
22426
|
+
fill: "currentColor",
|
|
22427
|
+
stroke: "currentColor",
|
|
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",
|
|
22459
|
+
...e
|
|
22460
|
+
})
|
|
22461
|
+
]
|
|
22462
|
+
});
|
|
22463
|
+
}
|
|
22389
22464
|
function NotFireIcon({ pathProps: e, ...t }) {
|
|
22390
22465
|
return /* @__PURE__ */ jsxs(Icon, {
|
|
22391
22466
|
viewBox: "0 0 20 20",
|
|
@@ -22548,10 +22623,10 @@ function DarkIcon({ pathProps: e, ...t }) {
|
|
|
22548
22623
|
}
|
|
22549
22624
|
function EmptyBoxIcon({ pathProps: e, ...t }) {
|
|
22550
22625
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22551
|
-
viewBox: "0 0
|
|
22626
|
+
viewBox: "0 0 20 20",
|
|
22552
22627
|
...t,
|
|
22553
22628
|
children: /* @__PURE__ */ jsx("path", {
|
|
22554
|
-
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",
|
|
22555
22630
|
fill: "currentColor",
|
|
22556
22631
|
...e
|
|
22557
22632
|
})
|
|
@@ -22568,6 +22643,28 @@ function ExternalLinkIcon({ pathProps: e, ...t }) {
|
|
|
22568
22643
|
})
|
|
22569
22644
|
});
|
|
22570
22645
|
}
|
|
22646
|
+
function HomeIcon({ pathProps: e, ...t }) {
|
|
22647
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
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",
|
|
22660
|
+
...t,
|
|
22661
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
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",
|
|
22663
|
+
fill: "currentColor",
|
|
22664
|
+
...e
|
|
22665
|
+
})
|
|
22666
|
+
});
|
|
22667
|
+
}
|
|
22571
22668
|
function LightIcon({ pathProps: e, ...t }) {
|
|
22572
22669
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22573
22670
|
viewBox: "0 0 24 24",
|
|
@@ -22579,6 +22676,17 @@ function LightIcon({ pathProps: e, ...t }) {
|
|
|
22579
22676
|
})
|
|
22580
22677
|
});
|
|
22581
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
|
+
}
|
|
22582
22690
|
function MinusIcon({ pathProps: e, ...t }) {
|
|
22583
22691
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22584
22692
|
viewBox: "0 0 16 16",
|
|
@@ -22747,10 +22855,115 @@ function DropdownMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
|
22747
22855
|
})
|
|
22748
22856
|
});
|
|
22749
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
|
+
}
|
|
22750
22963
|
function RichContent({ content: e, className: t }) {
|
|
22751
22964
|
let n = normalizeContent(e);
|
|
22752
22965
|
return /* @__PURE__ */ jsx("div", {
|
|
22753
|
-
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),
|
|
22754
22967
|
dangerouslySetInnerHTML: { __html: n }
|
|
22755
22968
|
});
|
|
22756
22969
|
}
|
|
@@ -22830,7 +23043,7 @@ function isTopPosition(e) {
|
|
|
22830
23043
|
function isRenderFn(e) {
|
|
22831
23044
|
return typeof e == "function";
|
|
22832
23045
|
}
|
|
22833
|
-
var subscribeNoop = () => () => {}, getClientSnapshot = () => !0, getServerSnapshot = () => !1;
|
|
23046
|
+
var subscribeNoop$1 = () => () => {}, getClientSnapshot$1 = () => !0, getServerSnapshot$1 = () => !1;
|
|
22834
23047
|
function groupByPosition(e) {
|
|
22835
23048
|
return e.reduce((e, t) => ((e[t.position] ??= []).push(t), e), {});
|
|
22836
23049
|
}
|
|
@@ -22901,7 +23114,7 @@ function useToastTimers(e, t) {
|
|
|
22901
23114
|
}), n;
|
|
22902
23115
|
});
|
|
22903
23116
|
}, COUNTDOWN_INTERVAL_MS);
|
|
22904
|
-
}, []),
|
|
23117
|
+
}, []), p = useCallback(() => {
|
|
22905
23118
|
if (o.current) return;
|
|
22906
23119
|
o.current = !0;
|
|
22907
23120
|
let e = Date.now();
|
|
@@ -22926,7 +23139,7 @@ function useToastTimers(e, t) {
|
|
|
22926
23139
|
e,
|
|
22927
23140
|
u,
|
|
22928
23141
|
f
|
|
22929
|
-
]),
|
|
23142
|
+
]), O = useCallback((e) => {
|
|
22930
23143
|
i.current.delete(e), r((t) => {
|
|
22931
23144
|
let n = new Map(t);
|
|
22932
23145
|
return n.delete(e), n;
|
|
@@ -22946,23 +23159,23 @@ function useToastTimers(e, t) {
|
|
|
22946
23159
|
a.current && clearInterval(a.current);
|
|
22947
23160
|
}, []), {
|
|
22948
23161
|
remainingTimes: n,
|
|
22949
|
-
pauseAll:
|
|
23162
|
+
pauseAll: p,
|
|
22950
23163
|
resumeAll: g,
|
|
22951
|
-
cleanupTimer:
|
|
23164
|
+
cleanupTimer: O
|
|
22952
23165
|
};
|
|
22953
23166
|
}
|
|
22954
23167
|
function Toaster() {
|
|
22955
|
-
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);
|
|
22956
23169
|
useEffect(() => toastStore.subscribe(t), []);
|
|
22957
|
-
let
|
|
23170
|
+
let A = useSyncExternalStore(subscribeNoop$1, getClientSnapshot$1, getServerSnapshot$1), R = useCallback((e) => {
|
|
22958
23171
|
e.callbacks?.onOpen?.();
|
|
22959
|
-
}, []),
|
|
23172
|
+
}, []), qo = useCallback((e, t) => {
|
|
22960
23173
|
t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
22961
23174
|
}, []);
|
|
22962
23175
|
useEffect(() => {
|
|
22963
23176
|
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
22964
23177
|
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
22965
|
-
|
|
23178
|
+
qo(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
22966
23179
|
}), r((r) => {
|
|
22967
23180
|
let i = r.map((e) => {
|
|
22968
23181
|
let t = n.get(e.id);
|
|
@@ -22971,7 +23184,7 @@ function Toaster() {
|
|
|
22971
23184
|
content: t.content,
|
|
22972
23185
|
duration: t.duration
|
|
22973
23186
|
} : e;
|
|
22974
|
-
}).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), {
|
|
22975
23188
|
...e,
|
|
22976
23189
|
animationState: "entering"
|
|
22977
23190
|
})), ...i];
|
|
@@ -22979,30 +23192,30 @@ function Toaster() {
|
|
|
22979
23192
|
}), i.current = t;
|
|
22980
23193
|
}, [
|
|
22981
23194
|
e,
|
|
22982
|
-
|
|
22983
|
-
|
|
23195
|
+
R,
|
|
23196
|
+
qo
|
|
22984
23197
|
]);
|
|
22985
|
-
let
|
|
23198
|
+
let Jo = useCallback((e) => {
|
|
22986
23199
|
r((t) => {
|
|
22987
23200
|
let n = t.filter((t) => t.id !== e);
|
|
22988
23201
|
return o.current = n, n;
|
|
22989
|
-
}),
|
|
22990
|
-
}, [
|
|
23202
|
+
}), p(e), toastStore.cleanup(e);
|
|
23203
|
+
}, [p]), Yo = useCallback((e) => {
|
|
22991
23204
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
22992
23205
|
}, []);
|
|
22993
|
-
if (!
|
|
22994
|
-
let
|
|
22995
|
-
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]) => {
|
|
22996
23209
|
let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
22997
23210
|
className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
|
|
22998
23211
|
children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
|
|
22999
|
-
className: "col-span-full
|
|
23212
|
+
className: "col-span-full col-start-1 row-span-full row-start-1",
|
|
23000
23213
|
style: { zIndex: n.length - t },
|
|
23001
23214
|
children: /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23002
23215
|
toast: e,
|
|
23003
23216
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23004
|
-
onExitComplete:
|
|
23005
|
-
onClose:
|
|
23217
|
+
onExitComplete: Jo,
|
|
23218
|
+
onClose: Yo,
|
|
23006
23219
|
onHoverStart: u,
|
|
23007
23220
|
onHoverEnd: f
|
|
23008
23221
|
})
|
|
@@ -23010,13 +23223,13 @@ function Toaster() {
|
|
|
23010
23223
|
}) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23011
23224
|
toast: e,
|
|
23012
23225
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23013
|
-
onExitComplete:
|
|
23014
|
-
onClose:
|
|
23226
|
+
onExitComplete: Jo,
|
|
23227
|
+
onClose: Yo,
|
|
23015
23228
|
onHoverStart: u,
|
|
23016
23229
|
onHoverEnd: f
|
|
23017
23230
|
}, e.id));
|
|
23018
23231
|
return /* @__PURE__ */ jsx("div", {
|
|
23019
|
-
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]),
|
|
23020
23233
|
children: isTopPosition(e) ? /* @__PURE__ */ jsxs(Fragment$1, { children: [i, a] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [a, i] })
|
|
23021
23234
|
}, e);
|
|
23022
23235
|
}) }), document.body);
|
|
@@ -23104,7 +23317,7 @@ const AVATAR_COLOR = {
|
|
|
23104
23317
|
}
|
|
23105
23318
|
}, AVATAR_COLOR_KEYS = Object.keys(AVATAR_COLOR);
|
|
23106
23319
|
var avatarStyles = tv({
|
|
23107
|
-
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",
|
|
23108
23321
|
variants: { size: {
|
|
23109
23322
|
xs: "h-[16px] w-[16px] text-[0.5em]",
|
|
23110
23323
|
sm: "h-[20px] w-[20px] text-[0.625em]",
|
|
@@ -23128,8 +23341,8 @@ function Avatar({ name: e, size: t = "sm", className: n }) {
|
|
|
23128
23341
|
}
|
|
23129
23342
|
var statusBadgeStyles = tv({
|
|
23130
23343
|
slots: {
|
|
23131
|
-
root: "relative flex items-center
|
|
23132
|
-
text: "
|
|
23344
|
+
root: "gap-1 relative flex items-center rounded-full border",
|
|
23345
|
+
text: "text-xs font-semibold truncate whitespace-nowrap"
|
|
23133
23346
|
},
|
|
23134
23347
|
variants: { status: {
|
|
23135
23348
|
fire: {
|
|
@@ -23171,16 +23384,16 @@ function StatusBadge({ className: e, label: t, status: n, onAction: r, density:
|
|
|
23171
23384
|
className: cn(u.root(), s ? "h-6 w-6" : "py-1 pr-2.5 pl-2", e),
|
|
23172
23385
|
icon: f ? /* @__PURE__ */ jsx(c.icon, {
|
|
23173
23386
|
size: 16,
|
|
23174
|
-
className: cn(u.text(), s && h && "
|
|
23387
|
+
className: cn(u.text(), s && h && "inset-0 absolute m-auto", s && h && a && "opacity-0")
|
|
23175
23388
|
}) : void 0,
|
|
23176
23389
|
label: p ? /* @__PURE__ */ jsx("span", {
|
|
23177
|
-
className: cn(u.text(), s && "
|
|
23390
|
+
className: cn(u.text(), s && "inset-0 absolute flex items-center justify-center text-center text-[10px]"),
|
|
23178
23391
|
children: t ?? c.label
|
|
23179
23392
|
}) : void 0,
|
|
23180
23393
|
action: h ? /* @__PURE__ */ jsx(Button, {
|
|
23181
23394
|
onClick: r,
|
|
23182
23395
|
"aria-label": "Dismiss status",
|
|
23183
|
-
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),
|
|
23184
23397
|
children: /* @__PURE__ */ jsx(CloseIcon, {
|
|
23185
23398
|
size: 16,
|
|
23186
23399
|
className: cn(u.text(), "group-hover:scale-90")
|
|
@@ -23192,15 +23405,15 @@ function StatusBadge({ className: e, label: t, status: n, onAction: r, density:
|
|
|
23192
23405
|
}
|
|
23193
23406
|
function BulkActionsSkeleton({ className: e }) {
|
|
23194
23407
|
return /* @__PURE__ */ jsxs("div", {
|
|
23195
|
-
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),
|
|
23196
23409
|
children: [
|
|
23197
23410
|
/* @__PURE__ */ jsxs("div", {
|
|
23198
|
-
className: "flex items-center
|
|
23411
|
+
className: "gap-2 flex items-center",
|
|
23199
23412
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-30" })]
|
|
23200
23413
|
}),
|
|
23201
23414
|
/* @__PURE__ */ jsx("div", { className: "flex items-center divide-x divide-neutral-400-variant-1" }),
|
|
23202
23415
|
/* @__PURE__ */ jsxs("div", {
|
|
23203
|
-
className: "flex items-center
|
|
23416
|
+
className: "gap-2 flex items-center",
|
|
23204
23417
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "m-1 h-5 w-5 rounded" }), /* @__PURE__ */ jsx(Skeleton, { className: "m-1 h-5 w-5 rounded" })]
|
|
23205
23418
|
})
|
|
23206
23419
|
]
|
|
@@ -23219,17 +23432,17 @@ function IconButton({ icon: e, ...t }) {
|
|
|
23219
23432
|
function InfoTooltip({ className: e, ...t }) {
|
|
23220
23433
|
return /* @__PURE__ */ jsx(Tooltip, {
|
|
23221
23434
|
...t,
|
|
23222
|
-
className: cn("rounded
|
|
23435
|
+
className: cn("rounded px-2 py-1 font-medium bg-neutral-700 text-[0.625em] whitespace-nowrap text-white", e)
|
|
23223
23436
|
});
|
|
23224
23437
|
}
|
|
23225
23438
|
function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n, actions: r, defaultDensity: i = "normal", onDensityChange: a, className: o }) {
|
|
23226
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 = () => {
|
|
23227
23440
|
n(!c);
|
|
23228
23441
|
};
|
|
23229
|
-
function
|
|
23442
|
+
function g(e) {
|
|
23230
23443
|
p(e), a?.(e);
|
|
23231
23444
|
}
|
|
23232
|
-
let
|
|
23445
|
+
let Ko = {
|
|
23233
23446
|
fire: [{
|
|
23234
23447
|
id: "fire",
|
|
23235
23448
|
tooltip: "Mark as fire",
|
|
@@ -23281,7 +23494,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23281
23494
|
}),
|
|
23282
23495
|
onClick: r.read.off
|
|
23283
23496
|
}]
|
|
23284
|
-
},
|
|
23497
|
+
}, A = [{
|
|
23285
23498
|
value: "normal",
|
|
23286
23499
|
tooltip: "Normal density",
|
|
23287
23500
|
icon: /* @__PURE__ */ jsx(NormalDensityIcon, { size: 20 })
|
|
@@ -23291,7 +23504,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23291
23504
|
icon: /* @__PURE__ */ jsx(CompactDensityIcon, { size: 20 })
|
|
23292
23505
|
}];
|
|
23293
23506
|
return /* @__PURE__ */ jsxs("div", {
|
|
23294
|
-
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),
|
|
23295
23508
|
children: [
|
|
23296
23509
|
/* @__PURE__ */ jsx(Checkbox, {
|
|
23297
23510
|
checked: c,
|
|
@@ -23310,8 +23523,8 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23310
23523
|
}),
|
|
23311
23524
|
/* @__PURE__ */ jsx("div", {
|
|
23312
23525
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23313
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23314
|
-
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",
|
|
23315
23528
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23316
23529
|
content: e.tooltip,
|
|
23317
23530
|
className: "border-black",
|
|
@@ -23324,14 +23537,14 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23324
23537
|
}, e)) })
|
|
23325
23538
|
}),
|
|
23326
23539
|
/* @__PURE__ */ jsx("div", {
|
|
23327
|
-
className: "flex items-center
|
|
23328
|
-
children:
|
|
23540
|
+
className: "gap-2 flex items-center",
|
|
23541
|
+
children: A.map(({ value: e, tooltip: t, icon: n }) => {
|
|
23329
23542
|
let r = f === e;
|
|
23330
23543
|
return /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23331
23544
|
content: t,
|
|
23332
23545
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
23333
23546
|
className: cn("h-7 w-7 p-0 text-neutral-900", r && "bg-white-variant-4"),
|
|
23334
|
-
onClick: () =>
|
|
23547
|
+
onClick: () => g(e),
|
|
23335
23548
|
icon: n,
|
|
23336
23549
|
"aria-pressed": r
|
|
23337
23550
|
})
|
|
@@ -23343,8 +23556,8 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23343
23556
|
}
|
|
23344
23557
|
var filterButtonStyles = tv({
|
|
23345
23558
|
slots: {
|
|
23346
|
-
root: "inline-flex w-fit items-center
|
|
23347
|
-
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"
|
|
23348
23561
|
},
|
|
23349
23562
|
variants: {
|
|
23350
23563
|
variant: {
|
|
@@ -23399,6 +23612,7 @@ var filterButtonStyles = tv({
|
|
|
23399
23612
|
}), FILTER_BUTTON_META = {
|
|
23400
23613
|
fire: {
|
|
23401
23614
|
icon: FireIcon,
|
|
23615
|
+
selectedIcon: FireFillIcon,
|
|
23402
23616
|
label: "Fire",
|
|
23403
23617
|
iconColor: "text-tertiary-500"
|
|
23404
23618
|
},
|
|
@@ -23409,6 +23623,7 @@ var filterButtonStyles = tv({
|
|
|
23409
23623
|
},
|
|
23410
23624
|
insight: {
|
|
23411
23625
|
icon: InsightIcon,
|
|
23626
|
+
selectedIcon: InsightFillIcon,
|
|
23412
23627
|
label: "Insights",
|
|
23413
23628
|
iconColor: "text-primary-600"
|
|
23414
23629
|
},
|
|
@@ -23431,7 +23646,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23431
23646
|
let c = !!o, l = filterButtonStyles({
|
|
23432
23647
|
variant: e,
|
|
23433
23648
|
selected: !c && r
|
|
23434
|
-
}), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label,
|
|
23649
|
+
}), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? (u && !c && r && "selectedIcon" in u && u.selectedIcon ? u.selectedIcon : u?.icon), p = t ?? u?.label, h = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
|
|
23435
23650
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23436
23651
|
...s,
|
|
23437
23652
|
disabled: o,
|
|
@@ -23439,7 +23654,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23439
23654
|
className: cn("group", l.root(), c && "border-neutral-300 bg-white hover:border-neutral-300", a?.root),
|
|
23440
23655
|
children: [f && /* @__PURE__ */ jsx("span", {
|
|
23441
23656
|
className: cn("flex items-center", a?.icon),
|
|
23442
|
-
children: renderIcon$1(f, cn("shrink-0",
|
|
23657
|
+
children: renderIcon$1(f, cn("shrink-0", h))
|
|
23443
23658
|
}), p && /* @__PURE__ */ jsxs("span", {
|
|
23444
23659
|
className: cn(l.label(), c && "font-medium text-neutral-400", a?.label),
|
|
23445
23660
|
children: [/* @__PURE__ */ jsx("span", { children: p }), typeof n == "number" && n > 0 && /* @__PURE__ */ jsxs("span", {
|
|
@@ -23457,9 +23672,9 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23457
23672
|
function IconCountButtonSkeleton({ orientation: e = "vertical", className: t }) {
|
|
23458
23673
|
let n = e === "vertical";
|
|
23459
23674
|
return /* @__PURE__ */ jsxs("div", {
|
|
23460
|
-
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),
|
|
23461
23676
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "size-8 rounded-full" }), /* @__PURE__ */ jsx("div", {
|
|
23462
|
-
className: cn("flex items-center
|
|
23677
|
+
className: cn("gap-1 flex items-center", n && "text-[9px]"),
|
|
23463
23678
|
children: /* @__PURE__ */ jsx(Skeleton, { className: cn("h-3", n ? "w-10" : "w-14") })
|
|
23464
23679
|
})]
|
|
23465
23680
|
});
|
|
@@ -23467,8 +23682,8 @@ function IconCountButtonSkeleton({ orientation: e = "vertical", className: t })
|
|
|
23467
23682
|
var iconCountButtonStyles = tv({
|
|
23468
23683
|
slots: {
|
|
23469
23684
|
root: "flex w-fit items-center",
|
|
23470
|
-
bubble: "
|
|
23471
|
-
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",
|
|
23472
23687
|
count: "font-normal",
|
|
23473
23688
|
icon: ""
|
|
23474
23689
|
},
|
|
@@ -23487,11 +23702,11 @@ var iconCountButtonStyles = tv({
|
|
|
23487
23702
|
},
|
|
23488
23703
|
orientation: {
|
|
23489
23704
|
vertical: {
|
|
23490
|
-
root: "flex-col
|
|
23491
|
-
label: "text-[9px]
|
|
23705
|
+
root: "gap-1 flex-col",
|
|
23706
|
+
label: "font-semibold text-[9px]"
|
|
23492
23707
|
},
|
|
23493
23708
|
horizontal: {
|
|
23494
|
-
root: "flex-row
|
|
23709
|
+
root: "gap-2 flex-row",
|
|
23495
23710
|
label: "text-xs font-semibold"
|
|
23496
23711
|
}
|
|
23497
23712
|
}
|
|
@@ -23565,12 +23780,12 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
|
|
|
23565
23780
|
tabIndex: 0,
|
|
23566
23781
|
"aria-pressed": e,
|
|
23567
23782
|
"aria-label": c,
|
|
23568
|
-
className: "
|
|
23783
|
+
className: "size-5 flex cursor-pointer items-center justify-center rounded-full bg-white",
|
|
23569
23784
|
onMouseEnter: r,
|
|
23570
23785
|
onMouseLeave: i,
|
|
23571
23786
|
onClick: a,
|
|
23572
23787
|
children: /* @__PURE__ */ jsxs("div", {
|
|
23573
|
-
className: cn("
|
|
23788
|
+
className: cn("size-4 flex items-center justify-center rounded-full border", e ? "border-tertiary-500" : "border-neutral-800"),
|
|
23574
23789
|
children: [o && /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full bg-neutral-800" }), e && /* @__PURE__ */ jsx(CloseIcon, {
|
|
23575
23790
|
size: 12,
|
|
23576
23791
|
className: "text-tertiary-500"
|
|
@@ -23580,20 +23795,20 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
|
|
|
23580
23795
|
})
|
|
23581
23796
|
}), document.body);
|
|
23582
23797
|
}
|
|
23583
|
-
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:
|
|
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 }) {
|
|
23584
23799
|
let O = iconCountButtonStyles({
|
|
23585
23800
|
variant: r,
|
|
23586
23801
|
orientation: i,
|
|
23587
23802
|
status: a
|
|
23588
|
-
}),
|
|
23589
|
-
function
|
|
23590
|
-
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);
|
|
23591
23806
|
}
|
|
23592
23807
|
return useLayoutEffect(() => {
|
|
23593
|
-
if (
|
|
23808
|
+
if (!$o || !Ko.current) return;
|
|
23594
23809
|
function e() {
|
|
23595
|
-
let e =
|
|
23596
|
-
e &&
|
|
23810
|
+
let e = Ko.current?.getBoundingClientRect();
|
|
23811
|
+
e && B({
|
|
23597
23812
|
top: e.top - 8,
|
|
23598
23813
|
left: e.right - 12
|
|
23599
23814
|
});
|
|
@@ -23601,30 +23816,30 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23601
23816
|
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
23602
23817
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
23603
23818
|
};
|
|
23604
|
-
}, [
|
|
23819
|
+
}, [$o]), /* @__PURE__ */ jsxs(Button, {
|
|
23605
23820
|
...g,
|
|
23606
|
-
className: cn(O.root(),
|
|
23607
|
-
onMouseEnter: () =>
|
|
23608
|
-
onMouseLeave: () =>
|
|
23821
|
+
className: cn(O.root(), p?.root),
|
|
23822
|
+
onMouseEnter: () => R(!0),
|
|
23823
|
+
onMouseLeave: () => R(!1),
|
|
23609
23824
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23610
23825
|
className: "relative",
|
|
23611
23826
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23612
|
-
ref:
|
|
23613
|
-
className: cn(O.bubble(),
|
|
23827
|
+
ref: Ko,
|
|
23828
|
+
className: cn(O.bubble(), p?.bubble),
|
|
23614
23829
|
children: renderIcon(e, O.icon())
|
|
23615
|
-
}),
|
|
23616
|
-
isPressed:
|
|
23617
|
-
isPortalHovered:
|
|
23618
|
-
portalPosition:
|
|
23619
|
-
onMouseEnter: () =>
|
|
23620
|
-
onMouseLeave: () =>
|
|
23621
|
-
onToggle: () =>
|
|
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)
|
|
23622
23837
|
})]
|
|
23623
23838
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23624
|
-
className: cn(O.label(),
|
|
23625
|
-
children: [/* @__PURE__ */ jsx("span", { children: t }),
|
|
23839
|
+
className: cn(O.label(), p?.label),
|
|
23840
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), es && /* @__PURE__ */ jsxs("span", {
|
|
23626
23841
|
"aria-label": `${n} items`,
|
|
23627
|
-
className: cn(O.count(),
|
|
23842
|
+
className: cn(O.count(), p?.count),
|
|
23628
23843
|
children: [
|
|
23629
23844
|
"(",
|
|
23630
23845
|
formatCount(n),
|
|
@@ -23636,7 +23851,7 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23636
23851
|
}
|
|
23637
23852
|
function ActionMenuItem({ icon: e, label: t, className: n, selected: r, ...a }) {
|
|
23638
23853
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23639
|
-
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),
|
|
23640
23855
|
...a,
|
|
23641
23856
|
children: [e && cloneElement(e, {
|
|
23642
23857
|
size: e.props.size ?? 16,
|
|
@@ -23650,13 +23865,13 @@ function ActionMenuItem({ icon: e, label: t, className: n, selected: r, ...a })
|
|
|
23650
23865
|
function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
23651
23866
|
return /* @__PURE__ */ jsx(DropdownMenu, {
|
|
23652
23867
|
trigger: e,
|
|
23653
|
-
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),
|
|
23654
23869
|
...r,
|
|
23655
23870
|
children: t
|
|
23656
23871
|
});
|
|
23657
23872
|
}
|
|
23658
23873
|
function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
|
|
23659
|
-
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(() => {
|
|
23660
23875
|
let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
|
|
23661
23876
|
return {
|
|
23662
23877
|
year: r.getFullYear(),
|
|
@@ -23664,7 +23879,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23664
23879
|
};
|
|
23665
23880
|
});
|
|
23666
23881
|
useEffect(() => {
|
|
23667
|
-
(e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !==
|
|
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(() => {
|
|
23668
23883
|
if (e === "single" && t) O({
|
|
23669
23884
|
year: t.getFullYear(),
|
|
23670
23885
|
month: t.getMonth()
|
|
@@ -23676,14 +23891,14 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23676
23891
|
month: e.getMonth()
|
|
23677
23892
|
});
|
|
23678
23893
|
}
|
|
23679
|
-
}), u.current = t,
|
|
23894
|
+
}), u.current = t, f.current = n;
|
|
23680
23895
|
}, [
|
|
23681
23896
|
e,
|
|
23682
23897
|
t,
|
|
23683
23898
|
n
|
|
23684
23899
|
]);
|
|
23685
|
-
let
|
|
23686
|
-
function
|
|
23900
|
+
let Ko = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
|
|
23901
|
+
function A(t) {
|
|
23687
23902
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23688
23903
|
if ((o !== g.month || s !== g.year) && O({
|
|
23689
23904
|
year: s,
|
|
@@ -23700,7 +23915,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23700
23915
|
}), a());
|
|
23701
23916
|
}
|
|
23702
23917
|
}
|
|
23703
|
-
function
|
|
23918
|
+
function R() {
|
|
23704
23919
|
O((e) => e.month === 0 ? {
|
|
23705
23920
|
year: e.year - 1,
|
|
23706
23921
|
month: 11
|
|
@@ -23709,7 +23924,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23709
23924
|
month: e.month - 1
|
|
23710
23925
|
});
|
|
23711
23926
|
}
|
|
23712
|
-
function
|
|
23927
|
+
function qo() {
|
|
23713
23928
|
O((e) => e.month === 11 ? {
|
|
23714
23929
|
year: e.year + 1,
|
|
23715
23930
|
month: 0
|
|
@@ -23718,24 +23933,24 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23718
23933
|
month: e.month + 1
|
|
23719
23934
|
});
|
|
23720
23935
|
}
|
|
23721
|
-
let
|
|
23936
|
+
let Jo = getWeekdays();
|
|
23722
23937
|
return /* @__PURE__ */ jsxs("div", {
|
|
23723
|
-
className: "mt-1
|
|
23938
|
+
className: "mt-1 rounded-lg p-2 shadow-lg w-fit border border-neutral-400 bg-white",
|
|
23724
23939
|
children: [
|
|
23725
23940
|
/* @__PURE__ */ jsxs("div", {
|
|
23726
|
-
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",
|
|
23727
23942
|
children: [
|
|
23728
23943
|
/* @__PURE__ */ jsx(IconButton, {
|
|
23729
23944
|
icon: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
23730
23945
|
direction: "left",
|
|
23731
23946
|
size: 20
|
|
23732
23947
|
}),
|
|
23733
|
-
onClick:
|
|
23948
|
+
onClick: R,
|
|
23734
23949
|
className: "hover:opacity-60",
|
|
23735
23950
|
"aria-label": "Previous month"
|
|
23736
23951
|
}),
|
|
23737
23952
|
/* @__PURE__ */ jsxs("div", {
|
|
23738
|
-
className: "text-[10px]
|
|
23953
|
+
className: "font-bold text-[10px] text-neutral-900",
|
|
23739
23954
|
children: [
|
|
23740
23955
|
getMonthName(g.month),
|
|
23741
23956
|
" ",
|
|
@@ -23747,7 +23962,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23747
23962
|
direction: "right",
|
|
23748
23963
|
size: 20
|
|
23749
23964
|
}),
|
|
23750
|
-
onClick:
|
|
23965
|
+
onClick: qo,
|
|
23751
23966
|
className: "hover:opacity-60",
|
|
23752
23967
|
"aria-label": "Next month"
|
|
23753
23968
|
})
|
|
@@ -23755,20 +23970,20 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23755
23970
|
}),
|
|
23756
23971
|
/* @__PURE__ */ jsx("div", {
|
|
23757
23972
|
className: "mb-2 grid grid-cols-7",
|
|
23758
|
-
children:
|
|
23759
|
-
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",
|
|
23760
23975
|
children: e
|
|
23761
23976
|
}, e))
|
|
23762
23977
|
}),
|
|
23763
23978
|
/* @__PURE__ */ jsx("div", {
|
|
23764
23979
|
className: "grid grid-cols-7",
|
|
23765
|
-
children:
|
|
23766
|
-
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u),
|
|
23767
|
-
e === "range" && u && !f && s && !isDateBefore(s, u) ? (
|
|
23768
|
-
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;
|
|
23769
23984
|
return /* @__PURE__ */ jsx(Button, {
|
|
23770
23985
|
type: "button",
|
|
23771
|
-
onClick: () =>
|
|
23986
|
+
onClick: () => A(i),
|
|
23772
23987
|
onMouseEnter: () => {
|
|
23773
23988
|
e === "range" && u && !f && !isDateBefore(i, u) && c(i);
|
|
23774
23989
|
},
|
|
@@ -23777,9 +23992,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23777
23992
|
},
|
|
23778
23993
|
className: "p-0.5",
|
|
23779
23994
|
"aria-label": `Select ${formatDate(i)}`,
|
|
23780
|
-
"aria-selected":
|
|
23995
|
+
"aria-selected": Go || void 0,
|
|
23781
23996
|
children: /* @__PURE__ */ jsx("div", {
|
|
23782
|
-
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")),
|
|
23783
23998
|
children: r
|
|
23784
23999
|
})
|
|
23785
24000
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -23795,7 +24010,7 @@ function DatePickerTrigger({ displayText: e, disabled: t, className: n, onClear:
|
|
|
23795
24010
|
}
|
|
23796
24011
|
return /* @__PURE__ */ jsxs(Pressable, {
|
|
23797
24012
|
disabled: t,
|
|
23798
|
-
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),
|
|
23799
24014
|
children: [
|
|
23800
24015
|
/* @__PURE__ */ jsx(CalendarIcon, {
|
|
23801
24016
|
size: 20,
|
|
@@ -23844,11 +24059,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23844
24059
|
function h(t) {
|
|
23845
24060
|
e === "single" && (u || s(t), r?.(t));
|
|
23846
24061
|
}
|
|
23847
|
-
function
|
|
24062
|
+
function g(t) {
|
|
23848
24063
|
e === "range" && (u || l(t), r?.(t));
|
|
23849
24064
|
}
|
|
23850
|
-
function
|
|
23851
|
-
e === "single" ? h(null) :
|
|
24065
|
+
function Go() {
|
|
24066
|
+
e === "single" ? h(null) : g({
|
|
23852
24067
|
startDate: null,
|
|
23853
24068
|
endDate: null
|
|
23854
24069
|
});
|
|
@@ -23858,7 +24073,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23858
24073
|
displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
|
|
23859
24074
|
disabled: i,
|
|
23860
24075
|
className: a,
|
|
23861
|
-
onClear:
|
|
24076
|
+
onClear: Go
|
|
23862
24077
|
}),
|
|
23863
24078
|
disabled: i,
|
|
23864
24079
|
children: /* @__PURE__ */ jsx(CalendarPanel, {
|
|
@@ -23866,7 +24081,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23866
24081
|
selectedDate: f,
|
|
23867
24082
|
selectedRange: p,
|
|
23868
24083
|
onDateSelect: h,
|
|
23869
|
-
onRangeSelect:
|
|
24084
|
+
onRangeSelect: g
|
|
23870
24085
|
})
|
|
23871
24086
|
}) });
|
|
23872
24087
|
}
|
|
@@ -23879,17 +24094,20 @@ const EVENT_CARD_HEIGHT_SIZE = {
|
|
|
23879
24094
|
style: "h-[60px]",
|
|
23880
24095
|
value: 60
|
|
23881
24096
|
}
|
|
24097
|
+
}, EVENT_SUMMARY_CARD_HEIGHT_SIZE = {
|
|
24098
|
+
style: "h-[104px]",
|
|
24099
|
+
value: 104
|
|
23882
24100
|
};
|
|
23883
24101
|
function EventCardSkeleton({ density: e = "normal", className: t, style: n }) {
|
|
23884
24102
|
return /* @__PURE__ */ jsx(Card, {
|
|
23885
|
-
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),
|
|
23886
24104
|
style: n,
|
|
23887
24105
|
children: e === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
23888
24106
|
className: "gap-x-2 gap-y-1",
|
|
23889
24107
|
children: [
|
|
23890
24108
|
/* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5" }) }),
|
|
23891
24109
|
/* @__PURE__ */ jsxs(CardHeader, {
|
|
23892
|
-
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",
|
|
23893
24111
|
children: [
|
|
23894
24112
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4" }),
|
|
23895
24113
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-24" }),
|
|
@@ -23898,17 +24116,17 @@ function EventCardSkeleton({ density: e = "normal", className: t, style: n }) {
|
|
|
23898
24116
|
]
|
|
23899
24117
|
}),
|
|
23900
24118
|
/* @__PURE__ */ jsx(CardTitle, {
|
|
23901
|
-
className: "
|
|
24119
|
+
className: "h-5 flex items-center",
|
|
23902
24120
|
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-48" })
|
|
23903
24121
|
}),
|
|
23904
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" })] }),
|
|
23905
24123
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
23906
|
-
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",
|
|
23907
24125
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23908
|
-
className: "
|
|
24126
|
+
className: "gap-2 flex",
|
|
23909
24127
|
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-23 rounded-full" })
|
|
23910
24128
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23911
|
-
className: "
|
|
24129
|
+
className: "gap-2 flex",
|
|
23912
24130
|
children: [
|
|
23913
24131
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-6 rounded-full" }),
|
|
23914
24132
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-6 rounded-full" }),
|
|
@@ -23918,16 +24136,16 @@ function EventCardSkeleton({ density: e = "normal", className: t, style: n }) {
|
|
|
23918
24136
|
})
|
|
23919
24137
|
]
|
|
23920
24138
|
}) : /* @__PURE__ */ jsxs(CardLayout, {
|
|
23921
|
-
className: "grid grid-cols-[auto_1fr] grid-rows-1
|
|
24139
|
+
className: "gap-x-2 grid grid-cols-[auto_1fr] grid-rows-1",
|
|
23922
24140
|
children: [/* @__PURE__ */ jsx(CardSidebar, {
|
|
23923
24141
|
className: "flex items-center justify-center",
|
|
23924
24142
|
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-5" })
|
|
23925
24143
|
}), /* @__PURE__ */ jsxs(CardHeader, {
|
|
23926
|
-
className: "
|
|
24144
|
+
className: "min-w-0 gap-2 flex items-center",
|
|
23927
24145
|
children: [
|
|
23928
24146
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4" }),
|
|
23929
24147
|
/* @__PURE__ */ jsx("div", {
|
|
23930
|
-
className: "
|
|
24148
|
+
className: "min-w-0 gap-2 flex items-center",
|
|
23931
24149
|
children: /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-32" })
|
|
23932
24150
|
}),
|
|
23933
24151
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
@@ -23967,7 +24185,7 @@ var EVENT_ACTION_CONFIG = {
|
|
|
23967
24185
|
})
|
|
23968
24186
|
}
|
|
23969
24187
|
}, eventCardStyles = tv({
|
|
23970
|
-
base: "w-full
|
|
24188
|
+
base: "rounded-lg p-4 w-full border-[1.5px] bg-white-variant-5",
|
|
23971
24189
|
variants: {
|
|
23972
24190
|
tone: {
|
|
23973
24191
|
default: "hover:bg-primary-light",
|
|
@@ -24045,7 +24263,7 @@ function EventCheckbox({ checked: e, onCheckedChange: t }) {
|
|
|
24045
24263
|
}
|
|
24046
24264
|
function EventStatusesList({ statusBadges: e, density: t }) {
|
|
24047
24265
|
return Object.keys(e).length === 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
24048
|
-
className: "
|
|
24266
|
+
className: "gap-2 flex",
|
|
24049
24267
|
children: /* @__PURE__ */ jsx(StopPropagation, { children: Object.keys(e).map((n) => {
|
|
24050
24268
|
let r = e[n];
|
|
24051
24269
|
return r ? /* @__PURE__ */ jsx(StatusBadge, {
|
|
@@ -24059,7 +24277,7 @@ function EventStatusesList({ statusBadges: e, density: t }) {
|
|
|
24059
24277
|
}
|
|
24060
24278
|
function EventActionsList({ actions: e, className: t }) {
|
|
24061
24279
|
return Object.keys(e).length === 0 ? null : /* @__PURE__ */ jsx("div", {
|
|
24062
|
-
className: cn("
|
|
24280
|
+
className: cn("gap-2 flex", t),
|
|
24063
24281
|
children: /* @__PURE__ */ jsx(StopPropagation, { children: Object.keys(e).map((t) => {
|
|
24064
24282
|
let n = e[t];
|
|
24065
24283
|
return n ? /* @__PURE__ */ jsx(IconButton, {
|
|
@@ -24069,16 +24287,16 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
24069
24287
|
}) })
|
|
24070
24288
|
});
|
|
24071
24289
|
}
|
|
24072
|
-
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:
|
|
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 }) {
|
|
24073
24291
|
return /* @__PURE__ */ jsx(Card, {
|
|
24074
24292
|
as: Pressable,
|
|
24075
24293
|
onPress: u,
|
|
24076
24294
|
className: cn(eventCardStyles({
|
|
24077
|
-
tone:
|
|
24295
|
+
tone: A ? "priority" : R ? "done" : "default",
|
|
24078
24296
|
state: l ? "selected" : c ? "read" : "unread",
|
|
24079
24297
|
density: g
|
|
24080
24298
|
}), O),
|
|
24081
|
-
style:
|
|
24299
|
+
style: Ko,
|
|
24082
24300
|
"data-service": t,
|
|
24083
24301
|
children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
24084
24302
|
className: "gap-x-2 gap-y-1",
|
|
@@ -24088,11 +24306,11 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24088
24306
|
onCheckedChange: p
|
|
24089
24307
|
}) }),
|
|
24090
24308
|
/* @__PURE__ */ jsxs(CardHeader, {
|
|
24091
|
-
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",
|
|
24092
24310
|
children: [
|
|
24093
24311
|
e,
|
|
24094
24312
|
/* @__PURE__ */ jsx("span", {
|
|
24095
|
-
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"),
|
|
24096
24314
|
children: n
|
|
24097
24315
|
}),
|
|
24098
24316
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -24106,23 +24324,23 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24106
24324
|
]
|
|
24107
24325
|
}),
|
|
24108
24326
|
/* @__PURE__ */ jsx(CardTitle, {
|
|
24109
|
-
className: cn("
|
|
24327
|
+
className: cn("text-sm font-bold line-clamp-1 text-neutral-900", c && "font-medium"),
|
|
24110
24328
|
children: r
|
|
24111
24329
|
}),
|
|
24112
24330
|
/* @__PURE__ */ jsx(CardContent, {
|
|
24113
|
-
className: "
|
|
24331
|
+
className: "min-w-0 text-sm line-clamp-2 text-neutral-900",
|
|
24114
24332
|
children: i
|
|
24115
24333
|
}),
|
|
24116
24334
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
24117
|
-
className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center
|
|
24118
|
-
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges:
|
|
24119
|
-
actions:
|
|
24335
|
+
className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
|
|
24336
|
+
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
24337
|
+
actions: Uo,
|
|
24120
24338
|
className: "col-start-2 justify-self-end"
|
|
24121
24339
|
})]
|
|
24122
24340
|
})
|
|
24123
24341
|
]
|
|
24124
24342
|
}) : /* @__PURE__ */ jsxs(CardLayout, {
|
|
24125
|
-
className: "grid grid-cols-[auto_1fr] grid-rows-1
|
|
24343
|
+
className: "gap-x-2 grid grid-cols-[auto_1fr] grid-rows-1",
|
|
24126
24344
|
children: [/* @__PURE__ */ jsx(CardSidebar, {
|
|
24127
24345
|
className: "flex items-center justify-center",
|
|
24128
24346
|
children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
@@ -24130,22 +24348,22 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24130
24348
|
onCheckedChange: p
|
|
24131
24349
|
})
|
|
24132
24350
|
}), /* @__PURE__ */ jsxs(CardHeader, {
|
|
24133
|
-
className: "
|
|
24351
|
+
className: "min-w-0 gap-2 flex items-center",
|
|
24134
24352
|
children: [
|
|
24135
24353
|
e,
|
|
24136
24354
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
24137
|
-
statusBadges:
|
|
24355
|
+
statusBadges: h,
|
|
24138
24356
|
density: g
|
|
24139
24357
|
}),
|
|
24140
24358
|
/* @__PURE__ */ jsxs("div", {
|
|
24141
|
-
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"),
|
|
24142
24360
|
children: [
|
|
24143
24361
|
/* @__PURE__ */ jsx("span", {
|
|
24144
24362
|
className: "truncate",
|
|
24145
24363
|
children: n
|
|
24146
24364
|
}),
|
|
24147
24365
|
/* @__PURE__ */ jsx("span", {
|
|
24148
|
-
className: "shrink-0 text-
|
|
24366
|
+
className: "text-sm shrink-0 text-neutral-500",
|
|
24149
24367
|
children: "•"
|
|
24150
24368
|
}),
|
|
24151
24369
|
/* @__PURE__ */ jsx("span", {
|
|
@@ -24155,7 +24373,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24155
24373
|
]
|
|
24156
24374
|
}),
|
|
24157
24375
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
24158
|
-
/* @__PURE__ */ jsx(EventActionsList, { actions:
|
|
24376
|
+
/* @__PURE__ */ jsx(EventActionsList, { actions: Uo }),
|
|
24159
24377
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
24160
24378
|
content: o,
|
|
24161
24379
|
children: /* @__PURE__ */ jsx("span", {
|
|
@@ -24174,12 +24392,12 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24174
24392
|
}
|
|
24175
24393
|
function EventDetailContentDetailsPanel({ title: e, rows: t }) {
|
|
24176
24394
|
return /* @__PURE__ */ jsxs("div", {
|
|
24177
|
-
className: "
|
|
24395
|
+
className: "gap-2 rounded-lg p-4 text-sm flex flex-col bg-neutral-100-variant-3 text-neutral-800",
|
|
24178
24396
|
children: [e && /* @__PURE__ */ jsx("div", {
|
|
24179
24397
|
className: "font-bold",
|
|
24180
24398
|
children: e
|
|
24181
24399
|
}), /* @__PURE__ */ jsx("div", {
|
|
24182
|
-
className: "
|
|
24400
|
+
className: "gap-x-4 gap-y-1 grid grid-cols-[auto_1fr]",
|
|
24183
24401
|
children: t.map(({ label: e, value: t }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
24184
24402
|
className: "font-bold",
|
|
24185
24403
|
children: [e, ":"]
|
|
@@ -24211,25 +24429,22 @@ function EventDetailContentCalendarDetails({ from: e, to: t, link: n, location:
|
|
|
24211
24429
|
] });
|
|
24212
24430
|
}
|
|
24213
24431
|
function EventDetailPriority({ priorityText: e }) {
|
|
24214
|
-
return /* @__PURE__ */
|
|
24215
|
-
className: "
|
|
24216
|
-
children:
|
|
24217
|
-
|
|
24218
|
-
className: "text-tertiary-500-variant-2"
|
|
24219
|
-
}), /* @__PURE__ */ jsxs("div", {
|
|
24220
|
-
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",
|
|
24221
24436
|
children: [/* @__PURE__ */ jsx("span", {
|
|
24222
|
-
className: "font-bold",
|
|
24437
|
+
className: "font-bold text-tertiary-500",
|
|
24223
24438
|
children: "High Urgency:\xA0"
|
|
24224
24439
|
}), e]
|
|
24225
|
-
})
|
|
24440
|
+
})
|
|
24226
24441
|
});
|
|
24227
24442
|
}
|
|
24228
24443
|
function EventDetailSummary({ summary: e }) {
|
|
24229
24444
|
return /* @__PURE__ */ jsxs("div", {
|
|
24230
|
-
className: "
|
|
24445
|
+
className: "gap-2 rounded-lg p-4 flex bg-neutral-100-variant-3",
|
|
24231
24446
|
children: [/* @__PURE__ */ jsx(SummaryIcon, { size: 24 }), /* @__PURE__ */ jsxs("p", {
|
|
24232
|
-
className: "text-sm leading-[1.3]
|
|
24447
|
+
className: "text-sm font-normal leading-[1.3] text-neutral-800",
|
|
24233
24448
|
children: [/* @__PURE__ */ jsx("span", {
|
|
24234
24449
|
className: "font-bold",
|
|
24235
24450
|
children: "Summary:\xA0"
|
|
@@ -24237,17 +24452,13 @@ function EventDetailSummary({ summary: e }) {
|
|
|
24237
24452
|
})]
|
|
24238
24453
|
});
|
|
24239
24454
|
}
|
|
24240
|
-
function EventDetailContentHeader({ summary: e, priorityText: t,
|
|
24455
|
+
function EventDetailContentHeader({ summary: e, priorityText: t, children: n, className: r }) {
|
|
24241
24456
|
return /* @__PURE__ */ jsxs("div", {
|
|
24242
|
-
className: cn("flex flex-col",
|
|
24243
|
-
children: [
|
|
24244
|
-
|
|
24245
|
-
|
|
24246
|
-
|
|
24247
|
-
className: "flex flex-col gap-4 p-4",
|
|
24248
|
-
children: [e != null && /* @__PURE__ */ jsx(EventDetailSummary, { summary: e }), r]
|
|
24249
|
-
})
|
|
24250
|
-
]
|
|
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
|
+
})]
|
|
24251
24462
|
});
|
|
24252
24463
|
}
|
|
24253
24464
|
function EventDetailContentCalendar({ detail: { summary: e, body: t, priorityText: n, from: r, to: i, link: a, location: o }, className: s }) {
|
|
@@ -24290,7 +24501,6 @@ function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText:
|
|
|
24290
24501
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24291
24502
|
summary: e,
|
|
24292
24503
|
priorityText: n,
|
|
24293
|
-
highlightPriority: !!n,
|
|
24294
24504
|
className: s,
|
|
24295
24505
|
children: [/* @__PURE__ */ jsx(EventDetailContentEmailDetails, {
|
|
24296
24506
|
subject: r,
|
|
@@ -24298,18 +24508,18 @@ function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText:
|
|
|
24298
24508
|
date: a,
|
|
24299
24509
|
from: o
|
|
24300
24510
|
}), /* @__PURE__ */ jsx(RichContent, {
|
|
24301
|
-
className: "max-w-[1260px]
|
|
24511
|
+
className: "px-4 max-w-[1260px]",
|
|
24302
24512
|
content: t
|
|
24303
24513
|
})]
|
|
24304
24514
|
});
|
|
24305
24515
|
}
|
|
24306
24516
|
function DateSeparator({ timestamp: e }) {
|
|
24307
24517
|
return /* @__PURE__ */ jsxs("div", {
|
|
24308
|
-
className: "flex items-center
|
|
24518
|
+
className: "gap-4 flex items-center",
|
|
24309
24519
|
children: [
|
|
24310
24520
|
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-neutral-300-variant-2" }),
|
|
24311
24521
|
/* @__PURE__ */ jsx("span", {
|
|
24312
|
-
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",
|
|
24313
24523
|
children: e
|
|
24314
24524
|
}),
|
|
24315
24525
|
/* @__PURE__ */ jsx("div", { className: "h-px flex-1 bg-neutral-300-variant-2" })
|
|
@@ -24343,7 +24553,7 @@ function MessageContent({ content: e }) {
|
|
|
24343
24553
|
function RepliesTrigger({ replyId: e, replyCount: t }) {
|
|
24344
24554
|
let { openItems: n } = useAccordion();
|
|
24345
24555
|
return /* @__PURE__ */ jsxs("div", {
|
|
24346
|
-
className: "
|
|
24556
|
+
className: "gap-2 p-1.5 px-2 text-xs font-medium flex items-center text-neutral-600",
|
|
24347
24557
|
children: [/* @__PURE__ */ jsx(ArrowIcon, {
|
|
24348
24558
|
direction: n.has(`replies-${e}`) ? "up" : "down",
|
|
24349
24559
|
size: 12,
|
|
@@ -24364,26 +24574,26 @@ function MessageReplies({ replies: e }) {
|
|
|
24364
24574
|
defaultValue: [`replies-${t}`],
|
|
24365
24575
|
children: /* @__PURE__ */ jsxs(AccordionItem, {
|
|
24366
24576
|
value: `replies-${t}`,
|
|
24367
|
-
className: "flex flex-col
|
|
24577
|
+
className: "gap-2 flex flex-col",
|
|
24368
24578
|
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
24369
24579
|
value: `replies-${t}`,
|
|
24370
|
-
className: "flex items-center justify-between
|
|
24580
|
+
className: "rounded hover:bg-neutral-50 flex items-center justify-between transition-colors",
|
|
24371
24581
|
children: /* @__PURE__ */ jsx(RepliesTrigger, {
|
|
24372
24582
|
replyId: t,
|
|
24373
24583
|
replyCount: e.length
|
|
24374
24584
|
})
|
|
24375
24585
|
}), /* @__PURE__ */ jsx(AccordionContent, {
|
|
24376
24586
|
value: `replies-${t}`,
|
|
24377
|
-
className: "ml-3 flex flex-col
|
|
24587
|
+
className: "ml-3 gap-4 pl-4 flex flex-col border-l-2 border-neutral-500",
|
|
24378
24588
|
children: e.map((e) => /* @__PURE__ */ jsxs("div", {
|
|
24379
|
-
className: "
|
|
24589
|
+
className: "gap-3 flex",
|
|
24380
24590
|
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
24381
24591
|
name: e.author,
|
|
24382
24592
|
size: "lg"
|
|
24383
24593
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24384
24594
|
className: "min-w-0 flex-1",
|
|
24385
24595
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24386
|
-
className: "flex items-center
|
|
24596
|
+
className: "gap-2 flex items-center",
|
|
24387
24597
|
children: [/* @__PURE__ */ jsx("div", {
|
|
24388
24598
|
className: "text-sm font-semibold text-neutral-900",
|
|
24389
24599
|
children: e.author
|
|
@@ -24402,16 +24612,16 @@ function MessageItem({ message: e, isPriority: t = !1 }) {
|
|
|
24402
24612
|
return /* @__PURE__ */ jsx("div", {
|
|
24403
24613
|
className: "transition-colors",
|
|
24404
24614
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24405
|
-
className: "
|
|
24615
|
+
className: "gap-3 flex",
|
|
24406
24616
|
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
24407
24617
|
name: e.author,
|
|
24408
24618
|
size: t ? "xl" : "lg"
|
|
24409
24619
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24410
|
-
className: "
|
|
24620
|
+
className: "min-w-0 gap-2 flex flex-1 flex-col",
|
|
24411
24621
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24412
|
-
className: "flex flex-col
|
|
24622
|
+
className: "gap-1 flex flex-col",
|
|
24413
24623
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24414
|
-
className: "flex items-center
|
|
24624
|
+
className: "gap-2 flex items-center",
|
|
24415
24625
|
children: [
|
|
24416
24626
|
/* @__PURE__ */ jsx("div", {
|
|
24417
24627
|
className: "text-sm font-semibold text-neutral-900",
|
|
@@ -24437,14 +24647,14 @@ function PriorityNavigation({ priorityIndex: e, priorityTotal: t, onPreviousPrio
|
|
|
24437
24647
|
if (!e || !t || t <= 1) return null;
|
|
24438
24648
|
let i = e > 1, a = e < t;
|
|
24439
24649
|
return !a && !i ? null : /* @__PURE__ */ jsx("div", {
|
|
24440
|
-
className: "mb-3 flex justify-center
|
|
24650
|
+
className: "mb-3 px-2 flex justify-center",
|
|
24441
24651
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24442
|
-
className: "flex w-full items-center justify-center
|
|
24652
|
+
className: "gap-4 flex w-full items-center justify-center",
|
|
24443
24653
|
children: [
|
|
24444
24654
|
/* @__PURE__ */ jsx("div", {
|
|
24445
24655
|
className: "flex flex-1 justify-end",
|
|
24446
24656
|
children: a && /* @__PURE__ */ jsxs(Button, {
|
|
24447
|
-
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",
|
|
24448
24658
|
"aria-label": "Previous Fire",
|
|
24449
24659
|
onClick: n,
|
|
24450
24660
|
children: [/* @__PURE__ */ jsx(ArrowIcon, {
|
|
@@ -24464,7 +24674,7 @@ function PriorityNavigation({ priorityIndex: e, priorityTotal: t, onPreviousPrio
|
|
|
24464
24674
|
/* @__PURE__ */ jsx("div", {
|
|
24465
24675
|
className: "flex-1",
|
|
24466
24676
|
children: i && /* @__PURE__ */ jsxs(Button, {
|
|
24467
|
-
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",
|
|
24468
24678
|
"aria-label": "Next Fire",
|
|
24469
24679
|
onClick: r,
|
|
24470
24680
|
children: [/* @__PURE__ */ jsx("span", { children: "Next Fire" }), /* @__PURE__ */ jsx(ArrowIcon, {
|
|
@@ -24479,15 +24689,15 @@ function PriorityNavigation({ priorityIndex: e, priorityTotal: t, onPreviousPrio
|
|
|
24479
24689
|
}
|
|
24480
24690
|
function PriorityGroupHeader({ title: e, onMarkAsNotFireClick: t }) {
|
|
24481
24691
|
return e ? /* @__PURE__ */ jsx("div", {
|
|
24482
|
-
className: "border-b border-neutral-200
|
|
24692
|
+
className: "pb-3 border-b border-neutral-200",
|
|
24483
24693
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24484
|
-
className: "flex items-center
|
|
24694
|
+
className: "gap-2 flex items-center",
|
|
24485
24695
|
children: [/* @__PURE__ */ jsx(IconButton, {
|
|
24486
24696
|
icon: /* @__PURE__ */ jsx(FireIcon, {
|
|
24487
24697
|
size: 16,
|
|
24488
24698
|
className: "text-tertiary-500"
|
|
24489
24699
|
}),
|
|
24490
|
-
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",
|
|
24491
24701
|
"aria-label": "Priority",
|
|
24492
24702
|
onClick: t
|
|
24493
24703
|
}), /* @__PURE__ */ jsx("h4", {
|
|
@@ -24507,7 +24717,7 @@ function PriorityGroup({ group: e, children: t, onPreviousPriority: n, onNextPri
|
|
|
24507
24717
|
onPreviousPriority: n,
|
|
24508
24718
|
onNextPriority: r
|
|
24509
24719
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24510
|
-
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",
|
|
24511
24721
|
children: [/* @__PURE__ */ jsx(PriorityGroupHeader, {
|
|
24512
24722
|
title: e.priorityText,
|
|
24513
24723
|
onMarkAsNotFireClick: i
|
|
@@ -24517,7 +24727,7 @@ function PriorityGroup({ group: e, children: t, onPreviousPriority: n, onNextPri
|
|
|
24517
24727
|
}
|
|
24518
24728
|
function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
|
|
24519
24729
|
return /* @__PURE__ */ jsxs("div", {
|
|
24520
|
-
className: "flex flex-col
|
|
24730
|
+
className: "gap-4 flex flex-col",
|
|
24521
24731
|
children: [/* @__PURE__ */ jsx(DateSeparator, { timestamp: e.timestamp }), /* @__PURE__ */ jsx(PriorityGroup, {
|
|
24522
24732
|
group: e,
|
|
24523
24733
|
onPreviousPriority: t,
|
|
@@ -24555,7 +24765,7 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
24555
24765
|
className: r,
|
|
24556
24766
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24557
24767
|
ref: a,
|
|
24558
|
-
className: "flex flex-col
|
|
24768
|
+
className: "gap-4 flex flex-col",
|
|
24559
24769
|
children: [e.map((e) => {
|
|
24560
24770
|
let t = e.isPriority ? c-- : 0, n = t ? () => {
|
|
24561
24771
|
let e = t + 1;
|
|
@@ -24632,12 +24842,11 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
|
|
|
24632
24842
|
]
|
|
24633
24843
|
})] });
|
|
24634
24844
|
}
|
|
24635
|
-
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:
|
|
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 }) {
|
|
24636
24846
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24637
24847
|
summary: e,
|
|
24638
24848
|
priorityText: n,
|
|
24639
|
-
|
|
24640
|
-
className: h,
|
|
24849
|
+
className: Uo,
|
|
24641
24850
|
children: [
|
|
24642
24851
|
/* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
|
|
24643
24852
|
issue: r,
|
|
@@ -24650,25 +24859,156 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
24650
24859
|
reporter: u,
|
|
24651
24860
|
team: f,
|
|
24652
24861
|
location: p,
|
|
24653
|
-
related:
|
|
24862
|
+
related: h
|
|
24654
24863
|
}),
|
|
24655
24864
|
/* @__PURE__ */ jsx("h2", {
|
|
24656
24865
|
className: "px-4 text-sm font-bold text-neutral-900",
|
|
24657
24866
|
children: "Description"
|
|
24658
24867
|
}),
|
|
24659
24868
|
/* @__PURE__ */ jsx(RichContent, {
|
|
24660
|
-
className: "max-w-[1260px]
|
|
24869
|
+
className: "px-4 max-w-[1260px]",
|
|
24661
24870
|
content: t
|
|
24662
24871
|
})
|
|
24663
24872
|
]
|
|
24664
24873
|
});
|
|
24665
24874
|
}
|
|
24666
|
-
|
|
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 }) {
|
|
24667
24914
|
return /* @__PURE__ */ jsxs("div", {
|
|
24668
|
-
className:
|
|
24669
|
-
|
|
24670
|
-
|
|
24671
|
-
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",
|
|
24672
25012
|
children: [
|
|
24673
25013
|
c && /* @__PURE__ */ jsx(IconButton, {
|
|
24674
25014
|
icon: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
@@ -24677,41 +25017,36 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
|
|
|
24677
25017
|
className: "text-neutral-700"
|
|
24678
25018
|
}),
|
|
24679
25019
|
"aria-label": "Go back",
|
|
24680
|
-
className: "rounded p-1 hover:bg-neutral-100
|
|
24681
|
-
}),
|
|
24682
|
-
/* @__PURE__ */ jsx("div", {
|
|
24683
|
-
className: "relative shrink-0",
|
|
24684
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
24685
|
-
className: "relative flex items-center justify-center",
|
|
24686
|
-
children: [cloneElement(e, { size: 36 }), !s && o && /* @__PURE__ */ jsx(FireIcon, {
|
|
24687
|
-
size: 16,
|
|
24688
|
-
className: "absolute right-[-12px] bottom-0 text-tertiary-500-variant-2"
|
|
24689
|
-
})]
|
|
24690
|
-
})
|
|
25020
|
+
className: "rounded p-1 md:hidden hover:bg-neutral-100"
|
|
24691
25021
|
}),
|
|
25022
|
+
cloneElement(e, { size: 36 }),
|
|
24692
25023
|
/* @__PURE__ */ jsxs("div", {
|
|
24693
25024
|
className: "w-0 min-w-0 flex-1 overflow-hidden",
|
|
24694
25025
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
24695
|
-
className: "block truncate
|
|
25026
|
+
className: "text-sm font-bold block truncate leading-[1.3] text-neutral-900",
|
|
24696
25027
|
children: n
|
|
24697
25028
|
}), /* @__PURE__ */ jsx("div", {
|
|
24698
|
-
className: "block truncate
|
|
25029
|
+
className: "text-sm font-normal block truncate leading-[1.3] text-neutral-900",
|
|
24699
25030
|
children: t
|
|
24700
25031
|
})]
|
|
24701
25032
|
}),
|
|
24702
25033
|
/* @__PURE__ */ jsxs("div", {
|
|
24703
|
-
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]",
|
|
24704
25035
|
children: [r != null && /* @__PURE__ */ jsx("span", {
|
|
24705
|
-
className: "min-w-0
|
|
25036
|
+
className: "min-w-0 font-normal truncate text-neutral-600",
|
|
24706
25037
|
children: r
|
|
24707
25038
|
}), /* @__PURE__ */ jsx("span", {
|
|
24708
|
-
className: "shrink-0
|
|
25039
|
+
className: "font-medium shrink-0 whitespace-nowrap text-neutral-600",
|
|
24709
25040
|
children: a
|
|
24710
25041
|
})]
|
|
24711
25042
|
}),
|
|
24712
|
-
/* @__PURE__ */
|
|
24713
|
-
|
|
24714
|
-
|
|
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, {
|
|
24715
25050
|
icon: /* @__PURE__ */ jsx(ArrowIcon, {
|
|
24716
25051
|
size: 24,
|
|
24717
25052
|
className: "text-neutral-700",
|
|
@@ -24719,17 +25054,21 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
|
|
|
24719
25054
|
}),
|
|
24720
25055
|
"aria-label": "Toggle event",
|
|
24721
25056
|
className: "rounded p-1 hover:bg-neutral-100"
|
|
24722
|
-
})
|
|
25057
|
+
})
|
|
25058
|
+
}),
|
|
25059
|
+
c && /* @__PURE__ */ jsx("div", {
|
|
25060
|
+
className: "gap-2 md:hidden flex shrink-0 items-center",
|
|
25061
|
+
children: /* @__PURE__ */ jsx(IconButton, {
|
|
24723
25062
|
icon: /* @__PURE__ */ jsx(MoreIcon, {
|
|
24724
25063
|
size: 24,
|
|
24725
25064
|
className: "text-neutral-700"
|
|
24726
25065
|
}),
|
|
24727
25066
|
"aria-label": "Close",
|
|
24728
|
-
className: "rounded p-1 hover:bg-neutral-100
|
|
24729
|
-
})
|
|
25067
|
+
className: "rounded p-1 hover:bg-neutral-100"
|
|
25068
|
+
})
|
|
24730
25069
|
})
|
|
24731
25070
|
]
|
|
24732
|
-
})
|
|
25071
|
+
})
|
|
24733
25072
|
});
|
|
24734
25073
|
}
|
|
24735
25074
|
function EventDetailSkeleton({ className: e }) {
|
|
@@ -24740,13 +25079,13 @@ function EventDetailSkeleton({ className: e }) {
|
|
|
24740
25079
|
}
|
|
24741
25080
|
function EventDetailHeaderSkeleton({ className: e }) {
|
|
24742
25081
|
return /* @__PURE__ */ jsx("div", {
|
|
24743
|
-
className: cn("
|
|
25082
|
+
className: cn("h-14 px-4 py-2 flex w-full items-center bg-white", e),
|
|
24744
25083
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24745
|
-
className: "flex w-full items-center
|
|
25084
|
+
className: "gap-4 flex w-full items-center",
|
|
24746
25085
|
children: [
|
|
24747
25086
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-9 w-9 rounded-full" }),
|
|
24748
25087
|
/* @__PURE__ */ jsxs("div", {
|
|
24749
|
-
className: "min-w-0
|
|
25088
|
+
className: "min-w-0 space-y-2 flex-1",
|
|
24750
25089
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-3/12" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-9/12" })]
|
|
24751
25090
|
}),
|
|
24752
25091
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-14" })
|
|
@@ -24758,11 +25097,11 @@ function EventDetailContentSkeleton() {
|
|
|
24758
25097
|
return /* @__PURE__ */ jsx("div", {
|
|
24759
25098
|
className: "flex flex-col",
|
|
24760
25099
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24761
|
-
className: "
|
|
25100
|
+
className: "gap-4 p-4 flex flex-col",
|
|
24762
25101
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
24763
|
-
className: "
|
|
25102
|
+
className: "gap-2 rounded-lg p-4 flex bg-neutral-100-variant-3",
|
|
24764
25103
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-6 w-6 rounded" }), /* @__PURE__ */ jsxs("div", {
|
|
24765
|
-
className: "
|
|
25104
|
+
className: "space-y-2 flex-1",
|
|
24766
25105
|
children: [
|
|
24767
25106
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-6/12" }),
|
|
24768
25107
|
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-10/12" }),
|
|
@@ -24804,7 +25143,7 @@ function renderEventContent(e) {
|
|
|
24804
25143
|
function getEventValue(e, t) {
|
|
24805
25144
|
return e.id ?? `${e.type}-${e.timestamp}-${t}`;
|
|
24806
25145
|
}
|
|
24807
|
-
function EventDetail({ events: e, expandedEventIndex: t }) {
|
|
25146
|
+
function EventDetail({ events: e, expandedEventIndex: t, onFireClick: n }) {
|
|
24808
25147
|
if (e.length === 0) return null;
|
|
24809
25148
|
if (e.length === 1) {
|
|
24810
25149
|
let t = e[0];
|
|
@@ -24820,75 +25159,118 @@ function EventDetail({ events: e, expandedEventIndex: t }) {
|
|
|
24820
25159
|
isOpen: !0,
|
|
24821
25160
|
isFirstEvent: !0,
|
|
24822
25161
|
isSingleEvent: !0,
|
|
24823
|
-
className: "
|
|
25162
|
+
className: "top-0 sticky z-10 border-b border-neutral-400",
|
|
25163
|
+
onFireClick: n
|
|
24824
25164
|
}), renderEventContent(t)]
|
|
24825
25165
|
});
|
|
24826
25166
|
}
|
|
24827
25167
|
return /* @__PURE__ */ jsx(Accordion, {
|
|
24828
25168
|
className: "w-full",
|
|
24829
25169
|
defaultValue: t === void 0 ? getEventValue(e[0], 0) : getEventValue(e[t], t),
|
|
24830
|
-
children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment$1, { children: e.map((
|
|
24831
|
-
let
|
|
25170
|
+
children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment$1, { children: e.map((r, i) => {
|
|
25171
|
+
let a = getEventValue(r, i), o = t.has(a);
|
|
24832
25172
|
return /* @__PURE__ */ jsxs(AccordionItem, {
|
|
24833
|
-
value:
|
|
25173
|
+
value: a,
|
|
24834
25174
|
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
24835
|
-
value:
|
|
24836
|
-
className: "
|
|
25175
|
+
value: a,
|
|
25176
|
+
className: "top-0 sticky z-10",
|
|
24837
25177
|
children: /* @__PURE__ */ jsx(EventDetailHeader, {
|
|
24838
|
-
icon:
|
|
24839
|
-
subject:
|
|
24840
|
-
from:
|
|
24841
|
-
prefixTimestamp:
|
|
24842
|
-
timestamp:
|
|
24843
|
-
isPriority:
|
|
24844
|
-
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,
|
|
24845
25185
|
isSingleEvent: !1,
|
|
24846
|
-
isOpen:
|
|
24847
|
-
className: "border-b border-neutral-400"
|
|
25186
|
+
isOpen: o,
|
|
25187
|
+
className: "border-b border-neutral-400",
|
|
25188
|
+
onFireClick: n
|
|
24848
25189
|
})
|
|
24849
25190
|
}), /* @__PURE__ */ jsx(AccordionContent, {
|
|
24850
|
-
value:
|
|
24851
|
-
className: cn(
|
|
24852
|
-
children: renderEventContent(
|
|
25191
|
+
value: a,
|
|
25192
|
+
className: cn(i < e.length - 1 && o && "border-b border-neutral-400"),
|
|
25193
|
+
children: renderEventContent(r)
|
|
24853
25194
|
})]
|
|
24854
|
-
},
|
|
25195
|
+
}, a);
|
|
24855
25196
|
}) })
|
|
24856
25197
|
});
|
|
24857
25198
|
}
|
|
24858
25199
|
const EventEmptyState = ({ icon: e, title: t, description: n }) => /* @__PURE__ */ jsxs("div", {
|
|
24859
|
-
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",
|
|
24860
25201
|
children: [cloneElement(e, {
|
|
24861
25202
|
size: e.props.size ?? 35,
|
|
24862
25203
|
className: "text-neutral-500"
|
|
24863
25204
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24864
|
-
className: "flex flex-col items-center justify-center
|
|
25205
|
+
className: "gap-1 flex flex-col items-center justify-center",
|
|
24865
25206
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
24866
|
-
className: "text-base leading-[1.3]
|
|
25207
|
+
className: "text-base font-medium leading-[1.3] text-neutral-900",
|
|
24867
25208
|
children: t
|
|
24868
25209
|
}), /* @__PURE__ */ jsx("p", {
|
|
24869
|
-
className: "w-full text-center
|
|
25210
|
+
className: "text-xs font-normal w-full text-center leading-[1.3] text-neutral-600",
|
|
24870
25211
|
children: n
|
|
24871
25212
|
})]
|
|
24872
25213
|
})]
|
|
24873
25214
|
});
|
|
25215
|
+
function EventSummaryCardSkeleton({ className: e, style: t }) {
|
|
25216
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
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),
|
|
25218
|
+
style: t,
|
|
25219
|
+
children: [
|
|
25220
|
+
/* @__PURE__ */ jsxs("div", {
|
|
25221
|
+
className: "gap-1.5 grid grid-cols-[auto_minmax(0,1fr)_auto_auto_auto_auto] items-center",
|
|
25222
|
+
children: [
|
|
25223
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4" }),
|
|
25224
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 max-w-40 w-full" }),
|
|
25225
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-4 rounded-full" }),
|
|
25226
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-12" }),
|
|
25227
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-full" }),
|
|
25228
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-5 rounded-full" })
|
|
25229
|
+
]
|
|
25230
|
+
}),
|
|
25231
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-7/12" }),
|
|
25232
|
+
/* @__PURE__ */ jsxs("div", {
|
|
25233
|
+
className: "gap-2 flex items-center",
|
|
25234
|
+
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 min-w-0 flex-1" }), /* @__PURE__ */ jsx(Skeleton, { className: "size-5 shrink-0" })]
|
|
25235
|
+
})
|
|
25236
|
+
]
|
|
25237
|
+
});
|
|
25238
|
+
}
|
|
24874
25239
|
function FilterBarSkeleton({ itemCount: e = 3, className: t }) {
|
|
24875
25240
|
return /* @__PURE__ */ jsx("div", {
|
|
24876
|
-
className: cn("flex flex-wrap items-center
|
|
25241
|
+
className: cn("gap-2 flex flex-wrap items-center", t),
|
|
24877
25242
|
children: Array.from({ length: e }).map((e, t) => /* @__PURE__ */ jsx(FilterChipSkeleton, {}, t))
|
|
24878
25243
|
});
|
|
24879
25244
|
}
|
|
24880
25245
|
function FilterChipSkeleton() {
|
|
24881
25246
|
return /* @__PURE__ */ jsxs("div", {
|
|
24882
|
-
className: "flex items-center
|
|
25247
|
+
className: "gap-1 px-2 py-1 flex items-center rounded-full border border-neutral-300 bg-white",
|
|
24883
25248
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "m-0.5 size-4 rounded-full" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-15" })]
|
|
24884
25249
|
});
|
|
24885
25250
|
}
|
|
24886
25251
|
function FilterBar({ children: e, className: t }) {
|
|
24887
25252
|
return /* @__PURE__ */ jsx("div", {
|
|
24888
|
-
className: cn("flex flex-wrap items-center
|
|
25253
|
+
className: cn("gap-2 flex flex-wrap items-center", t),
|
|
24889
25254
|
children: e.map((e, t) => cloneElement(e, { key: t }))
|
|
24890
25255
|
});
|
|
24891
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
|
+
}
|
|
24892
25274
|
var dividerStyles = tv({
|
|
24893
25275
|
base: "bg-neutral-400-variant-4",
|
|
24894
25276
|
variants: {
|
|
@@ -24944,7 +25326,7 @@ function Divider({ className: e, ...t }) {
|
|
|
24944
25326
|
return /* @__PURE__ */ jsx("div", { className: cn(dividerStyles(t), e) });
|
|
24945
25327
|
}
|
|
24946
25328
|
function IntegrationBarSkeleton({ orientation: e = "vertical", itemCount: t = 3, className: n }) {
|
|
24947
|
-
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");
|
|
24948
25330
|
return /* @__PURE__ */ jsx("div", {
|
|
24949
25331
|
className: i,
|
|
24950
25332
|
children: /* @__PURE__ */ jsxs("div", {
|
|
@@ -24965,10 +25347,10 @@ function IntegrationBarSkeleton({ orientation: e = "vertical", itemCount: t = 3,
|
|
|
24965
25347
|
}
|
|
24966
25348
|
function IntegrationBar({ orientation: e = "vertical", children: t, onAddMore: n, className: r }) {
|
|
24967
25349
|
return /* @__PURE__ */ jsxs("div", {
|
|
24968
|
-
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),
|
|
24969
25351
|
children: [
|
|
24970
25352
|
/* @__PURE__ */ jsx("div", {
|
|
24971
|
-
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"),
|
|
24972
25354
|
children: t.map((t) => cloneElement(t, { classNames: { root: e === "vertical" ? "py-2" : "px-2" } }))
|
|
24973
25355
|
}),
|
|
24974
25356
|
/* @__PURE__ */ jsx(Divider, { orientation: e === "vertical" ? "horizontal" : "vertical" }),
|
|
@@ -24987,9 +25369,9 @@ function IntegrationItemSkeleton() {
|
|
|
24987
25369
|
return /* @__PURE__ */ jsx("div", {
|
|
24988
25370
|
className: "flex w-full items-center justify-center",
|
|
24989
25371
|
children: /* @__PURE__ */ jsx("div", {
|
|
24990
|
-
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",
|
|
24991
25373
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24992
|
-
className: "flex items-center justify-between
|
|
25374
|
+
className: "gap-2 flex items-center justify-between",
|
|
24993
25375
|
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/3" }), /* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-1/8" })]
|
|
24994
25376
|
})
|
|
24995
25377
|
})
|
|
@@ -24998,14 +25380,14 @@ function IntegrationItemSkeleton() {
|
|
|
24998
25380
|
function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, connectLabel: a, onConnect: o, isLoading: s, children: c }) {
|
|
24999
25381
|
let l = Children.toArray(c).length;
|
|
25000
25382
|
return /* @__PURE__ */ jsxs("div", {
|
|
25001
|
-
className: "
|
|
25383
|
+
className: "gap-4 rounded-lg p-4 flex flex-col border border-neutral-400 bg-white",
|
|
25002
25384
|
children: [
|
|
25003
25385
|
/* @__PURE__ */ jsxs("div", {
|
|
25004
25386
|
className: "flex items-center justify-between",
|
|
25005
25387
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25006
|
-
className: "
|
|
25388
|
+
className: "min-w-0 gap-2 flex flex-1 items-center",
|
|
25007
25389
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25008
|
-
className: "
|
|
25390
|
+
className: "h-11 w-11 flex shrink-0 items-center justify-center",
|
|
25009
25391
|
children: /* @__PURE__ */ jsx("div", {
|
|
25010
25392
|
className: "flex items-center justify-center",
|
|
25011
25393
|
children: cloneElement(e, {
|
|
@@ -25014,9 +25396,9 @@ function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, conne
|
|
|
25014
25396
|
})
|
|
25015
25397
|
})
|
|
25016
25398
|
}), /* @__PURE__ */ jsxs("div", {
|
|
25017
|
-
className: "
|
|
25399
|
+
className: "min-w-0 flex flex-1 flex-col",
|
|
25018
25400
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25019
|
-
className: "
|
|
25401
|
+
className: "text-xs font-bold truncate text-neutral-800",
|
|
25020
25402
|
children: t
|
|
25021
25403
|
}), /* @__PURE__ */ jsx("div", {
|
|
25022
25404
|
className: "text-xs font-normal text-neutral-800",
|
|
@@ -25024,14 +25406,14 @@ function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, conne
|
|
|
25024
25406
|
})]
|
|
25025
25407
|
})]
|
|
25026
25408
|
}), l < r && !s && /* @__PURE__ */ jsx(Button, {
|
|
25027
|
-
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",
|
|
25028
25410
|
onClick: o,
|
|
25029
25411
|
children: a
|
|
25030
25412
|
})]
|
|
25031
25413
|
}),
|
|
25032
25414
|
s && /* @__PURE__ */ jsx(IntegrationItemSkeleton, {}),
|
|
25033
25415
|
l > 0 && c && /* @__PURE__ */ jsx("div", {
|
|
25034
|
-
className: "flex flex-col
|
|
25416
|
+
className: "gap-2 flex flex-col",
|
|
25035
25417
|
children: c
|
|
25036
25418
|
})
|
|
25037
25419
|
]
|
|
@@ -25039,19 +25421,19 @@ function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, conne
|
|
|
25039
25421
|
}
|
|
25040
25422
|
function IntegrationItem({ account: e, valid: t, disconnectLabel: n, onDisconnect: r, invalidLabel: i, invalidDescription: a }) {
|
|
25041
25423
|
return /* @__PURE__ */ jsxs("div", {
|
|
25042
|
-
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"),
|
|
25043
25425
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25044
|
-
className: "flex items-center justify-between
|
|
25426
|
+
className: "gap-2 flex items-center justify-between",
|
|
25045
25427
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25046
|
-
className: "
|
|
25428
|
+
className: "text-xs font-bold flex-1 truncate text-neutral-800",
|
|
25047
25429
|
children: e
|
|
25048
25430
|
}), /* @__PURE__ */ jsx(Button, {
|
|
25049
|
-
className: "
|
|
25431
|
+
className: "text-xs font-medium shrink-0 text-error-base underline transition-opacity hover:opacity-70",
|
|
25050
25432
|
onClick: r,
|
|
25051
25433
|
children: n
|
|
25052
25434
|
})]
|
|
25053
25435
|
}), t === !1 && /* @__PURE__ */ jsxs("div", {
|
|
25054
|
-
className: "
|
|
25436
|
+
className: "gap-2 flex",
|
|
25055
25437
|
children: [/* @__PURE__ */ jsx("div", {
|
|
25056
25438
|
className: "text-xs font-semibold text-error-base",
|
|
25057
25439
|
children: i
|
|
@@ -25062,6 +25444,178 @@ function IntegrationItem({ account: e, valid: t, disconnectLabel: n, onDisconnec
|
|
|
25062
25444
|
})]
|
|
25063
25445
|
});
|
|
25064
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
|
+
}
|
|
25065
25619
|
function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...", onChange: r, onKeyDown: i, onClear: a, disabled: o = !1, className: s }) {
|
|
25066
25620
|
let [c, l] = useState(t ?? ""), u = typeof e == "string", f = u ? e : c, p = f.length > 0;
|
|
25067
25621
|
function h(e) {
|
|
@@ -25072,7 +25626,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25072
25626
|
}
|
|
25073
25627
|
return /* @__PURE__ */ jsxs("fieldset", {
|
|
25074
25628
|
role: "search",
|
|
25075
|
-
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),
|
|
25076
25630
|
disabled: o,
|
|
25077
25631
|
children: [
|
|
25078
25632
|
/* @__PURE__ */ jsx(SearchIcon, {
|
|
@@ -25085,7 +25639,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25085
25639
|
placeholder: n,
|
|
25086
25640
|
onChange: h,
|
|
25087
25641
|
onKeyDown: i,
|
|
25088
|
-
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")
|
|
25089
25643
|
}),
|
|
25090
25644
|
p && !o && /* @__PURE__ */ jsx(IconButton, {
|
|
25091
25645
|
type: "button",
|
|
@@ -25164,9 +25718,9 @@ function ConfirmationToast({ title: e, description: t, cancelLabel: n, acceptLab
|
|
|
25164
25718
|
}
|
|
25165
25719
|
function ConfirmationTemplate({ title: e, description: t, cancelLabel: n, acceptLabel: r, onCancel: i, onAccept: a }) {
|
|
25166
25720
|
return /* @__PURE__ */ jsxs("div", {
|
|
25167
|
-
className: "
|
|
25721
|
+
className: "max-w-md gap-6 rounded-lg p-6 shadow-xl flex w-full flex-col justify-center bg-white",
|
|
25168
25722
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25169
|
-
className: "flex flex-col justify-center
|
|
25723
|
+
className: "gap-3 flex flex-col justify-center",
|
|
25170
25724
|
children: [/* @__PURE__ */ jsx("h3", {
|
|
25171
25725
|
className: "text-base font-medium text-neutral-900",
|
|
25172
25726
|
children: e
|
|
@@ -25175,13 +25729,13 @@ function ConfirmationTemplate({ title: e, description: t, cancelLabel: n, accept
|
|
|
25175
25729
|
children: t
|
|
25176
25730
|
})]
|
|
25177
25731
|
}), /* @__PURE__ */ jsxs("div", {
|
|
25178
|
-
className: "flex items-center justify-end
|
|
25732
|
+
className: "gap-3 flex items-center justify-end",
|
|
25179
25733
|
children: [/* @__PURE__ */ jsx(Button, {
|
|
25180
|
-
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",
|
|
25181
25735
|
onClick: () => i(close),
|
|
25182
25736
|
children: n
|
|
25183
25737
|
}), /* @__PURE__ */ jsx(Button, {
|
|
25184
|
-
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",
|
|
25185
25739
|
onClick: () => a(close),
|
|
25186
25740
|
children: r
|
|
25187
25741
|
})]
|
|
@@ -25199,12 +25753,12 @@ function UndoToast({ title: e, subtitle: t, description: n, onUndo: r, onClose:
|
|
|
25199
25753
|
}
|
|
25200
25754
|
function UndoToastTemplate({ title: e, subtitle: t, description: n, onUndo: r, onClose: i }) {
|
|
25201
25755
|
return /* @__PURE__ */ jsxs("div", {
|
|
25202
|
-
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",
|
|
25203
25757
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
25204
|
-
className: "flex flex-col justify-center
|
|
25758
|
+
className: "gap-1 flex flex-col justify-center",
|
|
25205
25759
|
children: [
|
|
25206
25760
|
/* @__PURE__ */ jsxs("div", {
|
|
25207
|
-
className: "flex items-center
|
|
25761
|
+
className: "gap-2 flex items-center",
|
|
25208
25762
|
children: [/* @__PURE__ */ jsx("span", {
|
|
25209
25763
|
className: "text-xs font-medium text-white",
|
|
25210
25764
|
children: e
|
|
@@ -25215,11 +25769,11 @@ function UndoToastTemplate({ title: e, subtitle: t, description: n, onUndo: r, o
|
|
|
25215
25769
|
})]
|
|
25216
25770
|
}),
|
|
25217
25771
|
t && /* @__PURE__ */ jsx("div", {
|
|
25218
|
-
className: "
|
|
25772
|
+
className: "text-xs font-semibold line-clamp-2 text-white-alpha-90",
|
|
25219
25773
|
children: t
|
|
25220
25774
|
}),
|
|
25221
25775
|
n && /* @__PURE__ */ jsx("div", {
|
|
25222
|
-
className: "line-clamp-2 text-
|
|
25776
|
+
className: "text-xs line-clamp-2 text-white-alpha-80",
|
|
25223
25777
|
children: n
|
|
25224
25778
|
})
|
|
25225
25779
|
]
|
|
@@ -25280,6 +25834,6 @@ function QtaloImage({ size: e = 40, className: t, ...n }) {
|
|
|
25280
25834
|
}) })]
|
|
25281
25835
|
});
|
|
25282
25836
|
}
|
|
25283
|
-
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, EmptyBoxIcon, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, EventEmptyState, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireIcon, GmailIcon, GoogleCalendarIcon, 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 };
|
|
25284
25838
|
|
|
25285
25839
|
//# sourceMappingURL=index.js.map
|