@qtalo/qt-ui-library 0.1.9 → 0.1.11
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 +65 -10
- package/dist/index.js +641 -364
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/styles.css +6 -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: eo } = e, h = c.prototype, g = lookupGetter(h, "cloneNode"), to = lookupGetter(h, "remove"), no = lookupGetter(h, "nextSibling"), O = lookupGetter(h, "childNodes"), ro = 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, io = "", { implementation: ao, createNodeIterator: oo, createDocumentFragment: so, getElementsByTagName: co } = n, { importNode: lo } = r, R = _createHooksMap();
|
|
335
|
+
t.isSupported = typeof entries == "function" && typeof ro == "function" && ao && ao.createHTMLDocument !== void 0;
|
|
336
|
+
let { MUSTACHE_EXPR: uo, ERB_EXPR: fo, TMPLIT_EXPR: po, DATA_ATTR: mo, ARIA_ATTR: ho, IS_SCRIPT_OR_DATA: go, ATTR_WHITESPACE: _o, CUSTOM_ELEMENT: vo } = EXPRESSIONS, { IS_ALLOWED_URI: yo } = EXPRESSIONS, B = null, bo = 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, xo = 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
|
+
})), So = null, Co = null, wo = 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
|
+
})), To = !0, Eo = !0, Do = !1, Oo = !0, ko = !1, Ao = !0, jo = !1, Mo = !1, No = !1, Po = !1, Fo = !1, Io = !1, Lo = !0, Ro = !1, zo = !0, Bo = !1, Vo = {}, Ho = null, Uo = 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
|
+
]), Wo = null, Go = addToSet({}, [
|
|
406
406
|
"audio",
|
|
407
407
|
"video",
|
|
408
408
|
"img",
|
|
409
409
|
"source",
|
|
410
410
|
"image",
|
|
411
411
|
"track"
|
|
412
|
-
]),
|
|
412
|
+
]), Ko = null, qo = 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
|
+
]), Jo = "http://www.w3.org/1998/Math/MathML", Yo = "http://www.w3.org/2000/svg", Xo = "http://www.w3.org/1999/xhtml", Zo = Xo, Qo = !1, $o = null, es = addToSet({}, [
|
|
428
|
+
Jo,
|
|
429
|
+
Yo,
|
|
430
|
+
Xo
|
|
431
|
+
], stringToString), ts = addToSet({}, [
|
|
432
432
|
"mi",
|
|
433
433
|
"mo",
|
|
434
434
|
"mn",
|
|
435
435
|
"ms",
|
|
436
436
|
"mtext"
|
|
437
|
-
]),
|
|
437
|
+
]), ns = addToSet({}, ["annotation-xml"]), rs = addToSet({}, [
|
|
438
438
|
"title",
|
|
439
439
|
"style",
|
|
440
440
|
"font",
|
|
441
441
|
"a",
|
|
442
442
|
"script"
|
|
443
|
-
]),
|
|
443
|
+
]), is = null, as = ["application/xhtml+xml", "text/html"], Y = null, os = null, ss = n.createElement("form"), cs = function(e) {
|
|
444
444
|
return e instanceof RegExp || e instanceof Function;
|
|
445
|
-
},
|
|
445
|
+
}, ls = 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 (!(os && os === e)) {
|
|
448
|
+
if ((!e || typeof e != "object") && (e = {}), e = clone(e), is = as.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = is === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : bo, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : xo, $o = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : es, Ko = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(qo), e.ADD_URI_SAFE_ATTR, Y) : qo, Wo = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Go), e.ADD_DATA_URI_TAGS, Y) : Go, Ho = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : Uo, So = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), Co = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Vo = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, To = e.ALLOW_ARIA_ATTR !== !1, Eo = e.ALLOW_DATA_ATTR !== !1, Do = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Oo = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ko = e.SAFE_FOR_TEMPLATES || !1, Ao = e.SAFE_FOR_XML !== !1, jo = e.WHOLE_DOCUMENT || !1, Po = e.RETURN_DOM || !1, Fo = e.RETURN_DOM_FRAGMENT || !1, Io = e.RETURN_TRUSTED_TYPE || !1, No = e.FORCE_BODY || !1, Lo = e.SANITIZE_DOM !== !1, Ro = e.SANITIZE_NAMED_PROPS || !1, zo = e.KEEP_CONTENT !== !1, Bo = e.IN_PLACE || !1, yo = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, Zo = e.NAMESPACE || Xo, ts = e.MATHML_TEXT_INTEGRATION_POINTS || ts, ns = e.HTML_INTEGRATION_POINTS || ns, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && cs(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && cs(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), ko && (Eo = !1), Fo && (Po = !0), Vo && (B = addToSet({}, text), V = [], Vo.html === !0 && (addToSet(B, html$1), addToSet(V, html)), Vo.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), Vo.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), Vo.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? wo.tagCheck = e.ADD_TAGS : (B === bo && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? wo.attributeCheck = e.ADD_ATTR : (V === xo && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Ko, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Ho === Uo && (Ho = clone(Ho)), addToSet(Ho, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Ho === Uo && (Ho = clone(Ho)), addToSet(Ho, e.ADD_FORBID_CONTENTS, Y)), zo && (B["#text"] = !0), jo && 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 So.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, io = A.createHTML("");
|
|
456
|
+
} else A === void 0 && (A = _createTrustedTypesPolicy(eo, i)), A !== null && typeof io == "string" && (io = A.createHTML(""));
|
|
457
|
+
freeze && freeze(e), os = e;
|
|
458
458
|
}
|
|
459
|
-
},
|
|
459
|
+
}, us = addToSet({}, [
|
|
460
460
|
...svg$1,
|
|
461
461
|
...svgFilters,
|
|
462
462
|
...svgDisallowed
|
|
463
|
-
]),
|
|
464
|
-
let t =
|
|
463
|
+
]), ds = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), fs = function(e) {
|
|
464
|
+
let t = ro(e);
|
|
465
465
|
(!t || !t.tagName) && (t = {
|
|
466
|
-
namespaceURI:
|
|
466
|
+
namespaceURI: Zo,
|
|
467
467
|
tagName: "template"
|
|
468
468
|
});
|
|
469
469
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
470
|
-
return
|
|
471
|
-
},
|
|
470
|
+
return $o[e.namespaceURI] ? e.namespaceURI === Yo ? t.namespaceURI === Xo ? n === "svg" : t.namespaceURI === Jo ? n === "svg" && (r === "annotation-xml" || ts[r]) : !!us[n] : e.namespaceURI === Jo ? t.namespaceURI === Xo ? n === "math" : t.namespaceURI === Yo ? n === "math" && ns[r] : !!ds[n] : e.namespaceURI === Xo ? t.namespaceURI === Yo && !ns[r] || t.namespaceURI === Jo && !ts[r] ? !1 : !ds[n] && (rs[n] || !us[n]) : !!(is === "application/xhtml+xml" && $o[e.namespaceURI]) : !1;
|
|
471
|
+
}, ps = function(e) {
|
|
472
472
|
arrayPush(t.removed, { element: e });
|
|
473
473
|
try {
|
|
474
|
-
|
|
474
|
+
ro(e).removeChild(e);
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
to(e);
|
|
477
477
|
}
|
|
478
|
-
},
|
|
478
|
+
}, ms = 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 (Po || Fo) try {
|
|
491
|
+
ps(n);
|
|
492
492
|
} catch {}
|
|
493
493
|
else try {
|
|
494
494
|
n.setAttribute(e, "");
|
|
495
495
|
} catch {}
|
|
496
|
-
},
|
|
496
|
+
}, hs = function(e) {
|
|
497
497
|
let t = null, r = null;
|
|
498
|
-
if (
|
|
498
|
+
if (No) 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
|
+
is === "application/xhtml+xml" && Zo === Xo && (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 (Zo === Xo) try {
|
|
506
|
+
t = new p().parseFromString(i, is);
|
|
507
507
|
} catch {}
|
|
508
508
|
if (!t || !t.documentElement) {
|
|
509
|
-
t =
|
|
509
|
+
t = ao.createDocument(Zo, "template", null);
|
|
510
510
|
try {
|
|
511
|
-
t.documentElement.innerHTML =
|
|
511
|
+
t.documentElement.innerHTML = Qo ? io : 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), Zo === Xo ? co.call(t, jo ? "html" : "body")[0] : jo ? t.documentElement : a;
|
|
516
|
+
}, gs = function(e) {
|
|
517
|
+
return oo.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
518
|
+
}, _s = 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
|
+
}, vs = function(e) {
|
|
521
521
|
return typeof s == "function" && e instanceof s;
|
|
522
522
|
};
|
|
523
|
-
function
|
|
523
|
+
function ys(e, n, r) {
|
|
524
524
|
arrayForEach(e, (e) => {
|
|
525
|
-
e.call(t, n, r,
|
|
525
|
+
e.call(t, n, r, os);
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
let
|
|
528
|
+
let bs = function(e) {
|
|
529
529
|
let n = null;
|
|
530
|
-
if (
|
|
530
|
+
if (ys(R.beforeSanitizeElements, e, null), _s(e)) return ps(e), !0;
|
|
531
531
|
let r = Y(e.nodeName);
|
|
532
|
-
if (
|
|
532
|
+
if (ys(R.uponSanitizeElement, e, {
|
|
533
533
|
tagName: r,
|
|
534
534
|
allowedTags: B
|
|
535
|
-
}),
|
|
536
|
-
if (!(
|
|
537
|
-
if (!
|
|
538
|
-
if (
|
|
539
|
-
let t =
|
|
535
|
+
}), Ao && e.hasChildNodes() && !vs(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Ao && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return ps(e), !0;
|
|
536
|
+
if (!(wo.tagCheck instanceof Function && wo.tagCheck(r)) && (!B[r] || So[r])) {
|
|
537
|
+
if (!So[r] && Ss(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
|
|
538
|
+
if (zo && !Ho[r]) {
|
|
539
|
+
let t = ro(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, no(e));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
return
|
|
548
|
+
return ps(e), !0;
|
|
549
549
|
}
|
|
550
|
-
return e instanceof c && !
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
return e instanceof c && !fs(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (ps(e), !0) : (ko && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
|
|
551
|
+
uo,
|
|
552
|
+
fo,
|
|
553
|
+
po
|
|
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)), ys(R.afterSanitizeElements, e, null), !1);
|
|
557
|
+
}, xs = function(e, t, r) {
|
|
558
|
+
if (Lo && (t === "id" || t === "name") && (r in n || r in ss)) return !1;
|
|
559
|
+
if (!(Eo && !Co[t] && regExpTest(mo, t)) && !(To && regExpTest(ho, t)) && !(wo.attributeCheck instanceof Function && wo.attributeCheck(t, e))) {
|
|
560
|
+
if (!V[t] || Co[t]) {
|
|
561
|
+
if (!(Ss(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 (!Ko[t] && !regExpTest(yo, stringReplace(r, _o, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Wo[e]) && !(Do && !regExpTest(go, stringReplace(r, _o, ""))) && r) return !1;
|
|
563
563
|
}
|
|
564
564
|
return !0;
|
|
565
|
-
},
|
|
566
|
-
return e !== "annotation-xml" && stringMatch(e,
|
|
567
|
-
},
|
|
568
|
-
|
|
565
|
+
}, Ss = function(e) {
|
|
566
|
+
return e !== "annotation-xml" && stringMatch(e, vo);
|
|
567
|
+
}, Cs = function(e) {
|
|
568
|
+
ys(R.beforeSanitizeAttributes, e, null);
|
|
569
569
|
let { attributes: n } = e;
|
|
570
|
-
if (!n ||
|
|
570
|
+
if (!n || _s(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, ys(R.uponSanitizeAttribute, e, r), u = r.attrValue, Ro && (c === "id" || c === "name") && (ms(a, e), u = "user-content-" + u), Ao && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
581
|
+
ms(a, e);
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
584
584
|
if (c === "attributename" && stringMatch(u, "href")) {
|
|
585
|
-
|
|
585
|
+
ms(a, e);
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
588
|
if (r.forceKeepAttr) continue;
|
|
589
589
|
if (!r.keepAttr) {
|
|
590
|
-
|
|
590
|
+
ms(a, e);
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
|
-
if (!
|
|
594
|
-
|
|
593
|
+
if (!Oo && regExpTest(/\/>/i, u)) {
|
|
594
|
+
ms(a, e);
|
|
595
595
|
continue;
|
|
596
596
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
ko && arrayForEach([
|
|
598
|
+
uo,
|
|
599
|
+
fo,
|
|
600
|
+
po
|
|
601
601
|
], (e) => {
|
|
602
602
|
u = stringReplace(u, e, " ");
|
|
603
603
|
});
|
|
604
604
|
let f = Y(e.nodeName);
|
|
605
|
-
if (!
|
|
606
|
-
|
|
605
|
+
if (!xs(f, c, u)) {
|
|
606
|
+
ms(a, e);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
|
-
if (A && typeof
|
|
609
|
+
if (A && typeof eo == "object" && typeof eo.getAttributeType == "function" && !o) switch (eo.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), _s(e) ? ps(e) : arrayPop(t.removed);
|
|
619
619
|
} catch {
|
|
620
|
-
|
|
620
|
+
ms(a, e);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
|
|
624
|
-
},
|
|
625
|
-
let n = null, r =
|
|
626
|
-
for (
|
|
627
|
-
|
|
623
|
+
ys(R.afterSanitizeAttributes, e, null);
|
|
624
|
+
}, ws = function e(t) {
|
|
625
|
+
let n = null, r = gs(t);
|
|
626
|
+
for (ys(R.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) ys(R.uponSanitizeShadowNode, n, null), bs(n), Cs(n), n.content instanceof a && e(n.content);
|
|
627
|
+
ys(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 (Qo = !e, Qo && (e = "<!-->"), typeof e != "string" && !vs(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 (Mo || ls(n), t.removed = [], typeof e == "string" && (Bo = !1), Bo) {
|
|
636
636
|
if (e.nodeName) {
|
|
637
637
|
let t = Y(e.nodeName);
|
|
638
|
-
if (!B[t] ||
|
|
638
|
+
if (!B[t] || So[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 = hs("<!---->"), 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 (!Po && !ko && !jo && e.indexOf("<") === -1) return A && Io ? A.createHTML(e) : e;
|
|
643
|
+
if (i = hs(e), !i) return Po ? null : Io ? io : "";
|
|
644
644
|
}
|
|
645
|
-
i &&
|
|
646
|
-
let u =
|
|
647
|
-
for (; c = u.nextNode();)
|
|
648
|
-
if (
|
|
649
|
-
if (
|
|
650
|
-
if (
|
|
645
|
+
i && No && ps(i.firstChild);
|
|
646
|
+
let u = gs(Bo ? e : i);
|
|
647
|
+
for (; c = u.nextNode();) bs(c), Cs(c), c.content instanceof a && ws(c.content);
|
|
648
|
+
if (Bo) return e;
|
|
649
|
+
if (Po) {
|
|
650
|
+
if (Fo) for (l = so.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 = lo.call(r, l, !0)), l;
|
|
653
653
|
}
|
|
654
|
-
let f =
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
654
|
+
let f = jo ? i.outerHTML : i.innerHTML;
|
|
655
|
+
return jo && 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), ko && arrayForEach([
|
|
656
|
+
uo,
|
|
657
|
+
fo,
|
|
658
|
+
po
|
|
659
659
|
], (e) => {
|
|
660
660
|
f = stringReplace(f, e, " ");
|
|
661
|
-
}), A &&
|
|
661
|
+
}), A && Io ? A.createHTML(f) : f;
|
|
662
662
|
}, t.setConfig = function() {
|
|
663
|
-
|
|
663
|
+
ls(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Mo = !0;
|
|
664
664
|
}, t.clearConfig = function() {
|
|
665
|
-
|
|
665
|
+
os = null, Mo = !1;
|
|
666
666
|
}, t.isValidAttribute = function(e, t, n) {
|
|
667
|
-
return
|
|
667
|
+
return os || ls({}), xs(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], eo;
|
|
20161
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), eo = l) : eo = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
|
|
20162
|
+
if (eo.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + eo.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 = eo.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,
|
|
@@ -21371,52 +21371,60 @@ 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",
|
|
21375
|
-
let [
|
|
21374
|
+
function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1 }) {
|
|
21375
|
+
let [s, c] = useState(!1), f = useRef(null), h = useRef(null), g = useRef(null), [ro, A] = useState(null);
|
|
21376
21376
|
useLayoutEffect(() => {
|
|
21377
|
-
if (!
|
|
21378
|
-
let e =
|
|
21379
|
-
n === "end" && (
|
|
21380
|
-
|
|
21381
|
-
|
|
21382
|
-
|
|
21383
|
-
|
|
21384
|
-
|
|
21385
|
-
|
|
21377
|
+
if (!s || !f.current || !h.current) return;
|
|
21378
|
+
let e = f.current.getBoundingClientRect(), t = h.current.getBoundingClientRect(), o = e.left;
|
|
21379
|
+
n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
|
|
21380
|
+
let c;
|
|
21381
|
+
c = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => A({
|
|
21382
|
+
top: c,
|
|
21383
|
+
left: o
|
|
21384
|
+
}));
|
|
21385
|
+
}, [
|
|
21386
|
+
s,
|
|
21387
|
+
n,
|
|
21388
|
+
r,
|
|
21389
|
+
i,
|
|
21390
|
+
a
|
|
21391
|
+
]);
|
|
21392
|
+
function io() {
|
|
21393
|
+
g.current &&= (clearTimeout(g.current), null), c(!0);
|
|
21386
21394
|
}
|
|
21387
|
-
function
|
|
21388
|
-
|
|
21389
|
-
|
|
21395
|
+
function ao() {
|
|
21396
|
+
g.current = window.setTimeout(() => {
|
|
21397
|
+
c(!1);
|
|
21390
21398
|
}, 120);
|
|
21391
21399
|
}
|
|
21392
21400
|
return useEffect(() => {
|
|
21393
21401
|
function e(e) {
|
|
21394
21402
|
let t = e.target;
|
|
21395
|
-
|
|
21403
|
+
f.current?.contains(t) || h.current?.contains(t) || c(!1);
|
|
21396
21404
|
}
|
|
21397
21405
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21398
21406
|
}, []), useEffect(() => () => {
|
|
21399
|
-
|
|
21407
|
+
g.current && clearTimeout(g.current);
|
|
21400
21408
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21401
|
-
value: { close: () =>
|
|
21409
|
+
value: { close: () => c(!1) },
|
|
21402
21410
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21403
|
-
ref:
|
|
21411
|
+
ref: f,
|
|
21404
21412
|
className: "inline-flex",
|
|
21405
|
-
onMouseEnter:
|
|
21406
|
-
onMouseLeave:
|
|
21407
|
-
onClick: () =>
|
|
21413
|
+
onMouseEnter: io,
|
|
21414
|
+
onMouseLeave: ao,
|
|
21415
|
+
onClick: () => c((e) => !e),
|
|
21408
21416
|
"aria-haspopup": "menu",
|
|
21409
|
-
"aria-expanded":
|
|
21417
|
+
"aria-expanded": s,
|
|
21410
21418
|
children: e
|
|
21411
|
-
}),
|
|
21412
|
-
ref:
|
|
21413
|
-
onMouseEnter:
|
|
21414
|
-
onMouseLeave:
|
|
21419
|
+
}), s && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21420
|
+
ref: h,
|
|
21421
|
+
onMouseEnter: io,
|
|
21422
|
+
onMouseLeave: ao,
|
|
21415
21423
|
style: {
|
|
21416
21424
|
position: "fixed",
|
|
21417
|
-
top:
|
|
21418
|
-
left:
|
|
21419
|
-
visibility:
|
|
21425
|
+
top: ro?.top ?? 0,
|
|
21426
|
+
left: ro?.left ?? 0,
|
|
21427
|
+
visibility: ro ? "visible" : "hidden",
|
|
21420
21428
|
zIndex: 1e3
|
|
21421
21429
|
},
|
|
21422
21430
|
children: t
|
|
@@ -21429,7 +21437,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21429
21437
|
let t = e.target.value;
|
|
21430
21438
|
f || u(t), o?.(t);
|
|
21431
21439
|
}
|
|
21432
|
-
function
|
|
21440
|
+
function g(e) {
|
|
21433
21441
|
s?.(e);
|
|
21434
21442
|
}
|
|
21435
21443
|
return /* @__PURE__ */ jsx("input", {
|
|
@@ -21440,17 +21448,17 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21440
21448
|
"aria-disabled": r || void 0,
|
|
21441
21449
|
"aria-invalid": i || void 0,
|
|
21442
21450
|
onChange: h,
|
|
21443
|
-
onKeyDown:
|
|
21451
|
+
onKeyDown: g,
|
|
21444
21452
|
className: cn("bg-transparent outline-none", r && "pointer-events-none", c)
|
|
21445
21453
|
});
|
|
21446
21454
|
}
|
|
21447
21455
|
function Pressable({ as: e, disabled: t = !1, onPress: n, className: r, children: i, ...a }) {
|
|
21448
|
-
let
|
|
21456
|
+
let o = e || "div", c = useCallback(() => {
|
|
21449
21457
|
t || n?.();
|
|
21450
21458
|
}, [t, n]), l = useCallback((e) => {
|
|
21451
21459
|
t || (e.key === "Enter" || e.key === " ") && (e.preventDefault(), n?.());
|
|
21452
21460
|
}, [t, n]);
|
|
21453
|
-
return /* @__PURE__ */ jsx(
|
|
21461
|
+
return /* @__PURE__ */ jsx(o, {
|
|
21454
21462
|
role: "button",
|
|
21455
21463
|
tabIndex: t ? -1 : 0,
|
|
21456
21464
|
"aria-disabled": t || void 0,
|
|
@@ -21478,38 +21486,38 @@ function getVerticalAlign(e, t, n) {
|
|
|
21478
21486
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21479
21487
|
}
|
|
21480
21488
|
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), [
|
|
21489
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h, ro] = useState(null), A = () => {
|
|
21482
21490
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21483
|
-
|
|
21491
|
+
f(!0);
|
|
21484
21492
|
}, r);
|
|
21485
|
-
},
|
|
21486
|
-
s.current &&= (clearTimeout(s.current), null),
|
|
21493
|
+
}, io = () => {
|
|
21494
|
+
s.current &&= (clearTimeout(s.current), null), f(!1);
|
|
21487
21495
|
};
|
|
21488
21496
|
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:
|
|
21497
|
+
if (!c || !a.current || !o.current) return;
|
|
21498
|
+
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)), ro((e) => e && e.top === l && e.left === u ? e : {
|
|
21500
|
+
top: l,
|
|
21501
|
+
left: u
|
|
21494
21502
|
});
|
|
21495
|
-
}, [
|
|
21503
|
+
}, [c, n]), useEffect(() => () => {
|
|
21496
21504
|
s.current && clearTimeout(s.current);
|
|
21497
|
-
}, []), /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("div", {
|
|
21505
|
+
}, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
21498
21506
|
ref: a,
|
|
21499
21507
|
className: "inline-flex",
|
|
21500
21508
|
onMouseEnter: A,
|
|
21501
|
-
onMouseLeave:
|
|
21509
|
+
onMouseLeave: io,
|
|
21502
21510
|
onFocus: A,
|
|
21503
|
-
onBlur:
|
|
21511
|
+
onBlur: io,
|
|
21504
21512
|
children: e
|
|
21505
|
-
}),
|
|
21513
|
+
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21506
21514
|
ref: o,
|
|
21507
21515
|
role: "tooltip",
|
|
21508
21516
|
style: {
|
|
21509
21517
|
position: "fixed",
|
|
21510
|
-
top:
|
|
21511
|
-
left:
|
|
21512
|
-
visibility:
|
|
21518
|
+
top: h?.top ?? 0,
|
|
21519
|
+
left: h?.left ?? 0,
|
|
21520
|
+
visibility: h ? "visible" : "hidden",
|
|
21513
21521
|
zIndex: 1e3
|
|
21514
21522
|
},
|
|
21515
21523
|
className: cn(i),
|
|
@@ -21556,11 +21564,11 @@ function AccordionItem({ value: e, children: t, className: n, ...r }) {
|
|
|
21556
21564
|
children: t
|
|
21557
21565
|
});
|
|
21558
21566
|
}
|
|
21559
|
-
function AccordionTrigger({ value: e, children: t, className: n, asChild:
|
|
21567
|
+
function AccordionTrigger({ value: e, children: t, className: n, asChild: r = !1, onClick: a, ...s }) {
|
|
21560
21568
|
let { toggleItem: c, openItems: l } = useAccordion(), u = l.has(e), f = (t) => {
|
|
21561
|
-
c(e), t &&
|
|
21569
|
+
c(e), t && a && a(t);
|
|
21562
21570
|
};
|
|
21563
|
-
return
|
|
21571
|
+
return r && isValidElement(t) ? cloneElement(t, {
|
|
21564
21572
|
onClick: f,
|
|
21565
21573
|
"aria-expanded": u,
|
|
21566
21574
|
"data-state": u ? "open" : "closed"
|
|
@@ -22644,7 +22652,7 @@ function CardFooter({ children: e, className: t }) {
|
|
|
22644
22652
|
});
|
|
22645
22653
|
}
|
|
22646
22654
|
function DropdownMenuContent({ children: e, className: t }) {
|
|
22647
|
-
let { close:
|
|
22655
|
+
let { close: r } = useDropdown();
|
|
22648
22656
|
return /* @__PURE__ */ jsx("div", {
|
|
22649
22657
|
role: "menu",
|
|
22650
22658
|
tabIndex: -1,
|
|
@@ -22652,7 +22660,7 @@ function DropdownMenuContent({ children: e, className: t }) {
|
|
|
22652
22660
|
children: Children.map(e, (e) => cloneElement(e, {
|
|
22653
22661
|
role: "menuitem",
|
|
22654
22662
|
onClick: (t) => {
|
|
22655
|
-
e.props.onClick?.(t), e.props.closeOnClick !== !1 &&
|
|
22663
|
+
e.props.onClick?.(t), e.props.closeOnClick !== !1 && r();
|
|
22656
22664
|
}
|
|
22657
22665
|
}))
|
|
22658
22666
|
});
|
|
@@ -22752,9 +22760,9 @@ function markAsExiting(e, t) {
|
|
|
22752
22760
|
} : e;
|
|
22753
22761
|
}
|
|
22754
22762
|
function ToastWrapper({ toast: e, remainingTime: t, onExitComplete: n, onClose: r, onHoverStart: i, onHoverEnd: a }) {
|
|
22755
|
-
let [
|
|
22763
|
+
let [o, c] = useState(!1);
|
|
22756
22764
|
useEffect(() => {
|
|
22757
|
-
let e = requestAnimationFrame(() =>
|
|
22765
|
+
let e = requestAnimationFrame(() => c(!0));
|
|
22758
22766
|
return () => cancelAnimationFrame(e);
|
|
22759
22767
|
}, []), useEffect(() => {
|
|
22760
22768
|
if (e.animationState !== "exiting") return;
|
|
@@ -22765,7 +22773,7 @@ function ToastWrapper({ toast: e, remainingTime: t, onExitComplete: n, onClose:
|
|
|
22765
22773
|
e.id,
|
|
22766
22774
|
n
|
|
22767
22775
|
]);
|
|
22768
|
-
let u = useCallback(() => r(e.id), [r, e.id]), f =
|
|
22776
|
+
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
22777
|
return /* @__PURE__ */ jsx("div", {
|
|
22770
22778
|
className: cn("pointer-events-auto", computeAnimationClasses(f, e.position)),
|
|
22771
22779
|
onMouseEnter: i,
|
|
@@ -22774,11 +22782,11 @@ function ToastWrapper({ toast: e, remainingTime: t, onExitComplete: n, onClose:
|
|
|
22774
22782
|
});
|
|
22775
22783
|
}
|
|
22776
22784
|
function useToastTimers(e, t) {
|
|
22777
|
-
let [n, r] = useState(() => /* @__PURE__ */ new Map()), i = useRef(/* @__PURE__ */ new Map()), a = useRef(null),
|
|
22785
|
+
let [n, r] = useState(() => /* @__PURE__ */ new Map()), i = useRef(/* @__PURE__ */ new Map()), a = useRef(null), o = useRef(!1), c = useCallback((e) => {
|
|
22778
22786
|
let t = i.current.get(e);
|
|
22779
22787
|
t?.timeoutId && clearTimeout(t.timeoutId);
|
|
22780
22788
|
}, []), u = useCallback((e, n) => {
|
|
22781
|
-
|
|
22789
|
+
c(e.id);
|
|
22782
22790
|
let a = n ?? e.duration, o = Date.now(), s = window.setTimeout(() => {
|
|
22783
22791
|
t.current.set(e.id, "timeout"), toastStore.remove(e.id);
|
|
22784
22792
|
}, a);
|
|
@@ -22789,7 +22797,7 @@ function useToastTimers(e, t) {
|
|
|
22789
22797
|
isPaused: !1,
|
|
22790
22798
|
refreshedAt: e._refreshedAt
|
|
22791
22799
|
}), r((t) => new Map(t).set(e.id, a));
|
|
22792
|
-
}, [
|
|
22800
|
+
}, [c, t]), f = useCallback(() => {
|
|
22793
22801
|
a.current ||= window.setInterval(() => {
|
|
22794
22802
|
let e = Date.now();
|
|
22795
22803
|
r((t) => {
|
|
@@ -22803,8 +22811,8 @@ function useToastTimers(e, t) {
|
|
|
22803
22811
|
});
|
|
22804
22812
|
}, COUNTDOWN_INTERVAL_MS);
|
|
22805
22813
|
}, []), h = useCallback(() => {
|
|
22806
|
-
if (
|
|
22807
|
-
|
|
22814
|
+
if (o.current) return;
|
|
22815
|
+
o.current = !0;
|
|
22808
22816
|
let e = Date.now();
|
|
22809
22817
|
i.current.forEach((t, n) => {
|
|
22810
22818
|
t.timeoutId && clearTimeout(t.timeoutId);
|
|
@@ -22816,18 +22824,18 @@ function useToastTimers(e, t) {
|
|
|
22816
22824
|
isPaused: !0
|
|
22817
22825
|
});
|
|
22818
22826
|
}), a.current &&= (clearInterval(a.current), null);
|
|
22819
|
-
}, []),
|
|
22820
|
-
|
|
22827
|
+
}, []), g = useCallback(() => {
|
|
22828
|
+
o.current && (o.current = !1, i.current.forEach((t, n) => {
|
|
22821
22829
|
if (t.isPaused && t.remainingTime > 0) {
|
|
22822
22830
|
let r = e.find((e) => e.id === n);
|
|
22823
22831
|
r && u(r, t.remainingTime);
|
|
22824
22832
|
}
|
|
22825
|
-
}),
|
|
22833
|
+
}), f());
|
|
22826
22834
|
}, [
|
|
22827
22835
|
e,
|
|
22828
22836
|
u,
|
|
22829
|
-
|
|
22830
|
-
]),
|
|
22837
|
+
f
|
|
22838
|
+
]), to = useCallback((e) => {
|
|
22831
22839
|
i.current.delete(e), r((t) => {
|
|
22832
22840
|
let n = new Map(t);
|
|
22833
22841
|
return n.delete(e), n;
|
|
@@ -22838,32 +22846,32 @@ function useToastTimers(e, t) {
|
|
|
22838
22846
|
if (e.persistent) return;
|
|
22839
22847
|
let t = i.current.get(e.id);
|
|
22840
22848
|
t ? t.refreshedAt !== e._refreshedAt && u(e) : u(e);
|
|
22841
|
-
}), e.some((e) => !e.persistent) &&
|
|
22849
|
+
}), e.some((e) => !e.persistent) && f();
|
|
22842
22850
|
}, [
|
|
22843
22851
|
e,
|
|
22844
22852
|
u,
|
|
22845
|
-
|
|
22853
|
+
f
|
|
22846
22854
|
]), useEffect(() => () => {
|
|
22847
22855
|
a.current && clearInterval(a.current);
|
|
22848
22856
|
}, []), {
|
|
22849
22857
|
remainingTimes: n,
|
|
22850
22858
|
pauseAll: h,
|
|
22851
|
-
resumeAll:
|
|
22852
|
-
cleanupTimer:
|
|
22859
|
+
resumeAll: g,
|
|
22860
|
+
cleanupTimer: to
|
|
22853
22861
|
};
|
|
22854
22862
|
}
|
|
22855
22863
|
function Toaster() {
|
|
22856
|
-
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()),
|
|
22864
|
+
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: no } = useToastTimers(e, a);
|
|
22857
22865
|
useEffect(() => toastStore.subscribe(t), []);
|
|
22858
|
-
let
|
|
22866
|
+
let ro = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), A = useCallback((e) => {
|
|
22859
22867
|
e.callbacks?.onOpen?.();
|
|
22860
|
-
}, []),
|
|
22868
|
+
}, []), io = useCallback((e, t) => {
|
|
22861
22869
|
t === "manual" ? e.callbacks?.onClose?.() : e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
22862
22870
|
}, []);
|
|
22863
22871
|
useEffect(() => {
|
|
22864
|
-
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])),
|
|
22865
|
-
|
|
22866
|
-
|
|
22872
|
+
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
22873
|
+
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
22874
|
+
io(e, a.current.get(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
22867
22875
|
}), r((r) => {
|
|
22868
22876
|
let i = r.map((e) => {
|
|
22869
22877
|
let t = n.get(e.id);
|
|
@@ -22872,36 +22880,36 @@ function Toaster() {
|
|
|
22872
22880
|
content: t.content,
|
|
22873
22881
|
duration: t.duration
|
|
22874
22882
|
} : e;
|
|
22875
|
-
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !
|
|
22883
|
+
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (A(e), {
|
|
22876
22884
|
...e,
|
|
22877
22885
|
animationState: "entering"
|
|
22878
22886
|
})), ...i];
|
|
22879
|
-
return
|
|
22887
|
+
return o.current = a, a;
|
|
22880
22888
|
}), i.current = t;
|
|
22881
22889
|
}, [
|
|
22882
22890
|
e,
|
|
22883
22891
|
A,
|
|
22884
|
-
|
|
22892
|
+
io
|
|
22885
22893
|
]);
|
|
22886
|
-
let
|
|
22894
|
+
let ao = useCallback((e) => {
|
|
22887
22895
|
r((t) => {
|
|
22888
22896
|
let n = t.filter((t) => t.id !== e);
|
|
22889
|
-
return
|
|
22890
|
-
}),
|
|
22891
|
-
}, [
|
|
22897
|
+
return o.current = n, n;
|
|
22898
|
+
}), no(e), toastStore.cleanup(e);
|
|
22899
|
+
}, [no]), oo = useCallback((e) => {
|
|
22892
22900
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
22893
22901
|
}, []);
|
|
22894
|
-
if (!
|
|
22895
|
-
let
|
|
22896
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment, { children: Object.entries(
|
|
22902
|
+
if (!ro) return null;
|
|
22903
|
+
let so = groupByPosition(n);
|
|
22904
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(so).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
22897
22905
|
className: cn("pointer-events-none fixed z-1000 flex flex-col items-end gap-2 p-4", POSITION_CLASSES[e]),
|
|
22898
22906
|
children: t.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
22899
22907
|
toast: e,
|
|
22900
|
-
remainingTime:
|
|
22901
|
-
onExitComplete:
|
|
22902
|
-
onClose:
|
|
22908
|
+
remainingTime: c.get(e.id) ?? e.duration,
|
|
22909
|
+
onExitComplete: ao,
|
|
22910
|
+
onClose: oo,
|
|
22903
22911
|
onHoverStart: u,
|
|
22904
|
-
onHoverEnd:
|
|
22912
|
+
onHoverEnd: f
|
|
22905
22913
|
}, e.id))
|
|
22906
22914
|
}, e)) }), document.body);
|
|
22907
22915
|
}
|
|
@@ -23107,13 +23115,13 @@ function InfoTooltip({ className: e, ...t }) {
|
|
|
23107
23115
|
});
|
|
23108
23116
|
}
|
|
23109
23117
|
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"),
|
|
23118
|
+
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
23119
|
n(!c);
|
|
23112
23120
|
};
|
|
23113
23121
|
function O(e) {
|
|
23114
23122
|
p(e), a?.(e);
|
|
23115
23123
|
}
|
|
23116
|
-
let
|
|
23124
|
+
let ro = {
|
|
23117
23125
|
fire: [{
|
|
23118
23126
|
id: "fire",
|
|
23119
23127
|
tooltip: "Mark as fire",
|
|
@@ -23180,7 +23188,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23180
23188
|
/* @__PURE__ */ jsx(Checkbox, {
|
|
23181
23189
|
checked: c,
|
|
23182
23190
|
indeterminate: l,
|
|
23183
|
-
onChange:
|
|
23191
|
+
onChange: h,
|
|
23184
23192
|
icon: /* @__PURE__ */ jsx(CheckboxIcon, {
|
|
23185
23193
|
size: 16,
|
|
23186
23194
|
className: "text-white-variant-7"
|
|
@@ -23194,7 +23202,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23194
23202
|
}),
|
|
23195
23203
|
/* @__PURE__ */ jsx("div", {
|
|
23196
23204
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23197
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment, { children: Object.entries(
|
|
23205
|
+
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(ro).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
23198
23206
|
className: "flex items-center gap-2 px-1",
|
|
23199
23207
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23200
23208
|
content: e.tooltip,
|
|
@@ -23227,20 +23235,59 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23227
23235
|
}
|
|
23228
23236
|
var filterButtonStyles = tv({
|
|
23229
23237
|
slots: {
|
|
23230
|
-
root: "inline-flex w-fit items-center gap-1 rounded-full border px-2 py-1 transition-colors",
|
|
23238
|
+
root: "inline-flex w-fit items-center gap-1 rounded-full border-[1.5px] px-2 py-1 transition-colors",
|
|
23231
23239
|
label: "flex shrink-0 items-center gap-1 text-xs whitespace-nowrap"
|
|
23232
23240
|
},
|
|
23233
|
-
variants: {
|
|
23234
|
-
|
|
23235
|
-
|
|
23236
|
-
|
|
23241
|
+
variants: {
|
|
23242
|
+
variant: {
|
|
23243
|
+
custom: {},
|
|
23244
|
+
fire: {},
|
|
23245
|
+
unread: {},
|
|
23246
|
+
insight: {},
|
|
23247
|
+
done: {}
|
|
23237
23248
|
},
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23249
|
+
selected: {
|
|
23250
|
+
false: {
|
|
23251
|
+
root: "border-neutral-300 bg-white hover:border-neutral-500-variant-4 hover:bg-neutral-100",
|
|
23252
|
+
label: "font-semibold text-neutral-800 opacity-80 group-hover:opacity-100"
|
|
23253
|
+
},
|
|
23254
|
+
true: {
|
|
23255
|
+
root: "bg-white hover:bg-white",
|
|
23256
|
+
label: "font-semibold text-neutral-900"
|
|
23257
|
+
}
|
|
23241
23258
|
}
|
|
23242
|
-
}
|
|
23243
|
-
|
|
23259
|
+
},
|
|
23260
|
+
compoundVariants: [
|
|
23261
|
+
{
|
|
23262
|
+
variant: "custom",
|
|
23263
|
+
selected: !0,
|
|
23264
|
+
class: { root: "border-primary-400 hover:border-primary-400" }
|
|
23265
|
+
},
|
|
23266
|
+
{
|
|
23267
|
+
variant: "fire",
|
|
23268
|
+
selected: !0,
|
|
23269
|
+
class: { root: "border-tertiary-400 hover:border-tertiary-500" }
|
|
23270
|
+
},
|
|
23271
|
+
{
|
|
23272
|
+
variant: "unread",
|
|
23273
|
+
selected: !0,
|
|
23274
|
+
class: { root: "border-primary-400 hover:border-primary-500" }
|
|
23275
|
+
},
|
|
23276
|
+
{
|
|
23277
|
+
variant: "insight",
|
|
23278
|
+
selected: !0,
|
|
23279
|
+
class: { root: "border-brand-primary-100 hover:border-brand-primary-200" }
|
|
23280
|
+
},
|
|
23281
|
+
{
|
|
23282
|
+
variant: "done",
|
|
23283
|
+
selected: !0,
|
|
23284
|
+
class: { root: "border-success-base hover:border-success-base" }
|
|
23285
|
+
}
|
|
23286
|
+
],
|
|
23287
|
+
defaultVariants: {
|
|
23288
|
+
variant: "custom",
|
|
23289
|
+
selected: !1
|
|
23290
|
+
}
|
|
23244
23291
|
}), FILTER_BUTTON_META = {
|
|
23245
23292
|
fire: {
|
|
23246
23293
|
icon: FireIcon,
|
|
@@ -23263,7 +23310,7 @@ var filterButtonStyles = tv({
|
|
|
23263
23310
|
iconColor: "text-success-base"
|
|
23264
23311
|
}
|
|
23265
23312
|
};
|
|
23266
|
-
function renderIcon(e, t) {
|
|
23313
|
+
function renderIcon$1(e, t) {
|
|
23267
23314
|
return typeof e == "function" ? /* @__PURE__ */ jsx(e, {
|
|
23268
23315
|
size: 20,
|
|
23269
23316
|
className: t
|
|
@@ -23273,18 +23320,21 @@ function renderIcon(e, t) {
|
|
|
23273
23320
|
});
|
|
23274
23321
|
}
|
|
23275
23322
|
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({
|
|
23323
|
+
let c = !!o, l = filterButtonStyles({
|
|
23324
|
+
variant: e,
|
|
23325
|
+
selected: !c && r
|
|
23326
|
+
}), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label, eo = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
|
|
23277
23327
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23278
23328
|
...s,
|
|
23279
23329
|
disabled: o,
|
|
23280
|
-
"aria-label": s["aria-label"] ??
|
|
23330
|
+
"aria-label": s["aria-label"] ?? p,
|
|
23281
23331
|
className: cn("group", l.root(), c && "border-neutral-300 bg-white hover:border-neutral-300", a?.root),
|
|
23282
23332
|
children: [f && /* @__PURE__ */ jsx("span", {
|
|
23283
23333
|
className: cn("flex items-center", a?.icon),
|
|
23284
|
-
children: renderIcon(f, cn("shrink-0",
|
|
23285
|
-
}),
|
|
23334
|
+
children: renderIcon$1(f, cn("shrink-0", eo))
|
|
23335
|
+
}), p && /* @__PURE__ */ jsxs("span", {
|
|
23286
23336
|
className: cn(l.label(), c && "font-medium text-neutral-400", a?.label),
|
|
23287
|
-
children: [/* @__PURE__ */ jsx("span", { children:
|
|
23337
|
+
children: [/* @__PURE__ */ jsx("span", { children: p }), typeof n == "number" && n > 0 && /* @__PURE__ */ jsxs("span", {
|
|
23288
23338
|
"aria-label": `${n} items`,
|
|
23289
23339
|
className: cn("font-medium", a?.count),
|
|
23290
23340
|
children: [
|
|
@@ -23380,47 +23430,111 @@ var iconCountButtonStyles = tv({
|
|
|
23380
23430
|
status: "active"
|
|
23381
23431
|
}
|
|
23382
23432
|
});
|
|
23383
|
-
function
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23433
|
+
function formatCount(e, t = 99) {
|
|
23434
|
+
return e > t ? `${t}+` : String(e);
|
|
23435
|
+
}
|
|
23436
|
+
function renderIcon(e, t) {
|
|
23437
|
+
return cloneElement(e, {
|
|
23438
|
+
size: e.props.size ?? 20,
|
|
23439
|
+
className: cn(t, e.props.className)
|
|
23388
23440
|
});
|
|
23389
|
-
|
|
23390
|
-
|
|
23441
|
+
}
|
|
23442
|
+
function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition: n, onMouseEnter: r, onMouseLeave: i, onToggle: a }) {
|
|
23443
|
+
let o = t && !e, s = e ? "Clear" : "Only", c = e ? "Reset state" : "Activate state";
|
|
23444
|
+
return createPortal(/* @__PURE__ */ jsx("div", {
|
|
23445
|
+
className: "flex",
|
|
23446
|
+
style: {
|
|
23447
|
+
position: "fixed",
|
|
23448
|
+
top: n.top,
|
|
23449
|
+
left: n.left,
|
|
23450
|
+
zIndex: 100
|
|
23451
|
+
},
|
|
23452
|
+
children: /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23453
|
+
content: s,
|
|
23454
|
+
position: "right-end",
|
|
23455
|
+
children: /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx("div", {
|
|
23456
|
+
role: "button",
|
|
23457
|
+
tabIndex: 0,
|
|
23458
|
+
"aria-pressed": e,
|
|
23459
|
+
"aria-label": c,
|
|
23460
|
+
className: "flex size-5 cursor-pointer items-center justify-center rounded-full bg-white",
|
|
23461
|
+
onMouseEnter: r,
|
|
23462
|
+
onMouseLeave: i,
|
|
23463
|
+
onClick: a,
|
|
23464
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
23465
|
+
className: cn("flex size-4 items-center justify-center rounded-full border", e ? "border-tertiary-500" : "border-neutral-800"),
|
|
23466
|
+
children: [o && /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full bg-neutral-800" }), e && /* @__PURE__ */ jsx(CloseIcon, {
|
|
23467
|
+
size: 12,
|
|
23468
|
+
className: "text-tertiary-500"
|
|
23469
|
+
})]
|
|
23470
|
+
})
|
|
23471
|
+
}) })
|
|
23472
|
+
})
|
|
23473
|
+
}), document.body);
|
|
23474
|
+
}
|
|
23475
|
+
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: f, classNames: h, ...g }) {
|
|
23476
|
+
let O = iconCountButtonStyles({
|
|
23477
|
+
variant: r,
|
|
23478
|
+
orientation: i,
|
|
23479
|
+
status: a
|
|
23480
|
+
}), ro = useRef(null), [A, io] = useState(!1), [ao, oo] = useState(!1), [so, co] = useState(l), [lo, R] = useState(null), uo = c ?? so, fo = s && (A || ao || uo), po = typeof n == "number" && n > 0 && (o || a === "active");
|
|
23481
|
+
function mo(e) {
|
|
23482
|
+
c === void 0 && co(e), f?.(e);
|
|
23391
23483
|
}
|
|
23392
|
-
return
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
23484
|
+
return useLayoutEffect(() => {
|
|
23485
|
+
if (!fo || !ro.current) return;
|
|
23486
|
+
function e() {
|
|
23487
|
+
let e = ro.current?.getBoundingClientRect();
|
|
23488
|
+
e && R({
|
|
23489
|
+
top: e.top - 6,
|
|
23490
|
+
left: e.right - 14
|
|
23491
|
+
});
|
|
23492
|
+
}
|
|
23493
|
+
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
23494
|
+
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
23495
|
+
};
|
|
23496
|
+
}, [fo]), /* @__PURE__ */ jsxs(Button, {
|
|
23497
|
+
...g,
|
|
23498
|
+
className: cn(O.root(), h?.root),
|
|
23499
|
+
onMouseEnter: () => io(!0),
|
|
23500
|
+
onMouseLeave: () => io(!1),
|
|
23501
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
23502
|
+
className: "relative",
|
|
23503
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
23504
|
+
ref: ro,
|
|
23505
|
+
className: cn(O.bubble(), h?.bubble),
|
|
23506
|
+
children: renderIcon(e, O.icon())
|
|
23507
|
+
}), fo && lo && typeof document < "u" && ToggleControlPortal({
|
|
23508
|
+
isPressed: uo,
|
|
23509
|
+
isPortalHovered: ao,
|
|
23510
|
+
portalPosition: lo,
|
|
23511
|
+
onMouseEnter: () => oo(!0),
|
|
23512
|
+
onMouseLeave: () => oo(!1),
|
|
23513
|
+
onToggle: () => mo(!uo)
|
|
23514
|
+
})]
|
|
23401
23515
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23402
|
-
className: cn(
|
|
23403
|
-
children: [/* @__PURE__ */ jsx("span", { children: t }),
|
|
23516
|
+
className: cn(O.label(), h?.label),
|
|
23517
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), po && /* @__PURE__ */ jsxs("span", {
|
|
23404
23518
|
"aria-label": `${n} items`,
|
|
23405
|
-
className: cn(
|
|
23519
|
+
className: cn(O.count(), h?.count),
|
|
23406
23520
|
children: [
|
|
23407
23521
|
"(",
|
|
23408
|
-
|
|
23522
|
+
formatCount(n),
|
|
23409
23523
|
")"
|
|
23410
23524
|
]
|
|
23411
23525
|
})]
|
|
23412
23526
|
})]
|
|
23413
23527
|
});
|
|
23414
23528
|
}
|
|
23415
|
-
function ActionMenuItem({ icon: e, label: t, className: n, selected:
|
|
23529
|
+
function ActionMenuItem({ icon: e, label: t, className: n, selected: r, ...a }) {
|
|
23416
23530
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23417
|
-
className: cn("flex items-center justify-start gap-2 bg-white px-3 py-2 hover:bg-neutral-100",
|
|
23531
|
+
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
23532
|
...a,
|
|
23419
23533
|
children: [e && cloneElement(e, {
|
|
23420
23534
|
size: e.props.size ?? 16,
|
|
23421
|
-
className: cn(
|
|
23535
|
+
className: cn(r ? "text-white" : "text-neutral-600-variant-7", e.props.className)
|
|
23422
23536
|
}), /* @__PURE__ */ jsx("span", {
|
|
23423
|
-
className: cn("text-xs font-medium transition-colors",
|
|
23537
|
+
className: cn("text-xs font-medium transition-colors", r ? "text-white" : "text-neutral-900"),
|
|
23424
23538
|
children: t
|
|
23425
23539
|
})]
|
|
23426
23540
|
});
|
|
@@ -23434,7 +23548,7 @@ function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
|
23434
23548
|
});
|
|
23435
23549
|
}
|
|
23436
23550
|
function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
|
|
23437
|
-
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s,
|
|
23551
|
+
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), h = useRef(n), [g, O] = useState(() => {
|
|
23438
23552
|
let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
|
|
23439
23553
|
return {
|
|
23440
23554
|
year: r.getFullYear(),
|
|
@@ -23442,7 +23556,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23442
23556
|
};
|
|
23443
23557
|
});
|
|
23444
23558
|
useEffect(() => {
|
|
23445
|
-
(e === "single" && t && (!
|
|
23559
|
+
(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
23560
|
if (e === "single" && t) O({
|
|
23447
23561
|
year: t.getFullYear(),
|
|
23448
23562
|
month: t.getMonth()
|
|
@@ -23454,13 +23568,13 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23454
23568
|
month: e.getMonth()
|
|
23455
23569
|
});
|
|
23456
23570
|
}
|
|
23457
|
-
}),
|
|
23571
|
+
}), u.current = t, h.current = n;
|
|
23458
23572
|
}, [
|
|
23459
23573
|
e,
|
|
23460
23574
|
t,
|
|
23461
23575
|
n
|
|
23462
23576
|
]);
|
|
23463
|
-
let
|
|
23577
|
+
let ro = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
|
|
23464
23578
|
function A(t) {
|
|
23465
23579
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23466
23580
|
if ((o !== g.month || s !== g.year) && O({
|
|
@@ -23478,7 +23592,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23478
23592
|
}), a());
|
|
23479
23593
|
}
|
|
23480
23594
|
}
|
|
23481
|
-
function
|
|
23595
|
+
function io() {
|
|
23482
23596
|
O((e) => e.month === 0 ? {
|
|
23483
23597
|
year: e.year - 1,
|
|
23484
23598
|
month: 11
|
|
@@ -23487,7 +23601,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23487
23601
|
month: e.month - 1
|
|
23488
23602
|
});
|
|
23489
23603
|
}
|
|
23490
|
-
function
|
|
23604
|
+
function ao() {
|
|
23491
23605
|
O((e) => e.month === 11 ? {
|
|
23492
23606
|
year: e.year + 1,
|
|
23493
23607
|
month: 0
|
|
@@ -23496,7 +23610,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23496
23610
|
month: e.month + 1
|
|
23497
23611
|
});
|
|
23498
23612
|
}
|
|
23499
|
-
let
|
|
23613
|
+
let oo = getWeekdays();
|
|
23500
23614
|
return /* @__PURE__ */ jsxs("div", {
|
|
23501
23615
|
className: "mt-1 w-fit rounded-lg border border-neutral-400 bg-white p-2 shadow-lg",
|
|
23502
23616
|
children: [
|
|
@@ -23508,7 +23622,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23508
23622
|
direction: "left",
|
|
23509
23623
|
size: 20
|
|
23510
23624
|
}),
|
|
23511
|
-
onClick:
|
|
23625
|
+
onClick: io,
|
|
23512
23626
|
className: "hover:opacity-60",
|
|
23513
23627
|
"aria-label": "Previous month"
|
|
23514
23628
|
}),
|
|
@@ -23525,7 +23639,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23525
23639
|
direction: "right",
|
|
23526
23640
|
size: 20
|
|
23527
23641
|
}),
|
|
23528
|
-
onClick:
|
|
23642
|
+
onClick: ao,
|
|
23529
23643
|
className: "hover:opacity-60",
|
|
23530
23644
|
"aria-label": "Next month"
|
|
23531
23645
|
})
|
|
@@ -23533,31 +23647,31 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23533
23647
|
}),
|
|
23534
23648
|
/* @__PURE__ */ jsx("div", {
|
|
23535
23649
|
className: "mb-2 grid grid-cols-7",
|
|
23536
|
-
children:
|
|
23650
|
+
children: oo.map((e) => /* @__PURE__ */ jsx("div", {
|
|
23537
23651
|
className: "flex items-center justify-center p-0.5 text-[9px] font-bold text-neutral-900",
|
|
23538
23652
|
children: e
|
|
23539
23653
|
}, e))
|
|
23540
23654
|
}),
|
|
23541
23655
|
/* @__PURE__ */ jsx("div", {
|
|
23542
23656
|
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
|
|
23657
|
+
children: ro.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
23658
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), eo = f && isSameDay(i, f), h = u, g = s;
|
|
23659
|
+
e === "range" && u && !f && s && !isDateBefore(s, u) ? (h = u, g = s) : (h = null, g = null);
|
|
23660
|
+
let no = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, h, g)), O = l || p || eo;
|
|
23547
23661
|
return /* @__PURE__ */ jsx(Button, {
|
|
23548
23662
|
type: "button",
|
|
23549
23663
|
onClick: () => A(i),
|
|
23550
23664
|
onMouseEnter: () => {
|
|
23551
|
-
e === "range" && u && !f && !isDateBefore(i, u) &&
|
|
23665
|
+
e === "range" && u && !f && !isDateBefore(i, u) && c(i);
|
|
23552
23666
|
},
|
|
23553
23667
|
onMouseLeave: () => {
|
|
23554
|
-
e === "range" &&
|
|
23668
|
+
e === "range" && c(null);
|
|
23555
23669
|
},
|
|
23556
23670
|
className: "p-0.5",
|
|
23557
23671
|
"aria-label": `Select ${formatDate(i)}`,
|
|
23558
23672
|
"aria-selected": O || void 0,
|
|
23559
23673
|
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",
|
|
23674
|
+
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", no && !O && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !O && !no && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !O && !no && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
23561
23675
|
children: r
|
|
23562
23676
|
})
|
|
23563
23677
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -23583,7 +23697,7 @@ function DatePickerTrigger({ displayText: e, disabled: t, className: n, onClear:
|
|
|
23583
23697
|
className: "font-semibold",
|
|
23584
23698
|
children: "Date"
|
|
23585
23699
|
}),
|
|
23586
|
-
e && /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("span", {
|
|
23700
|
+
e && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("span", {
|
|
23587
23701
|
className: "font-normal",
|
|
23588
23702
|
children: [
|
|
23589
23703
|
"(",
|
|
@@ -23619,19 +23733,19 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23619
23733
|
startDate: null,
|
|
23620
23734
|
endDate: null
|
|
23621
23735
|
};
|
|
23622
|
-
function
|
|
23736
|
+
function h(t) {
|
|
23623
23737
|
e === "single" && (u || s(t), r?.(t));
|
|
23624
23738
|
}
|
|
23625
|
-
function
|
|
23739
|
+
function no(t) {
|
|
23626
23740
|
e === "range" && (u || l(t), r?.(t));
|
|
23627
23741
|
}
|
|
23628
23742
|
function O() {
|
|
23629
|
-
e === "single" ?
|
|
23743
|
+
e === "single" ? h(null) : no({
|
|
23630
23744
|
startDate: null,
|
|
23631
23745
|
endDate: null
|
|
23632
23746
|
});
|
|
23633
23747
|
}
|
|
23634
|
-
return /* @__PURE__ */ jsx(Fragment, { children: /* @__PURE__ */ jsx(Dropdown, {
|
|
23748
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children: /* @__PURE__ */ jsx(Dropdown, {
|
|
23635
23749
|
trigger: /* @__PURE__ */ jsx(DatePickerTrigger, {
|
|
23636
23750
|
displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
|
|
23637
23751
|
disabled: i,
|
|
@@ -23643,8 +23757,8 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23643
23757
|
mode: e,
|
|
23644
23758
|
selectedDate: f,
|
|
23645
23759
|
selectedRange: p,
|
|
23646
|
-
onDateSelect:
|
|
23647
|
-
onRangeSelect:
|
|
23760
|
+
onDateSelect: h,
|
|
23761
|
+
onRangeSelect: no
|
|
23648
23762
|
})
|
|
23649
23763
|
}) });
|
|
23650
23764
|
}
|
|
@@ -23782,49 +23896,50 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
23782
23896
|
}) })
|
|
23783
23897
|
});
|
|
23784
23898
|
}
|
|
23785
|
-
function EventCard({ icon: e,
|
|
23899
|
+
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: eo = {}, actions: h = {}, density: g = "normal", className: O, style: ro, isPriority: A = !1 }) {
|
|
23786
23900
|
return /* @__PURE__ */ jsx(Card, {
|
|
23787
23901
|
as: Pressable,
|
|
23788
|
-
onPress:
|
|
23789
|
-
className: cn("w-full rounded-lg border-[1.5px]
|
|
23790
|
-
style:
|
|
23791
|
-
|
|
23902
|
+
onPress: u,
|
|
23903
|
+
className: cn("w-full rounded-lg border-[1.5px] bg-white-variant-5 p-4", A ? "hover:bg-tertiary-500-variant-4" : "hover:bg-primary-light", !c && !A && "border-primary-400", !c && A && "border-tertiary-500-variant-2", c && !A && "border-neutral-400", c && A && "border-tertiary-500-variant-3", l && !A && "border-primary-500 bg-primary-light", l && A && "border-tertiary-500-variant-2 bg-tertiary-500-variant-4", g === "normal" ? `${EVENT_CARD_HEIGHT_SIZE.normal.style}` : `${EVENT_CARD_HEIGHT_SIZE.compact.style}`, O),
|
|
23904
|
+
style: ro,
|
|
23905
|
+
"data-service": t,
|
|
23906
|
+
children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
23792
23907
|
className: "gap-x-2 gap-y-1",
|
|
23793
23908
|
children: [
|
|
23794
23909
|
/* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
23795
|
-
checked:
|
|
23796
|
-
onCheckedChange:
|
|
23910
|
+
checked: f,
|
|
23911
|
+
onCheckedChange: p
|
|
23797
23912
|
}) }),
|
|
23798
23913
|
/* @__PURE__ */ jsxs(CardHeader, {
|
|
23799
23914
|
className: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto] items-center gap-2",
|
|
23800
23915
|
children: [
|
|
23801
23916
|
e,
|
|
23802
23917
|
/* @__PURE__ */ jsx("span", {
|
|
23803
|
-
className: cn("min-w-0 -translate-x-0.5 truncate text-sm font-bold text-neutral-900",
|
|
23804
|
-
children:
|
|
23918
|
+
className: cn("min-w-0 -translate-x-0.5 truncate text-sm font-bold text-neutral-900", c && "font-medium"),
|
|
23919
|
+
children: n
|
|
23805
23920
|
}),
|
|
23806
23921
|
/* @__PURE__ */ jsx("span", {
|
|
23807
23922
|
className: "text-xs leading-tight font-semibold tracking-wide whitespace-nowrap text-neutral-800",
|
|
23808
|
-
children:
|
|
23923
|
+
children: a
|
|
23809
23924
|
}),
|
|
23810
23925
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
23811
|
-
content:
|
|
23812
|
-
children: /* @__PURE__ */ jsx(Avatar, { name:
|
|
23926
|
+
content: s,
|
|
23927
|
+
children: /* @__PURE__ */ jsx(Avatar, { name: s })
|
|
23813
23928
|
})
|
|
23814
23929
|
]
|
|
23815
23930
|
}),
|
|
23816
23931
|
/* @__PURE__ */ jsx(CardTitle, {
|
|
23817
|
-
className: cn("line-clamp-1 text-sm font-bold text-neutral-900",
|
|
23818
|
-
children:
|
|
23932
|
+
className: cn("line-clamp-1 text-sm font-bold text-neutral-900", c && "font-medium"),
|
|
23933
|
+
children: r
|
|
23819
23934
|
}),
|
|
23820
23935
|
/* @__PURE__ */ jsx(CardContent, {
|
|
23821
23936
|
className: "line-clamp-2 min-w-0 text-sm text-neutral-900",
|
|
23822
|
-
children:
|
|
23937
|
+
children: i
|
|
23823
23938
|
}),
|
|
23824
23939
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
23825
23940
|
className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1",
|
|
23826
|
-
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges:
|
|
23827
|
-
actions:
|
|
23941
|
+
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: eo }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
23942
|
+
actions: h,
|
|
23828
23943
|
className: "col-start-2 justify-self-end"
|
|
23829
23944
|
})]
|
|
23830
23945
|
})
|
|
@@ -23834,23 +23949,23 @@ function EventCard({ icon: e, sender: t, title: n, content: r, timestamp: i, tim
|
|
|
23834
23949
|
children: [/* @__PURE__ */ jsx(CardSidebar, {
|
|
23835
23950
|
className: "flex items-center justify-center",
|
|
23836
23951
|
children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
23837
|
-
checked:
|
|
23838
|
-
onCheckedChange:
|
|
23952
|
+
checked: f,
|
|
23953
|
+
onCheckedChange: p
|
|
23839
23954
|
})
|
|
23840
23955
|
}), /* @__PURE__ */ jsxs(CardHeader, {
|
|
23841
23956
|
className: "flex min-w-0 items-center gap-2",
|
|
23842
23957
|
children: [
|
|
23843
23958
|
e,
|
|
23844
23959
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
23845
|
-
statusBadges:
|
|
23846
|
-
density:
|
|
23960
|
+
statusBadges: eo,
|
|
23961
|
+
density: g
|
|
23847
23962
|
}),
|
|
23848
23963
|
/* @__PURE__ */ jsxs("div", {
|
|
23849
|
-
className: cn("flex min-w-0 items-center gap-2 text-sm font-bold whitespace-nowrap text-neutral-900",
|
|
23964
|
+
className: cn("flex min-w-0 items-center gap-2 text-sm font-bold whitespace-nowrap text-neutral-900", c && "font-medium"),
|
|
23850
23965
|
children: [
|
|
23851
23966
|
/* @__PURE__ */ jsx("span", {
|
|
23852
23967
|
className: "truncate",
|
|
23853
|
-
children:
|
|
23968
|
+
children: n
|
|
23854
23969
|
}),
|
|
23855
23970
|
/* @__PURE__ */ jsx("span", {
|
|
23856
23971
|
className: "shrink-0 text-sm text-neutral-500",
|
|
@@ -23858,31 +23973,69 @@ function EventCard({ icon: e, sender: t, title: n, content: r, timestamp: i, tim
|
|
|
23858
23973
|
}),
|
|
23859
23974
|
/* @__PURE__ */ jsx("span", {
|
|
23860
23975
|
className: "truncate",
|
|
23861
|
-
children:
|
|
23976
|
+
children: r
|
|
23862
23977
|
})
|
|
23863
23978
|
]
|
|
23864
23979
|
}),
|
|
23865
23980
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
23866
|
-
/* @__PURE__ */ jsx(EventActionsList, { actions:
|
|
23981
|
+
/* @__PURE__ */ jsx(EventActionsList, { actions: h }),
|
|
23867
23982
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
23868
|
-
content:
|
|
23983
|
+
content: o,
|
|
23869
23984
|
children: /* @__PURE__ */ jsx("span", {
|
|
23870
23985
|
className: "text-xs leading-tight font-semibold tracking-wide whitespace-nowrap text-neutral-800",
|
|
23871
|
-
children:
|
|
23986
|
+
children: a
|
|
23872
23987
|
})
|
|
23873
23988
|
}),
|
|
23874
23989
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
23875
|
-
content:
|
|
23876
|
-
children: /* @__PURE__ */ jsx(Avatar, { name:
|
|
23990
|
+
content: s,
|
|
23991
|
+
children: /* @__PURE__ */ jsx(Avatar, { name: s })
|
|
23877
23992
|
})
|
|
23878
23993
|
]
|
|
23879
23994
|
})]
|
|
23880
23995
|
})
|
|
23881
23996
|
});
|
|
23882
23997
|
}
|
|
23998
|
+
function EventDetailContentDetailsPanel({ title: e, rows: t }) {
|
|
23999
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24000
|
+
className: "flex flex-col gap-2 rounded-lg bg-neutral-100-variant-3 p-4 text-sm text-neutral-800",
|
|
24001
|
+
children: [e && /* @__PURE__ */ jsx("div", {
|
|
24002
|
+
className: "font-bold",
|
|
24003
|
+
children: e
|
|
24004
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
24005
|
+
className: "grid grid-cols-[auto_1fr] gap-x-4 gap-y-1",
|
|
24006
|
+
children: t.map(({ label: e, value: t }) => /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsxs("div", {
|
|
24007
|
+
className: "font-bold",
|
|
24008
|
+
children: [e, ":"]
|
|
24009
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
24010
|
+
className: "font-normal",
|
|
24011
|
+
children: t
|
|
24012
|
+
})] }, e))
|
|
24013
|
+
})]
|
|
24014
|
+
});
|
|
24015
|
+
}
|
|
24016
|
+
function EventDetailContentCalendarDetails({ from: e, to: t, link: n, location: r }) {
|
|
24017
|
+
return /* @__PURE__ */ jsx(EventDetailContentDetailsPanel, { rows: [
|
|
24018
|
+
{
|
|
24019
|
+
label: "From",
|
|
24020
|
+
value: e
|
|
24021
|
+
},
|
|
24022
|
+
{
|
|
24023
|
+
label: "To",
|
|
24024
|
+
value: t
|
|
24025
|
+
},
|
|
24026
|
+
{
|
|
24027
|
+
label: "Link",
|
|
24028
|
+
value: n
|
|
24029
|
+
},
|
|
24030
|
+
{
|
|
24031
|
+
label: "Location",
|
|
24032
|
+
value: r
|
|
24033
|
+
}
|
|
24034
|
+
] });
|
|
24035
|
+
}
|
|
23883
24036
|
function EventDetailPriority({ priorityText: e }) {
|
|
23884
24037
|
return /* @__PURE__ */ jsxs("div", {
|
|
23885
|
-
className: "sticky top-14 z-5 flex min-h-14 shrink-0 items-center gap-4 bg-tertiary-50
|
|
24038
|
+
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
24039
|
children: [/* @__PURE__ */ jsx(FireIcon, {
|
|
23887
24040
|
size: 32,
|
|
23888
24041
|
className: "text-tertiary-500-variant-2"
|
|
@@ -23907,35 +24060,70 @@ function EventDetailSummary({ summary: e }) {
|
|
|
23907
24060
|
})]
|
|
23908
24061
|
});
|
|
23909
24062
|
}
|
|
23910
|
-
function EventDetailContentHeader({ summary: e, priorityText: t,
|
|
24063
|
+
function EventDetailContentHeader({ summary: e, priorityText: t, highlightPriority: n = !1, children: r, className: i }) {
|
|
23911
24064
|
return /* @__PURE__ */ jsxs("div", {
|
|
23912
|
-
className: cn("flex flex-col",
|
|
23913
|
-
children: [
|
|
23914
|
-
className: "
|
|
23915
|
-
|
|
23916
|
-
|
|
24065
|
+
className: cn("flex flex-col", n && "relative", i),
|
|
24066
|
+
children: [
|
|
24067
|
+
n && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 h-full w-1 bg-tertiary-500-variant-2 z-10" }),
|
|
24068
|
+
t != null && /* @__PURE__ */ jsx(EventDetailPriority, { priorityText: t }),
|
|
24069
|
+
/* @__PURE__ */ jsxs("div", {
|
|
24070
|
+
className: "flex flex-col gap-4 p-4",
|
|
24071
|
+
children: [e != null && /* @__PURE__ */ jsx(EventDetailSummary, { summary: e }), r]
|
|
24072
|
+
})
|
|
24073
|
+
]
|
|
23917
24074
|
});
|
|
23918
24075
|
}
|
|
23919
|
-
function EventDetailContentCalendar({ detail: { summary: e, body: t, priorityText: n }, className:
|
|
23920
|
-
return /* @__PURE__ */
|
|
24076
|
+
function EventDetailContentCalendar({ detail: { summary: e, body: t, priorityText: n, from: r, to: i, link: a, location: o }, className: s }) {
|
|
24077
|
+
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
23921
24078
|
summary: e,
|
|
23922
24079
|
priorityText: n,
|
|
23923
|
-
className:
|
|
23924
|
-
children: /* @__PURE__ */ jsx(
|
|
23925
|
-
|
|
24080
|
+
className: s,
|
|
24081
|
+
children: [/* @__PURE__ */ jsx(EventDetailContentCalendarDetails, {
|
|
24082
|
+
from: r,
|
|
24083
|
+
to: i,
|
|
24084
|
+
link: a,
|
|
24085
|
+
location: o
|
|
24086
|
+
}), /* @__PURE__ */ jsx(RichContent, {
|
|
24087
|
+
className: "max-w-[1260px px-4",
|
|
23926
24088
|
content: t
|
|
23927
|
-
})
|
|
24089
|
+
})]
|
|
23928
24090
|
});
|
|
23929
24091
|
}
|
|
23930
|
-
function
|
|
23931
|
-
return /* @__PURE__ */ jsx(
|
|
24092
|
+
function EventDetailContentEmailDetails({ subject: e, to: t, date: n, from: r }) {
|
|
24093
|
+
return /* @__PURE__ */ jsx(EventDetailContentDetailsPanel, { rows: [
|
|
24094
|
+
{
|
|
24095
|
+
label: "Subject",
|
|
24096
|
+
value: e
|
|
24097
|
+
},
|
|
24098
|
+
{
|
|
24099
|
+
label: "To",
|
|
24100
|
+
value: t
|
|
24101
|
+
},
|
|
24102
|
+
{
|
|
24103
|
+
label: "Date",
|
|
24104
|
+
value: n
|
|
24105
|
+
},
|
|
24106
|
+
{
|
|
24107
|
+
label: "From",
|
|
24108
|
+
value: r
|
|
24109
|
+
}
|
|
24110
|
+
] });
|
|
24111
|
+
}
|
|
24112
|
+
function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText: n, subject: r, to: i, date: a, from: o }, className: s }) {
|
|
24113
|
+
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
23932
24114
|
summary: e,
|
|
23933
24115
|
priorityText: n,
|
|
23934
|
-
|
|
23935
|
-
|
|
23936
|
-
|
|
24116
|
+
highlightPriority: !!n,
|
|
24117
|
+
className: s,
|
|
24118
|
+
children: [/* @__PURE__ */ jsx(EventDetailContentEmailDetails, {
|
|
24119
|
+
subject: r,
|
|
24120
|
+
to: i,
|
|
24121
|
+
date: a,
|
|
24122
|
+
from: o
|
|
24123
|
+
}), /* @__PURE__ */ jsx(RichContent, {
|
|
24124
|
+
className: "max-w-[1260px] px-4",
|
|
23937
24125
|
content: t
|
|
23938
|
-
})
|
|
24126
|
+
})]
|
|
23939
24127
|
});
|
|
23940
24128
|
}
|
|
23941
24129
|
function DateSeparator({ timestamp: e }) {
|
|
@@ -23952,7 +24140,7 @@ function DateSeparator({ timestamp: e }) {
|
|
|
23952
24140
|
});
|
|
23953
24141
|
}
|
|
23954
24142
|
function MessageActions({ isPriority: e, onExternalLinkClick: t, onMarkAsFireClick: n }) {
|
|
23955
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [t && /* @__PURE__ */ jsx(IconButton, {
|
|
24143
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [t && /* @__PURE__ */ jsx(IconButton, {
|
|
23956
24144
|
icon: /* @__PURE__ */ jsx(ExternalLinkIcon, { size: 16 }),
|
|
23957
24145
|
className: "inline-flex shrink-0 items-center text-neutral-600 transition-colors hover:text-primary-500",
|
|
23958
24146
|
title: "Open in Slack",
|
|
@@ -24148,7 +24336,7 @@ function PriorityGroup({ group: e, children: t, onPreviousPriority: n, onNextPri
|
|
|
24148
24336
|
onMarkAsNotFireClick: i
|
|
24149
24337
|
}), t]
|
|
24150
24338
|
})]
|
|
24151
|
-
}) : /* @__PURE__ */ jsx(Fragment, { children: t });
|
|
24339
|
+
}) : /* @__PURE__ */ jsx(Fragment$1, { children: t });
|
|
24152
24340
|
}
|
|
24153
24341
|
function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
|
|
24154
24342
|
return /* @__PURE__ */ jsxs("div", {
|
|
@@ -24166,7 +24354,11 @@ function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
|
|
|
24166
24354
|
});
|
|
24167
24355
|
}
|
|
24168
24356
|
function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityText: n }, className: r }) {
|
|
24169
|
-
let i = e.filter((e) => e.isPriority).length, a = useRef(null),
|
|
24357
|
+
let i = e.filter((e) => e.isPriority).length, a = useRef(null), o = useRef(null);
|
|
24358
|
+
useEffect(() => {
|
|
24359
|
+
e.length > 0 && o.current?.scrollIntoView({ behavior: "smooth" });
|
|
24360
|
+
}, [e]);
|
|
24361
|
+
let c = i, u = useCallback((t) => {
|
|
24170
24362
|
if (!a.current) return;
|
|
24171
24363
|
let n = Array.from(a.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")).filter((t) => {
|
|
24172
24364
|
let n = t.getAttribute("data-group-id");
|
|
@@ -24184,16 +24376,16 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
24184
24376
|
summary: t,
|
|
24185
24377
|
priorityText: n,
|
|
24186
24378
|
className: r,
|
|
24187
|
-
children: /* @__PURE__ */
|
|
24379
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
24188
24380
|
ref: a,
|
|
24189
24381
|
className: "flex flex-col gap-4",
|
|
24190
|
-
children: e.map((e) => {
|
|
24191
|
-
let t = e.isPriority ?
|
|
24382
|
+
children: [e.map((e) => {
|
|
24383
|
+
let t = e.isPriority ? c-- : 0, n = t ? () => {
|
|
24192
24384
|
let e = t + 1;
|
|
24193
|
-
e <= i &&
|
|
24385
|
+
e <= i && u(e);
|
|
24194
24386
|
} : void 0, r = t ? () => {
|
|
24195
24387
|
let e = t - 1;
|
|
24196
|
-
e >= 1 &&
|
|
24388
|
+
e >= 1 && u(e);
|
|
24197
24389
|
} : void 0;
|
|
24198
24390
|
return /* @__PURE__ */ jsx(MessageGroup, {
|
|
24199
24391
|
group: {
|
|
@@ -24204,26 +24396,101 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
24204
24396
|
onPreviousPriority: n,
|
|
24205
24397
|
onNextPriority: r
|
|
24206
24398
|
}, e.id);
|
|
24207
|
-
})
|
|
24399
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
24400
|
+
ref: o,
|
|
24401
|
+
"aria-hidden": "true"
|
|
24402
|
+
})]
|
|
24208
24403
|
})
|
|
24209
24404
|
});
|
|
24210
24405
|
}
|
|
24211
|
-
function
|
|
24212
|
-
return /* @__PURE__ */ jsx(
|
|
24406
|
+
function EventDetailContentTicketDetails({ issue: e, notification: t, project: n, task: r, dueDate: i, startDate: a, assignees: o, reporter: s, team: c, location: l, related: u }) {
|
|
24407
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(EventDetailContentDetailsPanel, { rows: [
|
|
24408
|
+
{
|
|
24409
|
+
label: "Issue",
|
|
24410
|
+
value: e
|
|
24411
|
+
},
|
|
24412
|
+
{
|
|
24413
|
+
label: "Notification",
|
|
24414
|
+
value: t
|
|
24415
|
+
},
|
|
24416
|
+
{
|
|
24417
|
+
label: "Project",
|
|
24418
|
+
value: n
|
|
24419
|
+
},
|
|
24420
|
+
{
|
|
24421
|
+
label: "Task",
|
|
24422
|
+
value: r
|
|
24423
|
+
}
|
|
24424
|
+
] }), /* @__PURE__ */ jsx(EventDetailContentDetailsPanel, {
|
|
24425
|
+
title: "Issue",
|
|
24426
|
+
rows: [
|
|
24427
|
+
{
|
|
24428
|
+
label: "Due Date",
|
|
24429
|
+
value: i
|
|
24430
|
+
},
|
|
24431
|
+
{
|
|
24432
|
+
label: "Start Date",
|
|
24433
|
+
value: a
|
|
24434
|
+
},
|
|
24435
|
+
{
|
|
24436
|
+
label: "Assignees",
|
|
24437
|
+
value: o
|
|
24438
|
+
},
|
|
24439
|
+
{
|
|
24440
|
+
label: "Reporter",
|
|
24441
|
+
value: s
|
|
24442
|
+
},
|
|
24443
|
+
{
|
|
24444
|
+
label: "Team",
|
|
24445
|
+
value: c
|
|
24446
|
+
},
|
|
24447
|
+
{
|
|
24448
|
+
label: "Location",
|
|
24449
|
+
value: l
|
|
24450
|
+
},
|
|
24451
|
+
{
|
|
24452
|
+
label: "Related",
|
|
24453
|
+
value: u
|
|
24454
|
+
}
|
|
24455
|
+
]
|
|
24456
|
+
})] });
|
|
24457
|
+
}
|
|
24458
|
+
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: eo }, className: h }) {
|
|
24459
|
+
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24213
24460
|
summary: e,
|
|
24214
24461
|
priorityText: n,
|
|
24215
|
-
|
|
24216
|
-
|
|
24217
|
-
|
|
24218
|
-
|
|
24219
|
-
|
|
24462
|
+
highlightPriority: !!n,
|
|
24463
|
+
className: h,
|
|
24464
|
+
children: [
|
|
24465
|
+
/* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
|
|
24466
|
+
issue: r,
|
|
24467
|
+
notification: i,
|
|
24468
|
+
project: a,
|
|
24469
|
+
task: o,
|
|
24470
|
+
dueDate: s,
|
|
24471
|
+
startDate: c,
|
|
24472
|
+
assignees: l,
|
|
24473
|
+
reporter: u,
|
|
24474
|
+
team: f,
|
|
24475
|
+
location: p,
|
|
24476
|
+
related: eo
|
|
24477
|
+
}),
|
|
24478
|
+
/* @__PURE__ */ jsx("h2", {
|
|
24479
|
+
className: "px-4 text-sm font-bold text-neutral-900",
|
|
24480
|
+
children: "Description"
|
|
24481
|
+
}),
|
|
24482
|
+
/* @__PURE__ */ jsx(RichContent, {
|
|
24483
|
+
className: "max-w-[1260px] px-4",
|
|
24484
|
+
content: t
|
|
24485
|
+
})
|
|
24486
|
+
]
|
|
24220
24487
|
});
|
|
24221
24488
|
}
|
|
24222
|
-
function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp:
|
|
24223
|
-
return /* @__PURE__ */
|
|
24224
|
-
className: cn("flex h-14 w-full items-center bg-white px-4 py-2", u),
|
|
24489
|
+
function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, timestamp: a, isPriority: o, isOpen: s, isFirstEvent: c, isSingleEvent: l, className: u }) {
|
|
24490
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24491
|
+
className: cn("flex h-14 w-full items-center bg-white px-4 py-2", o && "relative", u),
|
|
24225
24492
|
"data-priority": o,
|
|
24226
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
24493
|
+
children: [o && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 z-10 h-full w-1 bg-tertiary-500-variant-2" }), /* @__PURE__ */ jsxs("div", {
|
|
24227
24494
|
className: "flex w-full items-center gap-4",
|
|
24228
24495
|
children: [
|
|
24229
24496
|
c && /* @__PURE__ */ jsx(IconButton, {
|
|
@@ -24257,9 +24524,9 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: i, t
|
|
|
24257
24524
|
}),
|
|
24258
24525
|
/* @__PURE__ */ jsxs("div", {
|
|
24259
24526
|
className: "leading-[1.2]tracking-[0.12px] flex items-center gap-1 text-right text-xs whitespace-nowrap",
|
|
24260
|
-
children: [
|
|
24527
|
+
children: [r != null && /* @__PURE__ */ jsx("span", {
|
|
24261
24528
|
className: "font-normal text-neutral-600",
|
|
24262
|
-
children:
|
|
24529
|
+
children: r
|
|
24263
24530
|
}), /* @__PURE__ */ jsx("span", {
|
|
24264
24531
|
className: "font-semibold text-neutral-800",
|
|
24265
24532
|
children: a
|
|
@@ -24285,7 +24552,7 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: i, t
|
|
|
24285
24552
|
})]
|
|
24286
24553
|
})
|
|
24287
24554
|
]
|
|
24288
|
-
})
|
|
24555
|
+
})]
|
|
24289
24556
|
});
|
|
24290
24557
|
}
|
|
24291
24558
|
function EventDetailSkeleton({ className: e }) {
|
|
@@ -24383,7 +24650,7 @@ function EventDetail({ events: e, expandedEventIndex: t }) {
|
|
|
24383
24650
|
return /* @__PURE__ */ jsx(Accordion, {
|
|
24384
24651
|
className: "w-full",
|
|
24385
24652
|
defaultValue: t === void 0 ? getEventValue(e[0], 0) : getEventValue(e[t], t),
|
|
24386
|
-
children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment, { children: e.map((n, r) => {
|
|
24653
|
+
children: ({ openItems: t }) => /* @__PURE__ */ jsx(Fragment$1, { children: e.map((n, r) => {
|
|
24387
24654
|
let i = getEventValue(n, r), a = t.has(i);
|
|
24388
24655
|
return /* @__PURE__ */ jsxs(AccordionItem, {
|
|
24389
24656
|
value: i,
|
|
@@ -24411,6 +24678,16 @@ function EventDetail({ events: e, expandedEventIndex: t }) {
|
|
|
24411
24678
|
}) })
|
|
24412
24679
|
});
|
|
24413
24680
|
}
|
|
24681
|
+
const EventEmptyState = ({ title: e, description: t }) => /* @__PURE__ */ jsxs("div", {
|
|
24682
|
+
className: "flex w-full flex-1 flex-col items-center justify-center gap-2 p-4",
|
|
24683
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
24684
|
+
className: "text-sm leading-[1.3] font-medium text-neutral-900",
|
|
24685
|
+
children: e
|
|
24686
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
24687
|
+
className: "w-full text-center text-xs leading-[1.3] font-normal text-neutral-600",
|
|
24688
|
+
children: t
|
|
24689
|
+
})]
|
|
24690
|
+
});
|
|
24414
24691
|
function FilterBarSkeleton({ itemCount: e = 3, className: t }) {
|
|
24415
24692
|
return /* @__PURE__ */ jsx("div", {
|
|
24416
24693
|
className: cn("flex flex-wrap items-center gap-2", t),
|
|
@@ -24503,11 +24780,11 @@ function IntegrationBarSkeleton({ orientation: e = "vertical", itemCount: t = 3,
|
|
|
24503
24780
|
})
|
|
24504
24781
|
});
|
|
24505
24782
|
}
|
|
24506
|
-
function IntegrationBar({ orientation: e = "vertical", children: t, onAddMore: n, className:
|
|
24783
|
+
function IntegrationBar({ orientation: e = "vertical", children: t, onAddMore: n, className: r }) {
|
|
24507
24784
|
return /* @__PURE__ */ jsx("div", {
|
|
24508
24785
|
className: cn("size-full", e === "vertical" ? "overflow-x-hidden" : "overflow-y-hidden"),
|
|
24509
24786
|
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",
|
|
24787
|
+
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
24788
|
children: [
|
|
24512
24789
|
t.map((e) => cloneElement(e, {})),
|
|
24513
24790
|
/* @__PURE__ */ jsx(Divider, { orientation: e === "vertical" ? "horizontal" : "vertical" }),
|
|
@@ -24534,7 +24811,7 @@ function IntegrationItemSkeleton() {
|
|
|
24534
24811
|
})
|
|
24535
24812
|
});
|
|
24536
24813
|
}
|
|
24537
|
-
function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService:
|
|
24814
|
+
function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: r, connectLabel: a, onConnect: o, isLoading: s, children: c }) {
|
|
24538
24815
|
let l = Children.toArray(c).length;
|
|
24539
24816
|
return /* @__PURE__ */ jsxs("div", {
|
|
24540
24817
|
className: "flex flex-col gap-4 rounded-lg border border-neutral-400 bg-white p-4",
|
|
@@ -24559,10 +24836,10 @@ function IntegrationsCard({ icon: e, name: t, maxConnectionsPerService: i, conne
|
|
|
24559
24836
|
children: t
|
|
24560
24837
|
}), /* @__PURE__ */ jsx("div", {
|
|
24561
24838
|
className: "text-xs font-normal text-neutral-800",
|
|
24562
|
-
children: `${l} of ${
|
|
24839
|
+
children: `${l} of ${r} accounts`
|
|
24563
24840
|
})]
|
|
24564
24841
|
})]
|
|
24565
|
-
}), l <
|
|
24842
|
+
}), l < r && !s && /* @__PURE__ */ jsx(Button, {
|
|
24566
24843
|
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
24844
|
onClick: o,
|
|
24568
24845
|
children: a
|
|
@@ -24817,6 +25094,6 @@ function QtaloImage({ size: e = 40, className: t, ...n }) {
|
|
|
24817
25094
|
}) })]
|
|
24818
25095
|
});
|
|
24819
25096
|
}
|
|
24820
|
-
export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, 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, 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 };
|
|
25097
|
+
export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, 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, 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 };
|
|
24821
25098
|
|
|
24822
25099
|
//# sourceMappingURL=index.js.map
|