@qtalo/qt-ui-library 0.1.8 → 0.1.10
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 +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +26 -6
- package/dist/index.js +455 -308
- package/dist/index.js.map +1 -1
- package/package.json +5 -5
- package/src/styles/styles.css +2 -0
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import clsx from "clsx";
|
|
2
2
|
import { twMerge } from "tailwind-merge";
|
|
3
|
-
import { Children, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
4
|
-
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { Children, Fragment, cloneElement, createContext, isValidElement, useCallback, useContext, useEffect, useLayoutEffect, useMemo, useRef, useState, useSyncExternalStore } from "react";
|
|
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";
|
|
7
7
|
import './index.css';const colors = {
|
|
@@ -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:
|
|
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: Xa } = e, h = c.prototype, g = lookupGetter(h, "cloneNode"), Za = lookupGetter(h, "remove"), Qa = lookupGetter(h, "nextSibling"), O = lookupGetter(h, "childNodes"), $a = lookupGetter(h, "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 A,
|
|
335
|
-
t.isSupported = typeof entries == "function" && typeof
|
|
336
|
-
let { MUSTACHE_EXPR:
|
|
334
|
+
let A, eo = "", { implementation: to, createNodeIterator: no, createDocumentFragment: ro, getElementsByTagName: io } = n, { importNode: ao } = r, R = _createHooksMap();
|
|
335
|
+
t.isSupported = typeof entries == "function" && typeof $a == "function" && to && to.createHTMLDocument !== void 0;
|
|
336
|
+
let { MUSTACHE_EXPR: oo, ERB_EXPR: so, TMPLIT_EXPR: co, DATA_ATTR: lo, ARIA_ATTR: uo, IS_SCRIPT_OR_DATA: fo, ATTR_WHITESPACE: po, CUSTOM_ELEMENT: mo } = EXPRESSIONS, { IS_ALLOWED_URI: ho } = EXPRESSIONS, B = null, go = addToSet({}, [
|
|
337
337
|
...html$1,
|
|
338
338
|
...svg$1,
|
|
339
339
|
...svgFilters,
|
|
340
340
|
...mathMl$1,
|
|
341
341
|
...text
|
|
342
|
-
]), V = null,
|
|
342
|
+
]), V = null, _o = 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
|
+
})), vo = null, yo = null, bo = 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
|
+
})), xo = !0, So = !0, Co = !1, wo = !0, To = !1, Eo = !0, Do = !1, Oo = !1, ko = !1, Ao = !1, jo = !1, Mo = !1, No = !0, Po = !1, Fo = !0, Io = !1, Lo = {}, Ro = null, zo = 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
|
+
]), Bo = null, Vo = addToSet({}, [
|
|
406
406
|
"audio",
|
|
407
407
|
"video",
|
|
408
408
|
"img",
|
|
409
409
|
"source",
|
|
410
410
|
"image",
|
|
411
411
|
"track"
|
|
412
|
-
]),
|
|
412
|
+
]), Ho = null, Uo = 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
|
+
]), Wo = "http://www.w3.org/1998/Math/MathML", Go = "http://www.w3.org/2000/svg", Ko = "http://www.w3.org/1999/xhtml", qo = Ko, Jo = !1, Yo = null, Xo = addToSet({}, [
|
|
428
|
+
Wo,
|
|
429
|
+
Go,
|
|
430
|
+
Ko
|
|
431
|
+
], stringToString), Zo = addToSet({}, [
|
|
432
432
|
"mi",
|
|
433
433
|
"mo",
|
|
434
434
|
"mn",
|
|
435
435
|
"ms",
|
|
436
436
|
"mtext"
|
|
437
|
-
]),
|
|
437
|
+
]), Qo = addToSet({}, ["annotation-xml"]), $o = addToSet({}, [
|
|
438
438
|
"title",
|
|
439
439
|
"style",
|
|
440
440
|
"font",
|
|
441
441
|
"a",
|
|
442
442
|
"script"
|
|
443
|
-
]),
|
|
443
|
+
]), es = null, ts = ["application/xhtml+xml", "text/html"], Y = null, ns = null, rs = n.createElement("form"), is = function(e) {
|
|
444
444
|
return e instanceof RegExp || e instanceof Function;
|
|
445
|
-
},
|
|
445
|
+
}, as = 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 (!(ns && ns === e)) {
|
|
448
|
+
if ((!e || typeof e != "object") && (e = {}), e = clone(e), es = ts.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = es === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : go, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : _o, Yo = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : Xo, Ho = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(Uo), e.ADD_URI_SAFE_ATTR, Y) : Uo, Bo = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Vo), e.ADD_DATA_URI_TAGS, Y) : Vo, Ro = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : zo, vo = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), yo = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Lo = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, xo = e.ALLOW_ARIA_ATTR !== !1, So = e.ALLOW_DATA_ATTR !== !1, Co = e.ALLOW_UNKNOWN_PROTOCOLS || !1, wo = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, To = e.SAFE_FOR_TEMPLATES || !1, Eo = e.SAFE_FOR_XML !== !1, Do = e.WHOLE_DOCUMENT || !1, Ao = e.RETURN_DOM || !1, jo = e.RETURN_DOM_FRAGMENT || !1, Mo = e.RETURN_TRUSTED_TYPE || !1, ko = e.FORCE_BODY || !1, No = e.SANITIZE_DOM !== !1, Po = e.SANITIZE_NAMED_PROPS || !1, Fo = e.KEEP_CONTENT !== !1, Io = e.IN_PLACE || !1, ho = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, qo = e.NAMESPACE || Ko, Zo = e.MATHML_TEXT_INTEGRATION_POINTS || Zo, Qo = e.HTML_INTEGRATION_POINTS || Qo, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && is(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && is(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), To && (So = !1), jo && (Ao = !0), Lo && (B = addToSet({}, text), V = [], Lo.html === !0 && (addToSet(B, html$1), addToSet(V, html)), Lo.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), Lo.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), Lo.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? bo.tagCheck = e.ADD_TAGS : (B === go && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? bo.attributeCheck = e.ADD_ATTR : (V === _o && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Ho, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Ro === zo && (Ro = clone(Ro)), addToSet(Ro, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Ro === zo && (Ro = clone(Ro)), addToSet(Ro, e.ADD_FORBID_CONTENTS, Y)), Fo && (B["#text"] = !0), Do && addToSet(B, [
|
|
449
449
|
"html",
|
|
450
450
|
"head",
|
|
451
451
|
"body"
|
|
452
|
-
]), B.table && (addToSet(B, ["tbody"]), delete
|
|
452
|
+
]), B.table && (addToSet(B, ["tbody"]), delete vo.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
|
-
A = e.TRUSTED_TYPES_POLICY,
|
|
456
|
-
} else A === void 0 && (A = _createTrustedTypesPolicy(
|
|
457
|
-
freeze && freeze(e),
|
|
455
|
+
A = e.TRUSTED_TYPES_POLICY, eo = A.createHTML("");
|
|
456
|
+
} else A === void 0 && (A = _createTrustedTypesPolicy(Xa, i)), A !== null && typeof eo == "string" && (eo = A.createHTML(""));
|
|
457
|
+
freeze && freeze(e), ns = e;
|
|
458
458
|
}
|
|
459
|
-
},
|
|
459
|
+
}, os = addToSet({}, [
|
|
460
460
|
...svg$1,
|
|
461
461
|
...svgFilters,
|
|
462
462
|
...svgDisallowed
|
|
463
|
-
]),
|
|
464
|
-
let t =
|
|
463
|
+
]), ss = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), cs = function(e) {
|
|
464
|
+
let t = $a(e);
|
|
465
465
|
(!t || !t.tagName) && (t = {
|
|
466
|
-
namespaceURI:
|
|
466
|
+
namespaceURI: qo,
|
|
467
467
|
tagName: "template"
|
|
468
468
|
});
|
|
469
469
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
470
|
-
return
|
|
471
|
-
},
|
|
470
|
+
return Yo[e.namespaceURI] ? e.namespaceURI === Go ? t.namespaceURI === Ko ? n === "svg" : t.namespaceURI === Wo ? n === "svg" && (r === "annotation-xml" || Zo[r]) : !!os[n] : e.namespaceURI === Wo ? t.namespaceURI === Ko ? n === "math" : t.namespaceURI === Go ? n === "math" && Qo[r] : !!ss[n] : e.namespaceURI === Ko ? t.namespaceURI === Go && !Qo[r] || t.namespaceURI === Wo && !Zo[r] ? !1 : !ss[n] && ($o[n] || !os[n]) : !!(es === "application/xhtml+xml" && Yo[e.namespaceURI]) : !1;
|
|
471
|
+
}, ls = function(e) {
|
|
472
472
|
arrayPush(t.removed, { element: e });
|
|
473
473
|
try {
|
|
474
|
-
|
|
474
|
+
$a(e).removeChild(e);
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
Za(e);
|
|
477
477
|
}
|
|
478
|
-
},
|
|
478
|
+
}, us = function(e, n) {
|
|
479
479
|
try {
|
|
480
480
|
arrayPush(t.removed, {
|
|
481
481
|
attribute: n.getAttributeNode(e),
|
|
@@ -487,87 +487,87 @@ 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 (Ao || jo) try {
|
|
491
|
+
ls(n);
|
|
492
492
|
} catch {}
|
|
493
493
|
else try {
|
|
494
494
|
n.setAttribute(e, "");
|
|
495
495
|
} catch {}
|
|
496
|
-
},
|
|
496
|
+
}, ds = function(e) {
|
|
497
497
|
let t = null, r = null;
|
|
498
|
-
if (
|
|
498
|
+
if (ko) 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
|
-
|
|
503
|
+
es === "application/xhtml+xml" && qo === Ko && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
504
504
|
let i = A ? A.createHTML(e) : e;
|
|
505
|
-
if (
|
|
506
|
-
t = new
|
|
505
|
+
if (qo === Ko) try {
|
|
506
|
+
t = new p().parseFromString(i, es);
|
|
507
507
|
} catch {}
|
|
508
508
|
if (!t || !t.documentElement) {
|
|
509
|
-
t =
|
|
509
|
+
t = to.createDocument(qo, "template", null);
|
|
510
510
|
try {
|
|
511
|
-
t.documentElement.innerHTML =
|
|
511
|
+
t.documentElement.innerHTML = Jo ? eo : 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), qo === Ko ? io.call(t, Do ? "html" : "body")[0] : Do ? t.documentElement : a;
|
|
516
|
+
}, fs = function(e) {
|
|
517
|
+
return no.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
518
|
+
}, ps = 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
|
+
}, ms = function(e) {
|
|
521
521
|
return typeof s == "function" && e instanceof s;
|
|
522
522
|
};
|
|
523
|
-
function
|
|
523
|
+
function hs(e, n, r) {
|
|
524
524
|
arrayForEach(e, (e) => {
|
|
525
|
-
e.call(t, n, r,
|
|
525
|
+
e.call(t, n, r, ns);
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
let
|
|
528
|
+
let gs = function(e) {
|
|
529
529
|
let n = null;
|
|
530
|
-
if (
|
|
530
|
+
if (hs(R.beforeSanitizeElements, e, null), ps(e)) return ls(e), !0;
|
|
531
531
|
let r = Y(e.nodeName);
|
|
532
|
-
if (
|
|
532
|
+
if (hs(R.uponSanitizeElement, e, {
|
|
533
533
|
tagName: r,
|
|
534
534
|
allowedTags: B
|
|
535
|
-
}),
|
|
536
|
-
if (!(
|
|
537
|
-
if (!
|
|
538
|
-
if (
|
|
539
|
-
let t =
|
|
535
|
+
}), Eo && e.hasChildNodes() && !ms(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Eo && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return ls(e), !0;
|
|
536
|
+
if (!(bo.tagCheck instanceof Function && bo.tagCheck(r)) && (!B[r] || vo[r])) {
|
|
537
|
+
if (!vo[r] && vs(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
|
|
538
|
+
if (Fo && !Ro[r]) {
|
|
539
|
+
let t = $a(e) || e.parentNode, n = O(e) || e.childNodes;
|
|
540
540
|
if (n && t) {
|
|
541
541
|
let r = n.length;
|
|
542
542
|
for (let i = r - 1; i >= 0; --i) {
|
|
543
|
-
let r =
|
|
544
|
-
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r,
|
|
543
|
+
let r = g(n[i], !0);
|
|
544
|
+
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, Qa(e));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
return
|
|
548
|
+
return ls(e), !0;
|
|
549
549
|
}
|
|
550
|
-
return e instanceof c && !
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
return e instanceof c && !cs(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (ls(e), !0) : (To && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
|
|
551
|
+
oo,
|
|
552
|
+
so,
|
|
553
|
+
co
|
|
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 (!V[t] ||
|
|
561
|
-
if (!(
|
|
562
|
-
} else if (!
|
|
556
|
+
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), hs(R.afterSanitizeElements, e, null), !1);
|
|
557
|
+
}, _s = function(e, t, r) {
|
|
558
|
+
if (No && (t === "id" || t === "name") && (r in n || r in rs)) return !1;
|
|
559
|
+
if (!(So && !yo[t] && regExpTest(lo, t)) && !(xo && regExpTest(uo, t)) && !(bo.attributeCheck instanceof Function && bo.attributeCheck(t, e))) {
|
|
560
|
+
if (!V[t] || yo[t]) {
|
|
561
|
+
if (!(vs(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 (!Ho[t] && !regExpTest(ho, stringReplace(r, po, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Bo[e]) && !(Co && !regExpTest(fo, stringReplace(r, po, ""))) && r) return !1;
|
|
563
563
|
}
|
|
564
564
|
return !0;
|
|
565
|
-
},
|
|
566
|
-
return e !== "annotation-xml" && stringMatch(e,
|
|
567
|
-
},
|
|
568
|
-
|
|
565
|
+
}, vs = function(e) {
|
|
566
|
+
return e !== "annotation-xml" && stringMatch(e, mo);
|
|
567
|
+
}, ys = function(e) {
|
|
568
|
+
hs(R.beforeSanitizeAttributes, e, null);
|
|
569
569
|
let { attributes: n } = e;
|
|
570
|
-
if (!n ||
|
|
570
|
+
if (!n || ps(e)) return;
|
|
571
571
|
let r = {
|
|
572
572
|
attrName: "",
|
|
573
573
|
attrValue: "",
|
|
@@ -577,36 +577,36 @@ function createDOMPurify() {
|
|
|
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, hs(R.uponSanitizeAttribute, e, r), u = r.attrValue, Po && (c === "id" || c === "name") && (us(a, e), u = "user-content-" + u), Eo && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
581
|
+
us(a, e);
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
584
584
|
if (c === "attributename" && stringMatch(u, "href")) {
|
|
585
|
-
|
|
585
|
+
us(a, e);
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
588
|
if (r.forceKeepAttr) continue;
|
|
589
589
|
if (!r.keepAttr) {
|
|
590
|
-
|
|
590
|
+
us(a, e);
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
|
-
if (!
|
|
594
|
-
|
|
593
|
+
if (!wo && regExpTest(/\/>/i, u)) {
|
|
594
|
+
us(a, e);
|
|
595
595
|
continue;
|
|
596
596
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
To && arrayForEach([
|
|
598
|
+
oo,
|
|
599
|
+
so,
|
|
600
|
+
co
|
|
601
601
|
], (e) => {
|
|
602
602
|
u = stringReplace(u, e, " ");
|
|
603
603
|
});
|
|
604
604
|
let f = Y(e.nodeName);
|
|
605
|
-
if (!
|
|
606
|
-
|
|
605
|
+
if (!_s(f, c, u)) {
|
|
606
|
+
us(a, e);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
|
-
if (A && typeof
|
|
609
|
+
if (A && typeof Xa == "object" && typeof Xa.getAttributeType == "function" && !o) switch (Xa.getAttributeType(f, c)) {
|
|
610
610
|
case "TrustedHTML":
|
|
611
611
|
u = A.createHTML(u);
|
|
612
612
|
break;
|
|
@@ -615,56 +615,56 @@ function createDOMPurify() {
|
|
|
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), ps(e) ? ls(e) : arrayPop(t.removed);
|
|
619
619
|
} catch {
|
|
620
|
-
|
|
620
|
+
us(a, e);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
|
|
624
|
-
},
|
|
625
|
-
let n = null, r =
|
|
626
|
-
for (
|
|
627
|
-
|
|
623
|
+
hs(R.afterSanitizeAttributes, e, null);
|
|
624
|
+
}, bs = function e(t) {
|
|
625
|
+
let n = null, r = fs(t);
|
|
626
|
+
for (hs(R.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) hs(R.uponSanitizeShadowNode, n, null), gs(n), ys(n), n.content instanceof a && e(n.content);
|
|
627
|
+
hs(R.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 (Jo = !e, Jo && (e = "<!-->"), typeof e != "string" && !ms(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 (Oo || as(n), t.removed = [], typeof e == "string" && (Io = !1), Io) {
|
|
636
636
|
if (e.nodeName) {
|
|
637
637
|
let t = Y(e.nodeName);
|
|
638
|
-
if (!B[t] ||
|
|
638
|
+
if (!B[t] || vo[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 = ds("<!---->"), 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 (!Ao && !To && !Do && e.indexOf("<") === -1) return A && Mo ? A.createHTML(e) : e;
|
|
643
|
+
if (i = ds(e), !i) return Ao ? null : Mo ? eo : "";
|
|
644
644
|
}
|
|
645
|
-
i &&
|
|
646
|
-
let u =
|
|
647
|
-
for (; c = u.nextNode();)
|
|
648
|
-
if (
|
|
649
|
-
if (
|
|
650
|
-
if (
|
|
645
|
+
i && ko && ls(i.firstChild);
|
|
646
|
+
let u = fs(Io ? e : i);
|
|
647
|
+
for (; c = u.nextNode();) gs(c), ys(c), c.content instanceof a && bs(c.content);
|
|
648
|
+
if (Io) return e;
|
|
649
|
+
if (Ao) {
|
|
650
|
+
if (jo) for (l = ro.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
651
651
|
else l = i;
|
|
652
|
-
return (V.shadowroot || V.shadowrootmode) && (l =
|
|
652
|
+
return (V.shadowroot || V.shadowrootmode) && (l = ao.call(r, l, !0)), l;
|
|
653
653
|
}
|
|
654
|
-
let f =
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
654
|
+
let f = Do ? i.outerHTML : i.innerHTML;
|
|
655
|
+
return Do && B["!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), To && arrayForEach([
|
|
656
|
+
oo,
|
|
657
|
+
so,
|
|
658
|
+
co
|
|
659
659
|
], (e) => {
|
|
660
660
|
f = stringReplace(f, e, " ");
|
|
661
|
-
}), A &&
|
|
661
|
+
}), A && Mo ? A.createHTML(f) : f;
|
|
662
662
|
}, t.setConfig = function() {
|
|
663
|
-
|
|
663
|
+
as(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Oo = !0;
|
|
664
664
|
}, t.clearConfig = function() {
|
|
665
|
-
|
|
665
|
+
ns = null, Oo = !1;
|
|
666
666
|
}, t.isValidAttribute = function(e, t, n) {
|
|
667
|
-
return
|
|
667
|
+
return ns || as({}), _s(Y(e), Y(t), n);
|
|
668
668
|
}, t.addHook = function(e, t) {
|
|
669
669
|
typeof t == "function" && arrayPush(R[e], t);
|
|
670
670
|
}, t.removeHook = function(e, t) {
|
|
@@ -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
|
|
20161
|
-
if (l =
|
|
20162
|
-
if (
|
|
20160
|
+
let p = e.split("\n", 1)[0], Xa;
|
|
20161
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), Xa = l) : Xa = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
|
|
20162
|
+
if (Xa.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + Xa.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 +=
|
|
20167
|
+
!u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c = Xa.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({
|
|
@@ -21327,8 +21327,8 @@ function Button({ className: e, children: t, ...n }) {
|
|
|
21327
21327
|
children: t
|
|
21328
21328
|
});
|
|
21329
21329
|
}
|
|
21330
|
-
function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, indeterminateIcon: i, onChange: a, disabled: o, children: s, className:
|
|
21331
|
-
let u = useRef(null), [
|
|
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, h] = useState(t ?? !1), g = e ?? f;
|
|
21332
21332
|
useEffect(() => {
|
|
21333
21333
|
u.current && (u.current.indeterminate = !!r);
|
|
21334
21334
|
}, [r]);
|
|
@@ -21337,7 +21337,7 @@ function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, in
|
|
|
21337
21337
|
e === void 0 && h(n), a?.(n);
|
|
21338
21338
|
}
|
|
21339
21339
|
return /* @__PURE__ */ jsxs("label", {
|
|
21340
|
-
className: cn("relative inline-flex w-fit cursor-pointer items-center gap-2 select-none", o && "pointer-events-none opacity-50",
|
|
21340
|
+
className: cn("relative inline-flex w-fit cursor-pointer items-center gap-2 select-none", o && "pointer-events-none opacity-50", c),
|
|
21341
21341
|
children: [
|
|
21342
21342
|
/* @__PURE__ */ jsx("input", {
|
|
21343
21343
|
ref: u,
|
|
@@ -21372,7 +21372,7 @@ function useDropdown() {
|
|
|
21372
21372
|
return e;
|
|
21373
21373
|
}
|
|
21374
21374
|
function Dropdown({ trigger: e, children: t, align: n = "start", disabled: r = !1 }) {
|
|
21375
|
-
let [i, a] = useState(!1), o = useRef(null), s = useRef(null),
|
|
21375
|
+
let [i, a] = useState(!1), o = useRef(null), s = useRef(null), c = useRef(null), [f, h] = useState(null);
|
|
21376
21376
|
useLayoutEffect(() => {
|
|
21377
21377
|
if (!i || !o.current || !s.current) return;
|
|
21378
21378
|
let e = o.current.getBoundingClientRect(), t = s.current.getBoundingClientRect(), r = e.left;
|
|
@@ -21381,11 +21381,11 @@ function Dropdown({ trigger: e, children: t, align: n = "start", disabled: r = !
|
|
|
21381
21381
|
left: r
|
|
21382
21382
|
});
|
|
21383
21383
|
}, [i, n]);
|
|
21384
|
-
function
|
|
21385
|
-
|
|
21384
|
+
function g() {
|
|
21385
|
+
c.current &&= (clearTimeout(c.current), null), a(!0);
|
|
21386
21386
|
}
|
|
21387
|
-
function
|
|
21388
|
-
|
|
21387
|
+
function $a() {
|
|
21388
|
+
c.current = window.setTimeout(() => {
|
|
21389
21389
|
a(!1);
|
|
21390
21390
|
}, 120);
|
|
21391
21391
|
}
|
|
@@ -21396,27 +21396,27 @@ function Dropdown({ trigger: e, children: t, align: n = "start", disabled: r = !
|
|
|
21396
21396
|
}
|
|
21397
21397
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21398
21398
|
}, []), useEffect(() => () => {
|
|
21399
|
-
|
|
21399
|
+
c.current && clearTimeout(c.current);
|
|
21400
21400
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21401
21401
|
value: { close: () => a(!1) },
|
|
21402
21402
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21403
21403
|
ref: o,
|
|
21404
21404
|
className: "inline-flex",
|
|
21405
|
-
onMouseEnter:
|
|
21406
|
-
onMouseLeave:
|
|
21405
|
+
onMouseEnter: g,
|
|
21406
|
+
onMouseLeave: $a,
|
|
21407
21407
|
onClick: () => a((e) => !e),
|
|
21408
21408
|
"aria-haspopup": "menu",
|
|
21409
21409
|
"aria-expanded": i,
|
|
21410
21410
|
children: e
|
|
21411
21411
|
}), i && !r && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21412
21412
|
ref: s,
|
|
21413
|
-
onMouseEnter:
|
|
21414
|
-
onMouseLeave:
|
|
21413
|
+
onMouseEnter: g,
|
|
21414
|
+
onMouseLeave: $a,
|
|
21415
21415
|
style: {
|
|
21416
21416
|
position: "fixed",
|
|
21417
|
-
top:
|
|
21418
|
-
left:
|
|
21419
|
-
visibility:
|
|
21417
|
+
top: f?.top ?? 0,
|
|
21418
|
+
left: f?.left ?? 0,
|
|
21419
|
+
visibility: f ? "visible" : "hidden",
|
|
21420
21420
|
zIndex: 1e3
|
|
21421
21421
|
},
|
|
21422
21422
|
children: t
|
|
@@ -21429,7 +21429,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21429
21429
|
let t = e.target.value;
|
|
21430
21430
|
f || u(t), o?.(t);
|
|
21431
21431
|
}
|
|
21432
|
-
function
|
|
21432
|
+
function g(e) {
|
|
21433
21433
|
s?.(e);
|
|
21434
21434
|
}
|
|
21435
21435
|
return /* @__PURE__ */ jsx("input", {
|
|
@@ -21440,17 +21440,17 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21440
21440
|
"aria-disabled": r || void 0,
|
|
21441
21441
|
"aria-invalid": i || void 0,
|
|
21442
21442
|
onChange: h,
|
|
21443
|
-
onKeyDown:
|
|
21443
|
+
onKeyDown: g,
|
|
21444
21444
|
className: cn("bg-transparent outline-none", r && "pointer-events-none", c)
|
|
21445
21445
|
});
|
|
21446
21446
|
}
|
|
21447
21447
|
function Pressable({ as: e, disabled: t = !1, onPress: n, className: r, children: i, ...a }) {
|
|
21448
|
-
let
|
|
21448
|
+
let o = e || "div", c = useCallback(() => {
|
|
21449
21449
|
t || n?.();
|
|
21450
21450
|
}, [t, n]), l = useCallback((e) => {
|
|
21451
21451
|
t || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.());
|
|
21452
21452
|
}, [t, n]);
|
|
21453
|
-
return /* @__PURE__ */ jsx(
|
|
21453
|
+
return /* @__PURE__ */ jsx(o, {
|
|
21454
21454
|
role: "button",
|
|
21455
21455
|
tabIndex: t ? -1 : 0,
|
|
21456
21456
|
"aria-disabled": t || void 0,
|
|
@@ -21478,38 +21478,38 @@ function getVerticalAlign(e, t, n) {
|
|
|
21478
21478
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21479
21479
|
}
|
|
21480
21480
|
function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
|
|
21481
|
-
let a = useRef(null), o = useRef(null), s = useRef(null), [
|
|
21481
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h, $a] = useState(null), A = () => {
|
|
21482
21482
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21483
|
-
|
|
21483
|
+
f(!0);
|
|
21484
21484
|
}, r);
|
|
21485
|
-
},
|
|
21486
|
-
s.current &&= (clearTimeout(s.current), null),
|
|
21485
|
+
}, eo = () => {
|
|
21486
|
+
s.current &&= (clearTimeout(s.current), null), f(!1);
|
|
21487
21487
|
};
|
|
21488
21488
|
return useLayoutEffect(() => {
|
|
21489
|
-
if (!
|
|
21490
|
-
let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center",
|
|
21491
|
-
r === "top" || r === "bottom" ? (
|
|
21492
|
-
top:
|
|
21493
|
-
left:
|
|
21489
|
+
if (!c || !a.current || !o.current) return;
|
|
21490
|
+
let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
|
|
21491
|
+
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)), $a((e) => e && e.top === l && e.left === u ? e : {
|
|
21492
|
+
top: l,
|
|
21493
|
+
left: u
|
|
21494
21494
|
});
|
|
21495
|
-
}, [
|
|
21495
|
+
}, [c, n]), useEffect(() => () => {
|
|
21496
21496
|
s.current && clearTimeout(s.current);
|
|
21497
|
-
}, []), /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
21497
|
+
}, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
21498
21498
|
ref: a,
|
|
21499
21499
|
className: "inline-flex",
|
|
21500
21500
|
onMouseEnter: A,
|
|
21501
|
-
onMouseLeave:
|
|
21501
|
+
onMouseLeave: eo,
|
|
21502
21502
|
onFocus: A,
|
|
21503
|
-
onBlur:
|
|
21503
|
+
onBlur: eo,
|
|
21504
21504
|
children: e
|
|
21505
|
-
}),
|
|
21505
|
+
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21506
21506
|
ref: o,
|
|
21507
21507
|
role: "tooltip",
|
|
21508
21508
|
style: {
|
|
21509
21509
|
position: "fixed",
|
|
21510
|
-
top:
|
|
21511
|
-
left:
|
|
21512
|
-
visibility:
|
|
21510
|
+
top: h?.top ?? 0,
|
|
21511
|
+
left: h?.left ?? 0,
|
|
21512
|
+
visibility: h ? "visible" : "hidden",
|
|
21513
21513
|
zIndex: 1e3
|
|
21514
21514
|
},
|
|
21515
21515
|
className: cn(i),
|
|
@@ -21556,11 +21556,11 @@ function AccordionItem({ value: e, children: t, className: n, ...r }) {
|
|
|
21556
21556
|
children: t
|
|
21557
21557
|
});
|
|
21558
21558
|
}
|
|
21559
|
-
function AccordionTrigger({ value: e, children: t, className: n, asChild:
|
|
21559
|
+
function AccordionTrigger({ value: e, children: t, className: n, asChild: r = !1, onClick: a, ...s }) {
|
|
21560
21560
|
let { toggleItem: c, openItems: l } = useAccordion(), u = l.has(e), f = (t) => {
|
|
21561
|
-
c(e), t &&
|
|
21561
|
+
c(e), t && a && a(t);
|
|
21562
21562
|
};
|
|
21563
|
-
return
|
|
21563
|
+
return r && isValidElement(t) ? cloneElement(t, {
|
|
21564
21564
|
onClick: f,
|
|
21565
21565
|
"aria-expanded": u,
|
|
21566
21566
|
"data-state": u ? "open" : "closed"
|
|
@@ -22644,7 +22644,7 @@ function CardFooter({ children: e, className: t }) {
|
|
|
22644
22644
|
});
|
|
22645
22645
|
}
|
|
22646
22646
|
function DropdownMenuContent({ children: e, className: t }) {
|
|
22647
|
-
let { close:
|
|
22647
|
+
let { close: r } = useDropdown();
|
|
22648
22648
|
return /* @__PURE__ */ jsx("div", {
|
|
22649
22649
|
role: "menu",
|
|
22650
22650
|
tabIndex: -1,
|
|
@@ -22652,7 +22652,7 @@ function DropdownMenuContent({ children: e, className: t }) {
|
|
|
22652
22652
|
children: Children.map(e, (e) => cloneElement(e, {
|
|
22653
22653
|
role: "menuitem",
|
|
22654
22654
|
onClick: (t) => {
|
|
22655
|
-
e.props.onClick?.(t), e.props.closeOnClick !== !1 &&
|
|
22655
|
+
e.props.onClick?.(t), e.props.closeOnClick !== !1 && r();
|
|
22656
22656
|
}
|
|
22657
22657
|
}))
|
|
22658
22658
|
});
|
|
@@ -22752,9 +22752,9 @@ function markAsExiting(e, t) {
|
|
|
22752
22752
|
} : e;
|
|
22753
22753
|
}
|
|
22754
22754
|
function ToastWrapper({ toast: e, remainingTime: t, onExitComplete: n, onClose: r, onHoverStart: i, onHoverEnd: a }) {
|
|
22755
|
-
let [
|
|
22755
|
+
let [o, c] = useState(!1);
|
|
22756
22756
|
useEffect(() => {
|
|
22757
|
-
let e = requestAnimationFrame(() =>
|
|
22757
|
+
let e = requestAnimationFrame(() => c(!0));
|
|
22758
22758
|
return () => cancelAnimationFrame(e);
|
|
22759
22759
|
}, []), useEffect(() => {
|
|
22760
22760
|
if (e.animationState !== "exiting") return;
|
|
@@ -22765,7 +22765,7 @@ function ToastWrapper({ toast: e, remainingTime: t, onExitComplete: n, onClose:
|
|
|
22765
22765
|
e.id,
|
|
22766
22766
|
n
|
|
22767
22767
|
]);
|
|
22768
|
-
let u = useCallback(() => r(e.id), [r, e.id]), f =
|
|
22768
|
+
let u = useCallback(() => r(e.id), [r, e.id]), f = o && e.animationState !== "exiting", p = isRenderFn(e.content) ? e.content(u, t) : e.content;
|
|
22769
22769
|
return /* @__PURE__ */ jsx("div", {
|
|
22770
22770
|
className: cn("pointer-events-auto", computeAnimationClasses(f, e.position)),
|
|
22771
22771
|
onMouseEnter: i,
|
|
@@ -22774,11 +22774,11 @@ function ToastWrapper({ toast: e, remainingTime: t, onExitComplete: n, onClose:
|
|
|
22774
22774
|
});
|
|
22775
22775
|
}
|
|
22776
22776
|
function useToastTimers(e, t) {
|
|
22777
|
-
let [n, r] = useState(() => /* @__PURE__ */ new Map()), i = useRef(/* @__PURE__ */ new Map()), a = useRef(null),
|
|
22777
|
+
let [n, r] = useState(() => /* @__PURE__ */ new Map()), i = useRef(/* @__PURE__ */ new Map()), a = useRef(null), o = useRef(!1), c = useCallback((e) => {
|
|
22778
22778
|
let t = i.current.get(e);
|
|
22779
22779
|
t?.timeoutId && clearTimeout(t.timeoutId);
|
|
22780
22780
|
}, []), u = useCallback((e, n) => {
|
|
22781
|
-
|
|
22781
|
+
c(e.id);
|
|
22782
22782
|
let a = n ?? e.duration, o = Date.now(), s = window.setTimeout(() => {
|
|
22783
22783
|
t.current.set(e.id, "timeout"), toastStore.remove(e.id);
|
|
22784
22784
|
}, a);
|
|
@@ -22789,7 +22789,7 @@ function useToastTimers(e, t) {
|
|
|
22789
22789
|
isPaused: !1,
|
|
22790
22790
|
refreshedAt: e._refreshedAt
|
|
22791
22791
|
}), r((t) => new Map(t).set(e.id, a));
|
|
22792
|
-
}, [
|
|
22792
|
+
}, [c, t]), f = useCallback(() => {
|
|
22793
22793
|
a.current ||= window.setInterval(() => {
|
|
22794
22794
|
let e = Date.now();
|
|
22795
22795
|
r((t) => {
|
|
@@ -22803,8 +22803,8 @@ function useToastTimers(e, t) {
|
|
|
22803
22803
|
});
|
|
22804
22804
|
}, COUNTDOWN_INTERVAL_MS);
|
|
22805
22805
|
}, []), h = useCallback(() => {
|
|
22806
|
-
if (
|
|
22807
|
-
|
|
22806
|
+
if (o.current) return;
|
|
22807
|
+
o.current = !0;
|
|
22808
22808
|
let e = Date.now();
|
|
22809
22809
|
i.current.forEach((t, n) => {
|
|
22810
22810
|
t.timeoutId && clearTimeout(t.timeoutId);
|
|
@@ -22816,18 +22816,18 @@ function useToastTimers(e, t) {
|
|
|
22816
22816
|
isPaused: !0
|
|
22817
22817
|
});
|
|
22818
22818
|
}), a.current &&= (clearInterval(a.current), null);
|
|
22819
|
-
}, []),
|
|
22820
|
-
|
|
22819
|
+
}, []), g = useCallback(() => {
|
|
22820
|
+
o.current && (o.current = !1, i.current.forEach((t, n) => {
|
|
22821
22821
|
if (t.isPaused && t.remainingTime > 0) {
|
|
22822
22822
|
let r = e.find((e) => e.id === n);
|
|
22823
22823
|
r && u(r, t.remainingTime);
|
|
22824
22824
|
}
|
|
22825
|
-
}),
|
|
22825
|
+
}), f());
|
|
22826
22826
|
}, [
|
|
22827
22827
|
e,
|
|
22828
22828
|
u,
|
|
22829
|
-
|
|
22830
|
-
]),
|
|
22829
|
+
f
|
|
22830
|
+
]), Za = useCallback((e) => {
|
|
22831
22831
|
i.current.delete(e), r((t) => {
|
|
22832
22832
|
let n = new Map(t);
|
|
22833
22833
|
return n.delete(e), n;
|
|
@@ -22838,32 +22838,32 @@ function useToastTimers(e, t) {
|
|
|
22838
22838
|
if (e.persistent) return;
|
|
22839
22839
|
let t = i.current.get(e.id);
|
|
22840
22840
|
t ? t.refreshedAt !== e._refreshedAt && u(e) : u(e);
|
|
22841
|
-
}), e.some((e) => !e.persistent) &&
|
|
22841
|
+
}), e.some((e) => !e.persistent) && f();
|
|
22842
22842
|
}, [
|
|
22843
22843
|
e,
|
|
22844
22844
|
u,
|
|
22845
|
-
|
|
22845
|
+
f
|
|
22846
22846
|
]), useEffect(() => () => {
|
|
22847
22847
|
a.current && clearInterval(a.current);
|
|
22848
22848
|
}, []), {
|
|
22849
22849
|
remainingTimes: n,
|
|
22850
22850
|
pauseAll: h,
|
|
22851
|
-
resumeAll:
|
|
22852
|
-
cleanupTimer:
|
|
22851
|
+
resumeAll: g,
|
|
22852
|
+
cleanupTimer: Za
|
|
22853
22853
|
};
|
|
22854
22854
|
}
|
|
22855
22855
|
function Toaster() {
|
|
22856
|
-
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()),
|
|
22856
|
+
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: Qa } = useToastTimers(e, a);
|
|
22857
22857
|
useEffect(() => toastStore.subscribe(t), []);
|
|
22858
|
-
let
|
|
22858
|
+
let $a = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), A = useCallback((e) => {
|
|
22859
22859
|
e.callbacks?.onOpen?.();
|
|
22860
|
-
}, []),
|
|
22860
|
+
}, []), eo = useCallback((e, t) => {
|
|
22861
22861
|
t === "manual" ? e.callbacks?.onClose?.() : e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
22862
22862
|
}, []);
|
|
22863
22863
|
useEffect(() => {
|
|
22864
|
-
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])),
|
|
22865
|
-
|
|
22866
|
-
|
|
22864
|
+
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
22865
|
+
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
22866
|
+
eo(e, a.current.get(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
22867
22867
|
}), r((r) => {
|
|
22868
22868
|
let i = r.map((e) => {
|
|
22869
22869
|
let t = n.get(e.id);
|
|
@@ -22872,36 +22872,36 @@ function Toaster() {
|
|
|
22872
22872
|
content: t.content,
|
|
22873
22873
|
duration: t.duration
|
|
22874
22874
|
} : e;
|
|
22875
|
-
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !
|
|
22875
|
+
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (A(e), {
|
|
22876
22876
|
...e,
|
|
22877
22877
|
animationState: "entering"
|
|
22878
22878
|
})), ...i];
|
|
22879
|
-
return
|
|
22879
|
+
return o.current = a, a;
|
|
22880
22880
|
}), i.current = t;
|
|
22881
22881
|
}, [
|
|
22882
22882
|
e,
|
|
22883
22883
|
A,
|
|
22884
|
-
|
|
22884
|
+
eo
|
|
22885
22885
|
]);
|
|
22886
|
-
let
|
|
22886
|
+
let to = useCallback((e) => {
|
|
22887
22887
|
r((t) => {
|
|
22888
22888
|
let n = t.filter((t) => t.id !== e);
|
|
22889
|
-
return
|
|
22890
|
-
}),
|
|
22891
|
-
}, [
|
|
22889
|
+
return o.current = n, n;
|
|
22890
|
+
}), Qa(e), toastStore.cleanup(e);
|
|
22891
|
+
}, [Qa]), no = useCallback((e) => {
|
|
22892
22892
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
22893
22893
|
}, []);
|
|
22894
|
-
if (
|
|
22895
|
-
let
|
|
22896
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment, { children: Object.entries(
|
|
22894
|
+
if (!$a) return null;
|
|
22895
|
+
let ro = groupByPosition(n);
|
|
22896
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(ro).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
22897
22897
|
className: cn("pointer-events-none fixed z-1000 flex flex-col items-end gap-2 p-4", POSITION_CLASSES[e]),
|
|
22898
22898
|
children: t.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
22899
22899
|
toast: e,
|
|
22900
|
-
remainingTime:
|
|
22901
|
-
onExitComplete:
|
|
22902
|
-
onClose:
|
|
22900
|
+
remainingTime: c.get(e.id) ?? e.duration,
|
|
22901
|
+
onExitComplete: to,
|
|
22902
|
+
onClose: no,
|
|
22903
22903
|
onHoverStart: u,
|
|
22904
|
-
onHoverEnd:
|
|
22904
|
+
onHoverEnd: f
|
|
22905
22905
|
}, e.id))
|
|
22906
22906
|
}, e)) }), document.body);
|
|
22907
22907
|
}
|
|
@@ -23107,13 +23107,13 @@ function InfoTooltip({ className: e, ...t }) {
|
|
|
23107
23107
|
});
|
|
23108
23108
|
}
|
|
23109
23109
|
function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n, actions: r, defaultDensity: i = "normal", onDensityChange: a, className: o }) {
|
|
23110
|
-
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"),
|
|
23110
|
+
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 = () => {
|
|
23111
23111
|
n(!c);
|
|
23112
23112
|
};
|
|
23113
23113
|
function O(e) {
|
|
23114
23114
|
p(e), a?.(e);
|
|
23115
23115
|
}
|
|
23116
|
-
let
|
|
23116
|
+
let $a = {
|
|
23117
23117
|
fire: [{
|
|
23118
23118
|
id: "fire",
|
|
23119
23119
|
tooltip: "Mark as fire",
|
|
@@ -23180,7 +23180,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23180
23180
|
/* @__PURE__ */ jsx(Checkbox, {
|
|
23181
23181
|
checked: c,
|
|
23182
23182
|
indeterminate: l,
|
|
23183
|
-
onChange:
|
|
23183
|
+
onChange: h,
|
|
23184
23184
|
icon: /* @__PURE__ */ jsx(CheckboxIcon, {
|
|
23185
23185
|
size: 16,
|
|
23186
23186
|
className: "text-white-variant-7"
|
|
@@ -23194,7 +23194,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23194
23194
|
}),
|
|
23195
23195
|
/* @__PURE__ */ jsx("div", {
|
|
23196
23196
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23197
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment, { children: Object.entries(
|
|
23197
|
+
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries($a).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
23198
23198
|
className: "flex items-center gap-2 px-1",
|
|
23199
23199
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23200
23200
|
content: e.tooltip,
|
|
@@ -23273,18 +23273,18 @@ function renderIcon(e, t) {
|
|
|
23273
23273
|
});
|
|
23274
23274
|
}
|
|
23275
23275
|
function FilterButton({ variant: e = "custom", label: t, count: n, selected: r = !1, icon: i, classNames: a, disabled: o, ...s }) {
|
|
23276
|
-
let c = !!o, l = filterButtonStyles({ selected: !c && r }), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon,
|
|
23276
|
+
let c = !!o, l = filterButtonStyles({ selected: !c && r }), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label, Xa = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
|
|
23277
23277
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23278
23278
|
...s,
|
|
23279
23279
|
disabled: o,
|
|
23280
|
-
"aria-label": s["aria-label"] ??
|
|
23280
|
+
"aria-label": s["aria-label"] ?? p,
|
|
23281
23281
|
className: cn("group", l.root(), c && "border-neutral-300 bg-white hover:border-neutral-300", a?.root),
|
|
23282
23282
|
children: [f && /* @__PURE__ */ jsx("span", {
|
|
23283
23283
|
className: cn("flex items-center", a?.icon),
|
|
23284
|
-
children: renderIcon(f, cn("shrink-0",
|
|
23285
|
-
}),
|
|
23284
|
+
children: renderIcon(f, cn("shrink-0", Xa))
|
|
23285
|
+
}), p && /* @__PURE__ */ jsxs("span", {
|
|
23286
23286
|
className: cn(l.label(), c && "font-medium text-neutral-400", a?.label),
|
|
23287
|
-
children: [/* @__PURE__ */ jsx("span", { children:
|
|
23287
|
+
children: [/* @__PURE__ */ jsx("span", { children: p }), typeof n == "number" && n > 0 && /* @__PURE__ */ jsxs("span", {
|
|
23288
23288
|
"aria-label": `${n} items`,
|
|
23289
23289
|
className: cn("font-medium", a?.count),
|
|
23290
23290
|
children: [
|
|
@@ -23380,9 +23380,9 @@ var iconCountButtonStyles = tv({
|
|
|
23380
23380
|
status: "active"
|
|
23381
23381
|
}
|
|
23382
23382
|
});
|
|
23383
|
-
function IconCountButton({ icon: e, label: t, count: n, variant:
|
|
23383
|
+
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: a = "vertical", status: o = "active", alwaysShowCount: s = !1, classNames: c, ...l }) {
|
|
23384
23384
|
let u = iconCountButtonStyles({
|
|
23385
|
-
variant:
|
|
23385
|
+
variant: r,
|
|
23386
23386
|
orientation: a,
|
|
23387
23387
|
status: o
|
|
23388
23388
|
});
|
|
@@ -23412,15 +23412,15 @@ function IconCountButton({ icon: e, label: t, count: n, variant: i = "primary",
|
|
|
23412
23412
|
})]
|
|
23413
23413
|
});
|
|
23414
23414
|
}
|
|
23415
|
-
function ActionMenuItem({ icon: e, label: t, className: n, selected:
|
|
23415
|
+
function ActionMenuItem({ icon: e, label: t, className: n, selected: r, ...a }) {
|
|
23416
23416
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23417
|
-
className: cn("flex items-center justify-start gap-2 bg-white px-3 py-2 hover:bg-neutral-100",
|
|
23417
|
+
className: cn("flex items-center justify-start gap-2 bg-white px-3 py-2 hover:bg-neutral-100", r && "bg-primary-500 text-white hover:bg-primary-bright", n),
|
|
23418
23418
|
...a,
|
|
23419
23419
|
children: [e && cloneElement(e, {
|
|
23420
23420
|
size: e.props.size ?? 16,
|
|
23421
|
-
className: cn(
|
|
23421
|
+
className: cn(r ? "text-white" : "text-neutral-600-variant-7", e.props.className)
|
|
23422
23422
|
}), /* @__PURE__ */ jsx("span", {
|
|
23423
|
-
className: cn("text-xs font-medium transition-colors",
|
|
23423
|
+
className: cn("text-xs font-medium transition-colors", r ? "text-white" : "text-neutral-900"),
|
|
23424
23424
|
children: t
|
|
23425
23425
|
})]
|
|
23426
23426
|
});
|
|
@@ -23434,7 +23434,7 @@ function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
|
23434
23434
|
});
|
|
23435
23435
|
}
|
|
23436
23436
|
function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
|
|
23437
|
-
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s,
|
|
23437
|
+
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), h = useRef(n), [g, O] = useState(() => {
|
|
23438
23438
|
let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
|
|
23439
23439
|
return {
|
|
23440
23440
|
year: r.getFullYear(),
|
|
@@ -23442,7 +23442,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23442
23442
|
};
|
|
23443
23443
|
});
|
|
23444
23444
|
useEffect(() => {
|
|
23445
|
-
(e === "single" && t && (!
|
|
23445
|
+
(e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !== h.current.startDate?.getTime() || n.endDate?.getTime() !== h.current.endDate?.getTime())) && queueMicrotask(() => {
|
|
23446
23446
|
if (e === "single" && t) O({
|
|
23447
23447
|
year: t.getFullYear(),
|
|
23448
23448
|
month: t.getMonth()
|
|
@@ -23454,13 +23454,13 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23454
23454
|
month: e.getMonth()
|
|
23455
23455
|
});
|
|
23456
23456
|
}
|
|
23457
|
-
}),
|
|
23457
|
+
}), u.current = t, h.current = n;
|
|
23458
23458
|
}, [
|
|
23459
23459
|
e,
|
|
23460
23460
|
t,
|
|
23461
23461
|
n
|
|
23462
23462
|
]);
|
|
23463
|
-
let
|
|
23463
|
+
let $a = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
|
|
23464
23464
|
function A(t) {
|
|
23465
23465
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23466
23466
|
if ((o !== g.month || s !== g.year) && O({
|
|
@@ -23478,7 +23478,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23478
23478
|
}), a());
|
|
23479
23479
|
}
|
|
23480
23480
|
}
|
|
23481
|
-
function
|
|
23481
|
+
function eo() {
|
|
23482
23482
|
O((e) => e.month === 0 ? {
|
|
23483
23483
|
year: e.year - 1,
|
|
23484
23484
|
month: 11
|
|
@@ -23487,7 +23487,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23487
23487
|
month: e.month - 1
|
|
23488
23488
|
});
|
|
23489
23489
|
}
|
|
23490
|
-
function
|
|
23490
|
+
function to() {
|
|
23491
23491
|
O((e) => e.month === 11 ? {
|
|
23492
23492
|
year: e.year + 1,
|
|
23493
23493
|
month: 0
|
|
@@ -23496,7 +23496,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23496
23496
|
month: e.month + 1
|
|
23497
23497
|
});
|
|
23498
23498
|
}
|
|
23499
|
-
let
|
|
23499
|
+
let no = getWeekdays();
|
|
23500
23500
|
return /* @__PURE__ */ jsxs("div", {
|
|
23501
23501
|
className: "mt-1 w-fit rounded-lg border border-neutral-400 bg-white p-2 shadow-lg",
|
|
23502
23502
|
children: [
|
|
@@ -23508,7 +23508,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23508
23508
|
direction: "left",
|
|
23509
23509
|
size: 20
|
|
23510
23510
|
}),
|
|
23511
|
-
onClick:
|
|
23511
|
+
onClick: eo,
|
|
23512
23512
|
className: "hover:opacity-60",
|
|
23513
23513
|
"aria-label": "Previous month"
|
|
23514
23514
|
}),
|
|
@@ -23525,7 +23525,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23525
23525
|
direction: "right",
|
|
23526
23526
|
size: 20
|
|
23527
23527
|
}),
|
|
23528
|
-
onClick:
|
|
23528
|
+
onClick: to,
|
|
23529
23529
|
className: "hover:opacity-60",
|
|
23530
23530
|
"aria-label": "Next month"
|
|
23531
23531
|
})
|
|
@@ -23533,31 +23533,31 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23533
23533
|
}),
|
|
23534
23534
|
/* @__PURE__ */ jsx("div", {
|
|
23535
23535
|
className: "mb-2 grid grid-cols-7",
|
|
23536
|
-
children:
|
|
23536
|
+
children: no.map((e) => /* @__PURE__ */ jsx("div", {
|
|
23537
23537
|
className: "flex items-center justify-center p-0.5 text-[9px] font-bold text-neutral-900",
|
|
23538
23538
|
children: e
|
|
23539
23539
|
}, e))
|
|
23540
23540
|
}),
|
|
23541
23541
|
/* @__PURE__ */ jsx("div", {
|
|
23542
23542
|
className: "grid grid-cols-7",
|
|
23543
|
-
children:
|
|
23544
|
-
let o = isToday(i),
|
|
23545
|
-
e === "range" && u && !f && s && !isDateBefore(s, u) ? (h = u,
|
|
23546
|
-
let
|
|
23543
|
+
children: $a.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
23544
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), Xa = f && isSameDay(i, f), h = u, g = s;
|
|
23545
|
+
e === "range" && u && !f && s && !isDateBefore(s, u) ? (h = u, g = s) : (h = null, g = null);
|
|
23546
|
+
let Qa = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, h, g)), O = l || p || Xa;
|
|
23547
23547
|
return /* @__PURE__ */ jsx(Button, {
|
|
23548
23548
|
type: "button",
|
|
23549
23549
|
onClick: () => A(i),
|
|
23550
23550
|
onMouseEnter: () => {
|
|
23551
|
-
e === "range" && u && !f && !isDateBefore(i, u) &&
|
|
23551
|
+
e === "range" && u && !f && !isDateBefore(i, u) && c(i);
|
|
23552
23552
|
},
|
|
23553
23553
|
onMouseLeave: () => {
|
|
23554
|
-
e === "range" &&
|
|
23554
|
+
e === "range" && c(null);
|
|
23555
23555
|
},
|
|
23556
23556
|
className: "p-0.5",
|
|
23557
23557
|
"aria-label": `Select ${formatDate(i)}`,
|
|
23558
23558
|
"aria-selected": O || void 0,
|
|
23559
23559
|
children: /* @__PURE__ */ jsx("div", {
|
|
23560
|
-
className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", O && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500",
|
|
23560
|
+
className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", O && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500", Qa && !O && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !O && !Qa && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !O && !Qa && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
23561
23561
|
children: r
|
|
23562
23562
|
})
|
|
23563
23563
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -23583,7 +23583,7 @@ function DatePickerTrigger({ displayText: e, disabled: t, className: n, onClear:
|
|
|
23583
23583
|
className: "font-semibold",
|
|
23584
23584
|
children: "Date"
|
|
23585
23585
|
}),
|
|
23586
|
-
e && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("span", {
|
|
23586
|
+
e && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
23587
23587
|
className: "font-normal",
|
|
23588
23588
|
children: [
|
|
23589
23589
|
"(",
|
|
@@ -23619,19 +23619,19 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23619
23619
|
startDate: null,
|
|
23620
23620
|
endDate: null
|
|
23621
23621
|
};
|
|
23622
|
-
function
|
|
23622
|
+
function h(t) {
|
|
23623
23623
|
e === "single" && (u || s(t), r?.(t));
|
|
23624
23624
|
}
|
|
23625
|
-
function
|
|
23625
|
+
function Qa(t) {
|
|
23626
23626
|
e === "range" && (u || l(t), r?.(t));
|
|
23627
23627
|
}
|
|
23628
23628
|
function O() {
|
|
23629
|
-
e === "single" ?
|
|
23629
|
+
e === "single" ? h(null) : Qa({
|
|
23630
23630
|
startDate: null,
|
|
23631
23631
|
endDate: null
|
|
23632
23632
|
});
|
|
23633
23633
|
}
|
|
23634
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Dropdown, {
|
|
23634
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Dropdown, {
|
|
23635
23635
|
trigger: /* @__PURE__ */ jsx(DatePickerTrigger, {
|
|
23636
23636
|
displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
|
|
23637
23637
|
disabled: i,
|
|
@@ -23643,8 +23643,8 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23643
23643
|
mode: e,
|
|
23644
23644
|
selectedDate: f,
|
|
23645
23645
|
selectedRange: p,
|
|
23646
|
-
onDateSelect:
|
|
23647
|
-
onRangeSelect:
|
|
23646
|
+
onDateSelect: h,
|
|
23647
|
+
onRangeSelect: Qa
|
|
23648
23648
|
})
|
|
23649
23649
|
}) });
|
|
23650
23650
|
}
|
|
@@ -23782,49 +23782,50 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
23782
23782
|
}) })
|
|
23783
23783
|
});
|
|
23784
23784
|
}
|
|
23785
|
-
function EventCard({ icon: e,
|
|
23785
|
+
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: Xa = {}, actions: h = {}, density: g = "normal", className: O, style: $a }) {
|
|
23786
23786
|
return /* @__PURE__ */ jsx(Card, {
|
|
23787
23787
|
as: Pressable,
|
|
23788
|
-
onPress:
|
|
23789
|
-
className: cn("w-full rounded-lg border-[1.5px] border-primary-400 bg-white-variant-5 p-4 hover:bg-primary-light",
|
|
23790
|
-
style:
|
|
23791
|
-
|
|
23788
|
+
onPress: u,
|
|
23789
|
+
className: cn("w-full rounded-lg border-[1.5px] border-primary-400 bg-white-variant-5 p-4 hover:bg-primary-light", c && "border-neutral-400", l && "border-primary-500 bg-primary-light", g === "normal" ? `${EVENT_CARD_HEIGHT_SIZE.normal.style}` : `${EVENT_CARD_HEIGHT_SIZE.compact.style}`, O),
|
|
23790
|
+
style: $a,
|
|
23791
|
+
"data-service": t,
|
|
23792
|
+
children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
23792
23793
|
className: "gap-x-2 gap-y-1",
|
|
23793
23794
|
children: [
|
|
23794
23795
|
/* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
23795
|
-
checked:
|
|
23796
|
-
onCheckedChange:
|
|
23796
|
+
checked: f,
|
|
23797
|
+
onCheckedChange: p
|
|
23797
23798
|
}) }),
|
|
23798
23799
|
/* @__PURE__ */ jsxs(CardHeader, {
|
|
23799
23800
|
className: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-2",
|
|
23800
23801
|
children: [
|
|
23801
23802
|
e,
|
|
23802
23803
|
/* @__PURE__ */ jsx("span", {
|
|
23803
|
-
className: cn("min-w-0 -translate-x-0.5 truncate text-sm font-bold text-neutral-900",
|
|
23804
|
-
children:
|
|
23804
|
+
className: cn("min-w-0 -translate-x-0.5 truncate text-sm font-bold text-neutral-900", c && "font-medium"),
|
|
23805
|
+
children: n
|
|
23805
23806
|
}),
|
|
23806
23807
|
/* @__PURE__ */ jsx("span", {
|
|
23807
23808
|
className: "text-xs leading-tight font-semibold tracking-wide whitespace-nowrap text-neutral-800",
|
|
23808
|
-
children:
|
|
23809
|
+
children: a
|
|
23809
23810
|
}),
|
|
23810
23811
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
23811
|
-
content:
|
|
23812
|
-
children: /* @__PURE__ */ jsx(Avatar, { name:
|
|
23812
|
+
content: s,
|
|
23813
|
+
children: /* @__PURE__ */ jsx(Avatar, { name: s })
|
|
23813
23814
|
})
|
|
23814
23815
|
]
|
|
23815
23816
|
}),
|
|
23816
23817
|
/* @__PURE__ */ jsx(CardTitle, {
|
|
23817
|
-
className: cn("line-clamp-1 text-sm font-bold text-neutral-900",
|
|
23818
|
-
children:
|
|
23818
|
+
className: cn("line-clamp-1 text-sm font-bold text-neutral-900", c && "font-medium"),
|
|
23819
|
+
children: r
|
|
23819
23820
|
}),
|
|
23820
23821
|
/* @__PURE__ */ jsx(CardContent, {
|
|
23821
23822
|
className: "line-clamp-2 min-w-0 text-sm text-neutral-900",
|
|
23822
|
-
children:
|
|
23823
|
+
children: i
|
|
23823
23824
|
}),
|
|
23824
23825
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
23825
23826
|
className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1",
|
|
23826
|
-
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges:
|
|
23827
|
-
actions:
|
|
23827
|
+
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: Xa }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
23828
|
+
actions: h,
|
|
23828
23829
|
className: "col-start-2 justify-self-end"
|
|
23829
23830
|
})]
|
|
23830
23831
|
})
|
|
@@ -23834,23 +23835,23 @@ function EventCard({ icon: e, sender: t, title: n, content: r, timestamp: i, tim
|
|
|
23834
23835
|
children: [/* @__PURE__ */ jsx(CardSidebar, {
|
|
23835
23836
|
className: "flex items-center justify-center",
|
|
23836
23837
|
children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
23837
|
-
checked:
|
|
23838
|
-
onCheckedChange:
|
|
23838
|
+
checked: f,
|
|
23839
|
+
onCheckedChange: p
|
|
23839
23840
|
})
|
|
23840
23841
|
}), /* @__PURE__ */ jsxs(CardHeader, {
|
|
23841
23842
|
className: "flex min-w-0 items-center gap-2",
|
|
23842
23843
|
children: [
|
|
23843
23844
|
e,
|
|
23844
23845
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
23845
|
-
statusBadges:
|
|
23846
|
-
density:
|
|
23846
|
+
statusBadges: Xa,
|
|
23847
|
+
density: g
|
|
23847
23848
|
}),
|
|
23848
23849
|
/* @__PURE__ */ jsxs("div", {
|
|
23849
|
-
className: cn("flex min-w-0 items-center gap-2 text-sm font-bold whitespace-nowrap text-neutral-900",
|
|
23850
|
+
className: cn("flex min-w-0 items-center gap-2 text-sm font-bold whitespace-nowrap text-neutral-900", c && "font-medium"),
|
|
23850
23851
|
children: [
|
|
23851
23852
|
/* @__PURE__ */ jsx("span", {
|
|
23852
23853
|
className: "truncate",
|
|
23853
|
-
children:
|
|
23854
|
+
children: n
|
|
23854
23855
|
}),
|
|
23855
23856
|
/* @__PURE__ */ jsx("span", {
|
|
23856
23857
|
className: "shrink-0 text-sm text-neutral-500",
|
|
@@ -23858,31 +23859,69 @@ function EventCard({ icon: e, sender: t, title: n, content: r, timestamp: i, tim
|
|
|
23858
23859
|
}),
|
|
23859
23860
|
/* @__PURE__ */ jsx("span", {
|
|
23860
23861
|
className: "truncate",
|
|
23861
|
-
children:
|
|
23862
|
+
children: r
|
|
23862
23863
|
})
|
|
23863
23864
|
]
|
|
23864
23865
|
}),
|
|
23865
23866
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
23866
|
-
/* @__PURE__ */ jsx(EventActionsList, { actions:
|
|
23867
|
+
/* @__PURE__ */ jsx(EventActionsList, { actions: h }),
|
|
23867
23868
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
23868
|
-
content:
|
|
23869
|
+
content: o,
|
|
23869
23870
|
children: /* @__PURE__ */ jsx("span", {
|
|
23870
23871
|
className: "text-xs leading-tight font-semibold tracking-wide whitespace-nowrap text-neutral-800",
|
|
23871
|
-
children:
|
|
23872
|
+
children: a
|
|
23872
23873
|
})
|
|
23873
23874
|
}),
|
|
23874
23875
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
23875
|
-
content:
|
|
23876
|
-
children: /* @__PURE__ */ jsx(Avatar, { name:
|
|
23876
|
+
content: s,
|
|
23877
|
+
children: /* @__PURE__ */ jsx(Avatar, { name: s })
|
|
23877
23878
|
})
|
|
23878
23879
|
]
|
|
23879
23880
|
})]
|
|
23880
23881
|
})
|
|
23881
23882
|
});
|
|
23882
23883
|
}
|
|
23884
|
+
function EventDetailContentDetailsPanel({ title: e, rows: t }) {
|
|
23885
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
23886
|
+
className: "flex flex-col gap-2 rounded-lg bg-neutral-100-variant-3 p-4 text-sm text-neutral-800",
|
|
23887
|
+
children: [e && /* @__PURE__ */ jsx("div", {
|
|
23888
|
+
className: "font-bold",
|
|
23889
|
+
children: e
|
|
23890
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
23891
|
+
className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1",
|
|
23892
|
+
children: t.map(({ label: e, value: t }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
23893
|
+
className: "font-bold",
|
|
23894
|
+
children: [e, ":"]
|
|
23895
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
23896
|
+
className: "font-normal",
|
|
23897
|
+
children: t
|
|
23898
|
+
})] }, e))
|
|
23899
|
+
})]
|
|
23900
|
+
});
|
|
23901
|
+
}
|
|
23902
|
+
function EventDetailContentCalendarDetails({ from: e, to: t, link: n, location: r }) {
|
|
23903
|
+
return /* @__PURE__ */ jsx(EventDetailContentDetailsPanel, { rows: [
|
|
23904
|
+
{
|
|
23905
|
+
label: "From",
|
|
23906
|
+
value: e
|
|
23907
|
+
},
|
|
23908
|
+
{
|
|
23909
|
+
label: "To",
|
|
23910
|
+
value: t
|
|
23911
|
+
},
|
|
23912
|
+
{
|
|
23913
|
+
label: "Link",
|
|
23914
|
+
value: n
|
|
23915
|
+
},
|
|
23916
|
+
{
|
|
23917
|
+
label: "Location",
|
|
23918
|
+
value: r
|
|
23919
|
+
}
|
|
23920
|
+
] });
|
|
23921
|
+
}
|
|
23883
23922
|
function EventDetailPriority({ priorityText: e }) {
|
|
23884
23923
|
return /* @__PURE__ */ jsxs("div", {
|
|
23885
|
-
className: "sticky top-14 z-5 flex min-h-14 shrink-0 items-center gap-4 bg-tertiary-50
|
|
23924
|
+
className: "sticky top-14 z-5 flex h-14 min-h-14 shrink-0 items-center gap-4 bg-tertiary-50 px-4 py-2",
|
|
23886
23925
|
children: [/* @__PURE__ */ jsx(FireIcon, {
|
|
23887
23926
|
size: 32,
|
|
23888
23927
|
className: "text-tertiary-500-variant-2"
|
|
@@ -23916,26 +23955,56 @@ function EventDetailContentHeader({ summary: e, priorityText: t, children: n, cl
|
|
|
23916
23955
|
})]
|
|
23917
23956
|
});
|
|
23918
23957
|
}
|
|
23919
|
-
function EventDetailContentCalendar({ detail: { summary: e, body: t, priorityText: n }, className:
|
|
23920
|
-
return /* @__PURE__ */
|
|
23958
|
+
function EventDetailContentCalendar({ detail: { summary: e, body: t, priorityText: n, from: r, to: i, link: a, location: o }, className: s }) {
|
|
23959
|
+
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
23921
23960
|
summary: e,
|
|
23922
23961
|
priorityText: n,
|
|
23923
|
-
className:
|
|
23924
|
-
children: /* @__PURE__ */ jsx(
|
|
23925
|
-
|
|
23962
|
+
className: s,
|
|
23963
|
+
children: [/* @__PURE__ */ jsx(EventDetailContentCalendarDetails, {
|
|
23964
|
+
from: r,
|
|
23965
|
+
to: i,
|
|
23966
|
+
link: a,
|
|
23967
|
+
location: o
|
|
23968
|
+
}), /* @__PURE__ */ jsx(RichContent, {
|
|
23969
|
+
className: "max-w-[1260px px-4",
|
|
23926
23970
|
content: t
|
|
23927
|
-
})
|
|
23971
|
+
})]
|
|
23928
23972
|
});
|
|
23929
23973
|
}
|
|
23930
|
-
function
|
|
23931
|
-
return /* @__PURE__ */ jsx(
|
|
23974
|
+
function EventDetailContentEmailDetails({ subject: e, to: t, date: n, from: r }) {
|
|
23975
|
+
return /* @__PURE__ */ jsx(EventDetailContentDetailsPanel, { rows: [
|
|
23976
|
+
{
|
|
23977
|
+
label: "Subject",
|
|
23978
|
+
value: e
|
|
23979
|
+
},
|
|
23980
|
+
{
|
|
23981
|
+
label: "To",
|
|
23982
|
+
value: t
|
|
23983
|
+
},
|
|
23984
|
+
{
|
|
23985
|
+
label: "Date",
|
|
23986
|
+
value: n
|
|
23987
|
+
},
|
|
23988
|
+
{
|
|
23989
|
+
label: "From",
|
|
23990
|
+
value: r
|
|
23991
|
+
}
|
|
23992
|
+
] });
|
|
23993
|
+
}
|
|
23994
|
+
function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText: n, subject: r, to: i, date: a, from: o }, className: s }) {
|
|
23995
|
+
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
23932
23996
|
summary: e,
|
|
23933
23997
|
priorityText: n,
|
|
23934
|
-
className:
|
|
23935
|
-
children: /* @__PURE__ */ jsx(
|
|
23936
|
-
|
|
23998
|
+
className: s,
|
|
23999
|
+
children: [/* @__PURE__ */ jsx(EventDetailContentEmailDetails, {
|
|
24000
|
+
subject: r,
|
|
24001
|
+
to: i,
|
|
24002
|
+
date: a,
|
|
24003
|
+
from: o
|
|
24004
|
+
}), /* @__PURE__ */ jsx(RichContent, {
|
|
24005
|
+
className: "max-w-[1260px] px-4",
|
|
23937
24006
|
content: t
|
|
23938
|
-
})
|
|
24007
|
+
})]
|
|
23939
24008
|
});
|
|
23940
24009
|
}
|
|
23941
24010
|
function DateSeparator({ timestamp: e }) {
|
|
@@ -23952,7 +24021,7 @@ function DateSeparator({ timestamp: e }) {
|
|
|
23952
24021
|
});
|
|
23953
24022
|
}
|
|
23954
24023
|
function MessageActions({ isPriority: e, onExternalLinkClick: t, onMarkAsFireClick: n }) {
|
|
23955
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [t && /* @__PURE__ */ jsx(IconButton, {
|
|
24024
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [t && /* @__PURE__ */ jsx(IconButton, {
|
|
23956
24025
|
icon: /* @__PURE__ */ jsx(ExternalLinkIcon, { size: 16 }),
|
|
23957
24026
|
className: "inline-flex shrink-0 items-center text-neutral-600 transition-colors hover:text-primary-500",
|
|
23958
24027
|
title: "Open in Slack",
|
|
@@ -24148,7 +24217,7 @@ function PriorityGroup({ group: e, children: t, onPreviousPriority: n, onNextPri
|
|
|
24148
24217
|
onMarkAsNotFireClick: i
|
|
24149
24218
|
}), t]
|
|
24150
24219
|
})]
|
|
24151
|
-
}) : /* @__PURE__ */ jsx(Fragment, { children: t });
|
|
24220
|
+
}) : /* @__PURE__ */ jsx(Fragment$1, { children: t });
|
|
24152
24221
|
}
|
|
24153
24222
|
function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
|
|
24154
24223
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -24166,7 +24235,11 @@ function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
|
|
|
24166
24235
|
});
|
|
24167
24236
|
}
|
|
24168
24237
|
function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityText: n }, className: r }) {
|
|
24169
|
-
let i = e.filter((e) => e.isPriority).length, a = useRef(null),
|
|
24238
|
+
let i = e.filter((e) => e.isPriority).length, a = useRef(null), o = useRef(null);
|
|
24239
|
+
useEffect(() => {
|
|
24240
|
+
e.length > 0 && o.current?.scrollIntoView({ behavior: "smooth" });
|
|
24241
|
+
}, [e]);
|
|
24242
|
+
let c = i, u = useCallback((t) => {
|
|
24170
24243
|
if (!a.current) return;
|
|
24171
24244
|
let n = Array.from(a.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")).filter((t) => {
|
|
24172
24245
|
let n = t.getAttribute("data-group-id");
|
|
@@ -24184,16 +24257,16 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
24184
24257
|
summary: t,
|
|
24185
24258
|
priorityText: n,
|
|
24186
24259
|
className: r,
|
|
24187
|
-
children: /* @__PURE__ */
|
|
24260
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
24188
24261
|
ref: a,
|
|
24189
24262
|
className: "flex flex-col gap-4",
|
|
24190
|
-
children: e.map((e) => {
|
|
24191
|
-
let t = e.isPriority ?
|
|
24263
|
+
children: [e.map((e) => {
|
|
24264
|
+
let t = e.isPriority ? c-- : 0, n = t ? () => {
|
|
24192
24265
|
let e = t + 1;
|
|
24193
|
-
e <= i &&
|
|
24266
|
+
e <= i && u(e);
|
|
24194
24267
|
} : void 0, r = t ? () => {
|
|
24195
24268
|
let e = t - 1;
|
|
24196
|
-
e >= 1 &&
|
|
24269
|
+
e >= 1 && u(e);
|
|
24197
24270
|
} : void 0;
|
|
24198
24271
|
return /* @__PURE__ */ jsx(MessageGroup, {
|
|
24199
24272
|
group: {
|
|
@@ -24204,22 +24277,96 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
24204
24277
|
onPreviousPriority: n,
|
|
24205
24278
|
onNextPriority: r
|
|
24206
24279
|
}, e.id);
|
|
24207
|
-
})
|
|
24280
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
24281
|
+
ref: o,
|
|
24282
|
+
"aria-hidden": "true"
|
|
24283
|
+
})]
|
|
24208
24284
|
})
|
|
24209
24285
|
});
|
|
24210
24286
|
}
|
|
24211
|
-
function
|
|
24212
|
-
return /* @__PURE__ */ jsx(
|
|
24287
|
+
function EventDetailContentTicketDetails({ issue: e, notification: t, project: n, task: r, dueDate: i, startDate: a, assignees: o, reporter: s, team: c, location: l, related: u }) {
|
|
24288
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(EventDetailContentDetailsPanel, { rows: [
|
|
24289
|
+
{
|
|
24290
|
+
label: "Issue",
|
|
24291
|
+
value: e
|
|
24292
|
+
},
|
|
24293
|
+
{
|
|
24294
|
+
label: "Notification",
|
|
24295
|
+
value: t
|
|
24296
|
+
},
|
|
24297
|
+
{
|
|
24298
|
+
label: "Project",
|
|
24299
|
+
value: n
|
|
24300
|
+
},
|
|
24301
|
+
{
|
|
24302
|
+
label: "Task",
|
|
24303
|
+
value: r
|
|
24304
|
+
}
|
|
24305
|
+
] }), /* @__PURE__ */ jsx(EventDetailContentDetailsPanel, {
|
|
24306
|
+
title: "Issue",
|
|
24307
|
+
rows: [
|
|
24308
|
+
{
|
|
24309
|
+
label: "Due Date",
|
|
24310
|
+
value: i
|
|
24311
|
+
},
|
|
24312
|
+
{
|
|
24313
|
+
label: "Start Date",
|
|
24314
|
+
value: a
|
|
24315
|
+
},
|
|
24316
|
+
{
|
|
24317
|
+
label: "Assignees",
|
|
24318
|
+
value: o
|
|
24319
|
+
},
|
|
24320
|
+
{
|
|
24321
|
+
label: "Reporter",
|
|
24322
|
+
value: s
|
|
24323
|
+
},
|
|
24324
|
+
{
|
|
24325
|
+
label: "Team",
|
|
24326
|
+
value: c
|
|
24327
|
+
},
|
|
24328
|
+
{
|
|
24329
|
+
label: "Location",
|
|
24330
|
+
value: l
|
|
24331
|
+
},
|
|
24332
|
+
{
|
|
24333
|
+
label: "Related",
|
|
24334
|
+
value: u
|
|
24335
|
+
}
|
|
24336
|
+
]
|
|
24337
|
+
})] });
|
|
24338
|
+
}
|
|
24339
|
+
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: Xa }, className: h }) {
|
|
24340
|
+
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24213
24341
|
summary: e,
|
|
24214
24342
|
priorityText: n,
|
|
24215
|
-
className:
|
|
24216
|
-
children:
|
|
24217
|
-
|
|
24218
|
-
|
|
24219
|
-
|
|
24343
|
+
className: h,
|
|
24344
|
+
children: [
|
|
24345
|
+
/* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
|
|
24346
|
+
issue: r,
|
|
24347
|
+
notification: i,
|
|
24348
|
+
project: a,
|
|
24349
|
+
task: o,
|
|
24350
|
+
dueDate: s,
|
|
24351
|
+
startDate: c,
|
|
24352
|
+
assignees: l,
|
|
24353
|
+
reporter: u,
|
|
24354
|
+
team: f,
|
|
24355
|
+
location: p,
|
|
24356
|
+
related: Xa
|
|
24357
|
+
}),
|
|
24358
|
+
/* @__PURE__ */ jsx("h2", {
|
|
24359
|
+
className: "px-4 text-sm font-bold text-neutral-900",
|
|
24360
|
+
children: "Description"
|
|
24361
|
+
}),
|
|
24362
|
+
/* @__PURE__ */ jsx(RichContent, {
|
|
24363
|
+
className: "max-w-[1260px] px-4",
|
|
24364
|
+
content: t
|
|
24365
|
+
})
|
|
24366
|
+
]
|
|
24220
24367
|
});
|
|
24221
24368
|
}
|
|
24222
|
-
function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp:
|
|
24369
|
+
function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, timestamp: a, isPriority: o, isOpen: s, isFirstEvent: c, isSingleEvent: l, className: u }) {
|
|
24223
24370
|
return /* @__PURE__ */ jsx("div", {
|
|
24224
24371
|
className: cn("flex h-14 w-full items-center bg-white px-4 py-2", u),
|
|
24225
24372
|
"data-priority": o,
|
|
@@ -24257,9 +24404,9 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: i, t
|
|
|
24257
24404
|
}),
|
|
24258
24405
|
/* @__PURE__ */ jsxs("div", {
|
|
24259
24406
|
className: "leading-[1.2]tracking-[0.12px] flex items-center gap-1 text-right text-xs whitespace-nowrap",
|
|
24260
|
-
children: [
|
|
24407
|
+
children: [r != null && /* @__PURE__ */ jsx("span", {
|
|
24261
24408
|
className: "font-normal text-neutral-600",
|
|
24262
|
-
children:
|
|
24409
|
+
children: r
|
|
24263
24410
|
}), /* @__PURE__ */ jsx("span", {
|
|
24264
24411
|
className: "font-semibold text-neutral-800",
|
|
24265
24412
|
children: a
|
|
@@ -24383,7 +24530,7 @@ function EventDetail({ events: e, expandedEventIndex: t }) {
|
|
|
24383
24530
|
return /* @__PURE__ */ jsx(Accordion, {
|
|
24384
24531
|
className: "w-full",
|
|
24385
24532
|
defaultValue: t === void 0 ? getEventValue(e[0], 0) : getEventValue(e[t], t),
|
|
24386
|
-
children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment, { children: e.map((n, r) => {
|
|
24533
|
+
children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment$1, { children: e.map((n, r) => {
|
|
24387
24534
|
let i = getEventValue(n, r), a = t.has(i);
|
|
24388
24535
|
return /* @__PURE__ */ jsxs(AccordionItem, {
|
|
24389
24536
|
value: i,
|
|
@@ -24503,11 +24650,11 @@ function IntegrationBarSkeleton({ orientation: e = "vertical", itemCount: t = 3,
|
|
|
24503
24650
|
})
|
|
24504
24651
|
});
|
|
24505
24652
|
}
|
|
24506
|
-
function IntegrationBar({ orientation: e = "vertical", children: t, onAddMore: n, className:
|
|
24653
|
+
function IntegrationBar({ orientation: e = "vertical", children: t, onAddMore: n, className: r }) {
|
|
24507
24654
|
return /* @__PURE__ */ jsx("div", {
|
|
24508
24655
|
className: cn("size-full", e === "vertical" ? "overflow-x-hidden" : "overflow-y-hidden"),
|
|
24509
24656
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24510
|
-
className: cn("grid h-full w-full place-items-center gap-4", e === "vertical" ? "grid-cols-1" : "auto-cols-max grid-flow-col",
|
|
24657
|
+
className: cn("grid h-full w-full place-items-center gap-4", e === "vertical" ? "grid-cols-1" : "auto-cols-max grid-flow-col", r),
|
|
24511
24658
|
children: [
|
|
24512
24659
|
t.map((e) => cloneElement(e, {})),
|
|
24513
24660
|
/* @__PURE__ */ jsx(Divider, { orientation: e === "vertical" ? "horizontal" : "vertical" }),
|
|
@@ -24534,7 +24681,7 @@ function IntegrationItemSkeleton() {
|
|
|
24534
24681
|
})
|
|
24535
24682
|
});
|
|
24536
24683
|
}
|
|
24537
|
-
function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService:
|
|
24684
|
+
function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, connectLabel: a, onConnect: o, isLoading: s, children: c }) {
|
|
24538
24685
|
let l = Children.toArray(c).length;
|
|
24539
24686
|
return /* @__PURE__ */ jsxs("div", {
|
|
24540
24687
|
className: "flex flex-col gap-4 rounded-lg border border-neutral-400 bg-white p-4",
|
|
@@ -24559,10 +24706,10 @@ function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: i, conne
|
|
|
24559
24706
|
children: t
|
|
24560
24707
|
}), /* @__PURE__ */ jsx("div", {
|
|
24561
24708
|
className: "text-xs font-normal text-neutral-800",
|
|
24562
|
-
children: `${l} of ${
|
|
24709
|
+
children: `${l} of ${r} accounts`
|
|
24563
24710
|
})]
|
|
24564
24711
|
})]
|
|
24565
|
-
}), l <
|
|
24712
|
+
}), l < r && !s && /* @__PURE__ */ jsx(Button, {
|
|
24566
24713
|
className: "flex shrink-0 items-center gap-1 rounded-lg border border-brand-primary bg-white px-2 py-1 text-xs font-bold text-brand-primary transition-opacity hover:opacity-70",
|
|
24567
24714
|
onClick: o,
|
|
24568
24715
|
children: a
|