@qtalo/qt-ui-library 0.1.25 → 0.1.27
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.d.ts +6 -4
- package/dist/index.js +266 -244
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -326,13 +326,13 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
|
|
|
326
326
|
function createDOMPurify() {
|
|
327
327
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
|
|
328
328
|
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
|
|
329
|
-
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e,
|
|
329
|
+
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e, Zo = c.prototype, g = lookupGetter(Zo, "cloneNode"), O = lookupGetter(Zo, "remove"), Qo = lookupGetter(Zo, "nextSibling"), $o = lookupGetter(Zo, "childNodes"), es = lookupGetter(Zo, "parentNode");
|
|
330
330
|
if (typeof o == "function") {
|
|
331
331
|
let e = n.createElement("template");
|
|
332
332
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
333
333
|
}
|
|
334
|
-
let
|
|
335
|
-
t.isSupported = typeof entries == "function" && typeof
|
|
334
|
+
let A, R = "", { implementation: ts, createNodeIterator: ns, createDocumentFragment: rs, getElementsByTagName: is } = n, { importNode: as } = r, B = _createHooksMap();
|
|
335
|
+
t.isSupported = typeof entries == "function" && typeof es == "function" && ts && ts.createHTMLDocument !== void 0;
|
|
336
336
|
let { MUSTACHE_EXPR: os, ERB_EXPR: ss, TMPLIT_EXPR: cs, DATA_ATTR: ls, ARIA_ATTR: us, IS_SCRIPT_OR_DATA: ds, ATTR_WHITESPACE: fs, CUSTOM_ELEMENT: ps } = EXPRESSIONS, { IS_ALLOWED_URI: ms } = EXPRESSIONS, V = null, hs = addToSet({}, [
|
|
337
337
|
...html$1,
|
|
338
338
|
...svg$1,
|
|
@@ -452,8 +452,8 @@ function createDOMPurify() {
|
|
|
452
452
|
]), V.table && (addToSet(V, ["tbody"]), delete vs.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
453
453
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
454
454
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
455
|
-
|
|
456
|
-
} else
|
|
455
|
+
A = e.TRUSTED_TYPES_POLICY, R = A.createHTML("");
|
|
456
|
+
} else A === void 0 && (A = _createTrustedTypesPolicy(h, i)), A !== null && typeof R == "string" && (R = A.createHTML(""));
|
|
457
457
|
freeze && freeze(e), nc = e;
|
|
458
458
|
}
|
|
459
459
|
}, oc = addToSet({}, [
|
|
@@ -461,7 +461,7 @@ function createDOMPurify() {
|
|
|
461
461
|
...svgFilters,
|
|
462
462
|
...svgDisallowed
|
|
463
463
|
]), sc = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), cc = function(e) {
|
|
464
|
-
let t =
|
|
464
|
+
let t = es(e);
|
|
465
465
|
(!t || !t.tagName) && (t = {
|
|
466
466
|
namespaceURI: qs,
|
|
467
467
|
tagName: "template"
|
|
@@ -471,9 +471,9 @@ function createDOMPurify() {
|
|
|
471
471
|
}, lc = function(e) {
|
|
472
472
|
arrayPush(t.removed, { element: e });
|
|
473
473
|
try {
|
|
474
|
-
|
|
474
|
+
es(e).removeChild(e);
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
O(e);
|
|
477
477
|
}
|
|
478
478
|
}, uc = function(e, n) {
|
|
479
479
|
try {
|
|
@@ -501,20 +501,20 @@ function createDOMPurify() {
|
|
|
501
501
|
r = t && t[0];
|
|
502
502
|
}
|
|
503
503
|
ec === "application/xhtml+xml" && qs === Ks && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
504
|
-
let i =
|
|
504
|
+
let i = A ? A.createHTML(e) : e;
|
|
505
505
|
if (qs === Ks) try {
|
|
506
506
|
t = new p().parseFromString(i, ec);
|
|
507
507
|
} catch {}
|
|
508
508
|
if (!t || !t.documentElement) {
|
|
509
|
-
t =
|
|
509
|
+
t = ts.createDocument(qs, "template", null);
|
|
510
510
|
try {
|
|
511
|
-
t.documentElement.innerHTML = Js ?
|
|
511
|
+
t.documentElement.innerHTML = Js ? R : i;
|
|
512
512
|
} catch {}
|
|
513
513
|
}
|
|
514
514
|
let a = t.body || t.documentElement;
|
|
515
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), qs === Ks ?
|
|
515
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), qs === Ks ? is.call(t, Ds ? "html" : "body")[0] : Ds ? t.documentElement : a;
|
|
516
516
|
}, fc = function(e) {
|
|
517
|
-
return
|
|
517
|
+
return ns.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
518
518
|
}, pc = 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
|
}, mc = function(e) {
|
|
@@ -527,21 +527,21 @@ function createDOMPurify() {
|
|
|
527
527
|
}
|
|
528
528
|
let gc = function(e) {
|
|
529
529
|
let n = null;
|
|
530
|
-
if (hc(
|
|
530
|
+
if (hc(B.beforeSanitizeElements, e, null), pc(e)) return lc(e), !0;
|
|
531
531
|
let r = Y(e.nodeName);
|
|
532
|
-
if (hc(
|
|
532
|
+
if (hc(B.uponSanitizeElement, e, {
|
|
533
533
|
tagName: r,
|
|
534
534
|
allowedTags: V
|
|
535
535
|
}), Es && e.hasChildNodes() && !mc(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Es && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return lc(e), !0;
|
|
536
536
|
if (!(bs.tagCheck instanceof Function && bs.tagCheck(r)) && (!V[r] || vs[r])) {
|
|
537
537
|
if (!vs[r] && vc(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
|
|
538
538
|
if (Fs && !Rs[r]) {
|
|
539
|
-
let t =
|
|
539
|
+
let t = es(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, Qo(e));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
@@ -553,7 +553,7 @@ function createDOMPurify() {
|
|
|
553
553
|
cs
|
|
554
554
|
], (e) => {
|
|
555
555
|
n = stringReplace(n, e, " ");
|
|
556
|
-
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), hc(
|
|
556
|
+
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), hc(B.afterSanitizeElements, e, null), !1);
|
|
557
557
|
}, _c = function(e, t, r) {
|
|
558
558
|
if (Ns && (t === "id" || t === "name") && (r in n || r in rc)) return !1;
|
|
559
559
|
if (!(Ss && !ys[t] && regExpTest(ls, t)) && !(xs && regExpTest(us, t)) && !(bs.attributeCheck instanceof Function && bs.attributeCheck(t, e))) {
|
|
@@ -565,7 +565,7 @@ function createDOMPurify() {
|
|
|
565
565
|
}, vc = function(e) {
|
|
566
566
|
return e !== "annotation-xml" && stringMatch(e, ps);
|
|
567
567
|
}, yc = function(e) {
|
|
568
|
-
hc(
|
|
568
|
+
hc(B.beforeSanitizeAttributes, e, null);
|
|
569
569
|
let { attributes: n } = e;
|
|
570
570
|
if (!n || pc(e)) return;
|
|
571
571
|
let r = {
|
|
@@ -577,7 +577,7 @@ 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, hc(
|
|
580
|
+
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, hc(B.uponSanitizeAttribute, e, r), u = r.attrValue, Ps && (c === "id" || c === "name") && (uc(a, e), u = "user-content-" + u), Es && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
581
581
|
uc(a, e);
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
@@ -606,12 +606,12 @@ function createDOMPurify() {
|
|
|
606
606
|
uc(a, e);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
|
-
if (
|
|
609
|
+
if (A && typeof h == "object" && typeof h.getAttributeType == "function" && !o) switch (h.getAttributeType(f, c)) {
|
|
610
610
|
case "TrustedHTML":
|
|
611
|
-
u =
|
|
611
|
+
u = A.createHTML(u);
|
|
612
612
|
break;
|
|
613
613
|
case "TrustedScriptURL":
|
|
614
|
-
u =
|
|
614
|
+
u = A.createScriptURL(u);
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
if (u !== l) try {
|
|
@@ -620,11 +620,11 @@ function createDOMPurify() {
|
|
|
620
620
|
uc(a, e);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
hc(
|
|
623
|
+
hc(B.afterSanitizeAttributes, e, null);
|
|
624
624
|
}, bc = function e(t) {
|
|
625
625
|
let n = null, r = fc(t);
|
|
626
|
-
for (hc(
|
|
627
|
-
hc(
|
|
626
|
+
for (hc(B.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) hc(B.uponSanitizeShadowNode, n, null), gc(n), yc(n), n.content instanceof a && e(n.content);
|
|
627
|
+
hc(B.afterSanitizeShadowDOM, t, null);
|
|
628
628
|
};
|
|
629
629
|
return t.sanitize = function(e) {
|
|
630
630
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
|
|
@@ -639,17 +639,17 @@ function createDOMPurify() {
|
|
|
639
639
|
}
|
|
640
640
|
} else if (e instanceof s) i = dc("<!---->"), 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 (!As && !Ts && !Ds && e.indexOf("<") === -1) return
|
|
643
|
-
if (i = dc(e), !i) return As ? null : Ms ?
|
|
642
|
+
if (!As && !Ts && !Ds && e.indexOf("<") === -1) return A && Ms ? A.createHTML(e) : e;
|
|
643
|
+
if (i = dc(e), !i) return As ? null : Ms ? R : "";
|
|
644
644
|
}
|
|
645
645
|
i && ks && lc(i.firstChild);
|
|
646
646
|
let u = fc(Is ? e : i);
|
|
647
647
|
for (; c = u.nextNode();) gc(c), yc(c), c.content instanceof a && bc(c.content);
|
|
648
648
|
if (Is) return e;
|
|
649
649
|
if (As) {
|
|
650
|
-
if (js) for (l =
|
|
650
|
+
if (js) for (l = rs.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
651
651
|
else l = i;
|
|
652
|
-
return (gs.shadowroot || gs.shadowrootmode) && (l =
|
|
652
|
+
return (gs.shadowroot || gs.shadowrootmode) && (l = as.call(r, l, !0)), l;
|
|
653
653
|
}
|
|
654
654
|
let f = Ds ? i.outerHTML : i.innerHTML;
|
|
655
655
|
return Ds && V["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), Ts && arrayForEach([
|
|
@@ -658,7 +658,7 @@ function createDOMPurify() {
|
|
|
658
658
|
cs
|
|
659
659
|
], (e) => {
|
|
660
660
|
f = stringReplace(f, e, " ");
|
|
661
|
-
}),
|
|
661
|
+
}), A && Ms ? A.createHTML(f) : f;
|
|
662
662
|
}, t.setConfig = function() {
|
|
663
663
|
ac(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Os = !0;
|
|
664
664
|
}, t.clearConfig = function() {
|
|
@@ -666,17 +666,17 @@ function createDOMPurify() {
|
|
|
666
666
|
}, t.isValidAttribute = function(e, t, n) {
|
|
667
667
|
return nc || ac({}), _c(Y(e), Y(t), n);
|
|
668
668
|
}, t.addHook = function(e, t) {
|
|
669
|
-
typeof t == "function" && arrayPush(
|
|
669
|
+
typeof t == "function" && arrayPush(B[e], t);
|
|
670
670
|
}, t.removeHook = function(e, t) {
|
|
671
671
|
if (t !== void 0) {
|
|
672
|
-
let n = arrayLastIndexOf(
|
|
673
|
-
return n === -1 ? void 0 : arraySplice(
|
|
672
|
+
let n = arrayLastIndexOf(B[e], t);
|
|
673
|
+
return n === -1 ? void 0 : arraySplice(B[e], n, 1)[0];
|
|
674
674
|
}
|
|
675
|
-
return arrayPop(
|
|
675
|
+
return arrayPop(B[e]);
|
|
676
676
|
}, t.removeHooks = function(e) {
|
|
677
|
-
|
|
677
|
+
B[e] = [];
|
|
678
678
|
}, t.removeAllHooks = function() {
|
|
679
|
-
|
|
679
|
+
B = _createHooksMap();
|
|
680
680
|
}, t;
|
|
681
681
|
}
|
|
682
682
|
var purify = createDOMPurify();
|
|
@@ -21328,11 +21328,11 @@ function Button({ className: e, children: t, ...n }) {
|
|
|
21328
21328
|
});
|
|
21329
21329
|
}
|
|
21330
21330
|
function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, indeterminateIcon: i, onChange: a, disabled: o, children: s, className: c }) {
|
|
21331
|
-
let u = useRef(null), [f, p] = useState(t ?? !1),
|
|
21331
|
+
let u = useRef(null), [f, p] = useState(t ?? !1), g = e ?? f;
|
|
21332
21332
|
useEffect(() => {
|
|
21333
21333
|
u.current && (u.current.indeterminate = !!r);
|
|
21334
21334
|
}, [r]);
|
|
21335
|
-
function
|
|
21335
|
+
function O(t) {
|
|
21336
21336
|
let n = t.target.checked;
|
|
21337
21337
|
e === void 0 && p(n), a?.(n);
|
|
21338
21338
|
}
|
|
@@ -21344,17 +21344,17 @@ function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, in
|
|
|
21344
21344
|
type: "checkbox",
|
|
21345
21345
|
className: cn("p-0 absolute h-px w-px overflow-hidden whitespace-nowrap", "[clip-path:inset(50%)]", "border-0"),
|
|
21346
21346
|
disabled: o,
|
|
21347
|
-
onChange:
|
|
21347
|
+
onChange: O,
|
|
21348
21348
|
...e === void 0 ? { defaultChecked: t } : { checked: e }
|
|
21349
21349
|
}),
|
|
21350
21350
|
/* @__PURE__ */ jsx("span", {
|
|
21351
21351
|
role: "checkbox",
|
|
21352
|
-
"aria-checked": r ? "mixed" :
|
|
21352
|
+
"aria-checked": r ? "mixed" : g,
|
|
21353
21353
|
tabIndex: -1,
|
|
21354
|
-
"data-state": r ? "indeterminate" :
|
|
21354
|
+
"data-state": r ? "indeterminate" : g ? "checked" : "unchecked",
|
|
21355
21355
|
className: "checkbox-box inline-flex items-center justify-center",
|
|
21356
21356
|
children: /* @__PURE__ */ jsx("span", {
|
|
21357
|
-
className: cn("checkbox-icon", !(
|
|
21357
|
+
className: cn("checkbox-icon", !(g || r) && "opacity-0"),
|
|
21358
21358
|
children: r ? i ?? "—" : n ?? "✓"
|
|
21359
21359
|
})
|
|
21360
21360
|
}),
|
|
@@ -21372,18 +21372,18 @@ function useDropdown() {
|
|
|
21372
21372
|
return e;
|
|
21373
21373
|
}
|
|
21374
21374
|
function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1, openOnHover: c = !0, open: u, onOpenChange: p }) {
|
|
21375
|
-
let
|
|
21376
|
-
e !==
|
|
21375
|
+
let g = u !== void 0, [O, A] = useState(!1), R = g ? u : O, ts = useCallback((e) => {
|
|
21376
|
+
e !== R && (g || A(e), p?.(e));
|
|
21377
21377
|
}, [
|
|
21378
|
-
|
|
21379
|
-
|
|
21378
|
+
R,
|
|
21379
|
+
g,
|
|
21380
21380
|
p
|
|
21381
|
-
]),
|
|
21382
|
-
if (!
|
|
21383
|
-
let e =
|
|
21381
|
+
]), ns = useRef(null), rs = useRef(null), is = useRef(null), [as, B] = useState(null), os = useCallback(() => {
|
|
21382
|
+
if (!ns.current || !rs.current) return;
|
|
21383
|
+
let e = ns.current.getBoundingClientRect(), t = rs.current.getBoundingClientRect(), o = e.left;
|
|
21384
21384
|
n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
|
|
21385
21385
|
let s;
|
|
21386
|
-
s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() =>
|
|
21386
|
+
s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => B({
|
|
21387
21387
|
top: s,
|
|
21388
21388
|
left: o
|
|
21389
21389
|
}));
|
|
@@ -21394,52 +21394,52 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21394
21394
|
a
|
|
21395
21395
|
]);
|
|
21396
21396
|
useLayoutEffect(() => {
|
|
21397
|
-
|
|
21398
|
-
}, [
|
|
21399
|
-
if (!
|
|
21397
|
+
R && os();
|
|
21398
|
+
}, [R, os]), useEffect(() => {
|
|
21399
|
+
if (!R) return;
|
|
21400
21400
|
let e = () => os();
|
|
21401
21401
|
return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
21402
21402
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
21403
21403
|
};
|
|
21404
|
-
}, [
|
|
21404
|
+
}, [R, os]);
|
|
21405
21405
|
let ss = useCallback(() => {
|
|
21406
|
-
|
|
21407
|
-
}, [
|
|
21408
|
-
|
|
21409
|
-
|
|
21406
|
+
is.current &&= (clearTimeout(is.current), null), ts(!0);
|
|
21407
|
+
}, [ts]), cs = useCallback(() => {
|
|
21408
|
+
is.current = window.setTimeout(() => {
|
|
21409
|
+
ts(!1);
|
|
21410
21410
|
}, 120);
|
|
21411
|
-
}, [
|
|
21411
|
+
}, [ts]);
|
|
21412
21412
|
return useEffect(() => {
|
|
21413
21413
|
function e(e) {
|
|
21414
21414
|
let t = e.target;
|
|
21415
|
-
|
|
21415
|
+
ns.current?.contains(t) || rs.current?.contains(t) || ts(!1);
|
|
21416
21416
|
}
|
|
21417
21417
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21418
|
-
}, [
|
|
21419
|
-
|
|
21418
|
+
}, [ts]), useEffect(() => () => {
|
|
21419
|
+
is.current && clearTimeout(is.current);
|
|
21420
21420
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21421
21421
|
value: {
|
|
21422
|
-
close: () =>
|
|
21422
|
+
close: () => ts(!1),
|
|
21423
21423
|
open: ss
|
|
21424
21424
|
},
|
|
21425
21425
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21426
|
-
ref:
|
|
21426
|
+
ref: ns,
|
|
21427
21427
|
className: "inline-flex",
|
|
21428
21428
|
onMouseEnter: c ? ss : void 0,
|
|
21429
21429
|
onMouseLeave: c ? cs : void 0,
|
|
21430
|
-
onClick: () =>
|
|
21430
|
+
onClick: () => ts(!R),
|
|
21431
21431
|
"aria-haspopup": "menu",
|
|
21432
|
-
"aria-expanded":
|
|
21432
|
+
"aria-expanded": R,
|
|
21433
21433
|
children: e
|
|
21434
|
-
}),
|
|
21435
|
-
ref:
|
|
21434
|
+
}), R && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21435
|
+
ref: rs,
|
|
21436
21436
|
onMouseEnter: c ? ss : void 0,
|
|
21437
21437
|
onMouseLeave: c ? cs : void 0,
|
|
21438
21438
|
style: {
|
|
21439
21439
|
position: "fixed",
|
|
21440
|
-
top:
|
|
21441
|
-
left:
|
|
21442
|
-
visibility:
|
|
21440
|
+
top: as?.top ?? 0,
|
|
21441
|
+
left: as?.left ?? 0,
|
|
21442
|
+
visibility: as ? "visible" : "hidden",
|
|
21443
21443
|
zIndex: 1e3
|
|
21444
21444
|
},
|
|
21445
21445
|
children: t
|
|
@@ -21452,7 +21452,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21452
21452
|
let t = e.target.value;
|
|
21453
21453
|
f || u(t), o?.(t);
|
|
21454
21454
|
}
|
|
21455
|
-
function
|
|
21455
|
+
function g(e) {
|
|
21456
21456
|
s?.(e);
|
|
21457
21457
|
}
|
|
21458
21458
|
return /* @__PURE__ */ jsx("input", {
|
|
@@ -21463,7 +21463,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21463
21463
|
"aria-disabled": r || void 0,
|
|
21464
21464
|
"aria-invalid": i || void 0,
|
|
21465
21465
|
onChange: h,
|
|
21466
|
-
onKeyDown:
|
|
21466
|
+
onKeyDown: g,
|
|
21467
21467
|
className: cn("bg-transparent outline-none", r && "pointer-events-none", c)
|
|
21468
21468
|
});
|
|
21469
21469
|
}
|
|
@@ -21501,17 +21501,17 @@ function getVerticalAlign(e, t, n) {
|
|
|
21501
21501
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21502
21502
|
}
|
|
21503
21503
|
function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
|
|
21504
|
-
let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p,
|
|
21504
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, g] = useState(null), A = () => {
|
|
21505
21505
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21506
21506
|
u(!0);
|
|
21507
21507
|
}, r);
|
|
21508
|
-
},
|
|
21508
|
+
}, R = () => {
|
|
21509
21509
|
s.current &&= (clearTimeout(s.current), null), u(!1);
|
|
21510
21510
|
};
|
|
21511
21511
|
return useLayoutEffect(() => {
|
|
21512
21512
|
if (!c || !a.current || !o.current) return;
|
|
21513
21513
|
let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
|
|
21514
|
-
r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)),
|
|
21514
|
+
r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), g((e) => e && e.top === l && e.left === u ? e : {
|
|
21515
21515
|
top: l,
|
|
21516
21516
|
left: u
|
|
21517
21517
|
});
|
|
@@ -21520,10 +21520,10 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
|
|
|
21520
21520
|
}, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
21521
21521
|
ref: a,
|
|
21522
21522
|
className: "inline-flex",
|
|
21523
|
-
onMouseEnter:
|
|
21524
|
-
onMouseLeave:
|
|
21525
|
-
onFocus:
|
|
21526
|
-
onBlur:
|
|
21523
|
+
onMouseEnter: A,
|
|
21524
|
+
onMouseLeave: R,
|
|
21525
|
+
onFocus: A,
|
|
21526
|
+
onBlur: R,
|
|
21527
21527
|
children: e
|
|
21528
21528
|
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21529
21529
|
ref: o,
|
|
@@ -22986,10 +22986,8 @@ function findActiveStep(e, t, n) {
|
|
|
22986
22986
|
return null;
|
|
22987
22987
|
}
|
|
22988
22988
|
function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r = !0, children: i }) {
|
|
22989
|
-
let a = n ?? "onboarding_dismissed", [o, c] = useState(() => readDismissedFromStorage(a));
|
|
22990
|
-
|
|
22991
|
-
c(readDismissedFromStorage(a));
|
|
22992
|
-
}, [a]), useEffect(() => {
|
|
22989
|
+
let a = n ?? "onboarding_dismissed", [o, c] = useState(() => readDismissedFromStorage(a)), [u, f] = useState(a);
|
|
22990
|
+
a !== u && (f(a), c(readDismissedFromStorage(a))), useEffect(() => {
|
|
22993
22991
|
if (!(typeof window > "u")) try {
|
|
22994
22992
|
localStorage.setItem(a, JSON.stringify([...o]));
|
|
22995
22993
|
} catch {}
|
|
@@ -23000,18 +22998,18 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
|
|
|
23000
22998
|
c((e) => e.size === r.size && [...e].every((e) => r.has(e)) ? e : r);
|
|
23001
22999
|
});
|
|
23002
23000
|
}, [e, a]);
|
|
23003
|
-
let
|
|
23001
|
+
let h = useMemo(() => r ? findActiveStep(e, o, t) : null, [
|
|
23004
23002
|
r,
|
|
23005
23003
|
e,
|
|
23006
23004
|
o,
|
|
23007
23005
|
t
|
|
23008
|
-
]),
|
|
23006
|
+
]), g = h?.step ?? null, $o = h?.index ?? null, es = useCallback((e) => {
|
|
23009
23007
|
c((t) => {
|
|
23010
23008
|
if (t.has(e)) return t;
|
|
23011
23009
|
let n = new Set(t);
|
|
23012
23010
|
return n.add(e), n;
|
|
23013
23011
|
});
|
|
23014
|
-
}, []),
|
|
23012
|
+
}, []), A = useCallback(() => {
|
|
23015
23013
|
c((n) => {
|
|
23016
23014
|
let r = findActiveStep(e, n, t);
|
|
23017
23015
|
if (r == null || n.has(r.step.id)) return n;
|
|
@@ -23023,17 +23021,17 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
|
|
|
23023
23021
|
}, [e]);
|
|
23024
23022
|
return /* @__PURE__ */ jsx(Fragment$1, { children: i({
|
|
23025
23023
|
context: t,
|
|
23026
|
-
currentStep:
|
|
23027
|
-
currentStepIndex:
|
|
23024
|
+
currentStep: g,
|
|
23025
|
+
currentStepIndex: $o,
|
|
23028
23026
|
dismissedStepIds: o,
|
|
23029
23027
|
actions: useMemo(() => ({
|
|
23030
|
-
dismissCurrentStep:
|
|
23031
|
-
dismissStep:
|
|
23028
|
+
dismissCurrentStep: A,
|
|
23029
|
+
dismissStep: es,
|
|
23032
23030
|
skipAll: R,
|
|
23033
23031
|
close: R
|
|
23034
23032
|
}), [
|
|
23035
|
-
|
|
23036
|
-
|
|
23033
|
+
A,
|
|
23034
|
+
es,
|
|
23037
23035
|
R
|
|
23038
23036
|
])
|
|
23039
23037
|
}) });
|
|
@@ -23206,7 +23204,7 @@ function useToastTimers(e, t) {
|
|
|
23206
23204
|
isPaused: !0
|
|
23207
23205
|
});
|
|
23208
23206
|
}), a.current &&= (clearInterval(a.current), null);
|
|
23209
|
-
}, []),
|
|
23207
|
+
}, []), g = useCallback(() => {
|
|
23210
23208
|
o.current && (o.current = !1, i.current.forEach((t, n) => {
|
|
23211
23209
|
if (t.isPaused && t.remainingTime > 0) {
|
|
23212
23210
|
let r = e.find((e) => e.id === n);
|
|
@@ -23217,7 +23215,7 @@ function useToastTimers(e, t) {
|
|
|
23217
23215
|
e,
|
|
23218
23216
|
u,
|
|
23219
23217
|
f
|
|
23220
|
-
]),
|
|
23218
|
+
]), O = useCallback((e) => {
|
|
23221
23219
|
i.current.delete(e), r((t) => {
|
|
23222
23220
|
let n = new Map(t);
|
|
23223
23221
|
return n.delete(e), n;
|
|
@@ -23238,22 +23236,22 @@ function useToastTimers(e, t) {
|
|
|
23238
23236
|
}, []), {
|
|
23239
23237
|
remainingTimes: n,
|
|
23240
23238
|
pauseAll: p,
|
|
23241
|
-
resumeAll:
|
|
23242
|
-
cleanupTimer:
|
|
23239
|
+
resumeAll: g,
|
|
23240
|
+
cleanupTimer: O
|
|
23243
23241
|
};
|
|
23244
23242
|
}
|
|
23245
23243
|
function Toaster() {
|
|
23246
23244
|
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer: p } = useToastTimers(e, a);
|
|
23247
23245
|
useEffect(() => toastStore.subscribe(t), []);
|
|
23248
|
-
let
|
|
23246
|
+
let A = useSyncExternalStore(subscribeNoop$1, getClientSnapshot$1, getServerSnapshot$1), R = useCallback((e) => {
|
|
23249
23247
|
e.callbacks?.onOpen?.();
|
|
23250
|
-
}, []),
|
|
23248
|
+
}, []), ts = useCallback((e, t) => {
|
|
23251
23249
|
t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
23252
23250
|
}, []);
|
|
23253
23251
|
useEffect(() => {
|
|
23254
23252
|
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
23255
23253
|
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
23256
|
-
|
|
23254
|
+
ts(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
23257
23255
|
}), r((r) => {
|
|
23258
23256
|
let i = r.map((e) => {
|
|
23259
23257
|
let t = n.get(e.id);
|
|
@@ -23262,7 +23260,7 @@ function Toaster() {
|
|
|
23262
23260
|
content: t.content,
|
|
23263
23261
|
duration: t.duration
|
|
23264
23262
|
} : e;
|
|
23265
|
-
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (
|
|
23263
|
+
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (R(e), {
|
|
23266
23264
|
...e,
|
|
23267
23265
|
animationState: "entering"
|
|
23268
23266
|
})), ...i];
|
|
@@ -23270,20 +23268,20 @@ function Toaster() {
|
|
|
23270
23268
|
}), i.current = t;
|
|
23271
23269
|
}, [
|
|
23272
23270
|
e,
|
|
23273
|
-
|
|
23274
|
-
|
|
23271
|
+
R,
|
|
23272
|
+
ts
|
|
23275
23273
|
]);
|
|
23276
|
-
let
|
|
23274
|
+
let ns = useCallback((e) => {
|
|
23277
23275
|
r((t) => {
|
|
23278
23276
|
let n = t.filter((t) => t.id !== e);
|
|
23279
23277
|
return o.current = n, n;
|
|
23280
23278
|
}), p(e), toastStore.cleanup(e);
|
|
23281
|
-
}, [p]),
|
|
23279
|
+
}, [p]), rs = useCallback((e) => {
|
|
23282
23280
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
23283
23281
|
}, []);
|
|
23284
|
-
if (!
|
|
23285
|
-
let
|
|
23286
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23282
|
+
if (!A) return null;
|
|
23283
|
+
let is = groupByPosition(n);
|
|
23284
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(is).map(([e, t]) => {
|
|
23287
23285
|
let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
23288
23286
|
className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
|
|
23289
23287
|
children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
|
|
@@ -23292,8 +23290,8 @@ function Toaster() {
|
|
|
23292
23290
|
children: /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23293
23291
|
toast: e,
|
|
23294
23292
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23295
|
-
onExitComplete:
|
|
23296
|
-
onClose:
|
|
23293
|
+
onExitComplete: ns,
|
|
23294
|
+
onClose: rs,
|
|
23297
23295
|
onHoverStart: u,
|
|
23298
23296
|
onHoverEnd: f
|
|
23299
23297
|
})
|
|
@@ -23301,8 +23299,8 @@ function Toaster() {
|
|
|
23301
23299
|
}) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23302
23300
|
toast: e,
|
|
23303
23301
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23304
|
-
onExitComplete:
|
|
23305
|
-
onClose:
|
|
23302
|
+
onExitComplete: ns,
|
|
23303
|
+
onClose: rs,
|
|
23306
23304
|
onHoverStart: u,
|
|
23307
23305
|
onHoverEnd: f
|
|
23308
23306
|
}, e.id));
|
|
@@ -23517,10 +23515,10 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23517
23515
|
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 = () => {
|
|
23518
23516
|
n(!c);
|
|
23519
23517
|
};
|
|
23520
|
-
function
|
|
23518
|
+
function g(e) {
|
|
23521
23519
|
p(e), a?.(e);
|
|
23522
23520
|
}
|
|
23523
|
-
let
|
|
23521
|
+
let es = {
|
|
23524
23522
|
fire: [{
|
|
23525
23523
|
id: "fire",
|
|
23526
23524
|
tooltip: "Mark as fire",
|
|
@@ -23572,7 +23570,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23572
23570
|
}),
|
|
23573
23571
|
onClick: r.read.off
|
|
23574
23572
|
}]
|
|
23575
|
-
},
|
|
23573
|
+
}, A = [{
|
|
23576
23574
|
value: "normal",
|
|
23577
23575
|
tooltip: "Normal density",
|
|
23578
23576
|
icon: /* @__PURE__ */ jsx(NormalDensityIcon, { size: 20 })
|
|
@@ -23601,7 +23599,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23601
23599
|
}),
|
|
23602
23600
|
/* @__PURE__ */ jsx("div", {
|
|
23603
23601
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23604
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23602
|
+
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(es).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
23605
23603
|
className: "gap-2 px-1 flex items-center",
|
|
23606
23604
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23607
23605
|
content: e.tooltip,
|
|
@@ -23616,13 +23614,13 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23616
23614
|
}),
|
|
23617
23615
|
/* @__PURE__ */ jsx("div", {
|
|
23618
23616
|
className: "gap-2 flex items-center",
|
|
23619
|
-
children:
|
|
23617
|
+
children: A.map(({ value: e, tooltip: t, icon: n }) => {
|
|
23620
23618
|
let r = f === e;
|
|
23621
23619
|
return /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23622
23620
|
content: t,
|
|
23623
23621
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
23624
23622
|
className: cn("h-7 w-7 p-0 text-neutral-900", r && "bg-white-variant-4"),
|
|
23625
|
-
onClick: () =>
|
|
23623
|
+
onClick: () => g(e),
|
|
23626
23624
|
icon: n,
|
|
23627
23625
|
"aria-pressed": r
|
|
23628
23626
|
})
|
|
@@ -23873,20 +23871,20 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
|
|
|
23873
23871
|
})
|
|
23874
23872
|
}), document.body);
|
|
23875
23873
|
}
|
|
23876
|
-
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...
|
|
23877
|
-
let
|
|
23874
|
+
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...g }) {
|
|
23875
|
+
let O = iconCountButtonStyles({
|
|
23878
23876
|
variant: r,
|
|
23879
23877
|
orientation: i,
|
|
23880
23878
|
status: a
|
|
23881
|
-
}),
|
|
23879
|
+
}), es = useRef(null), [A, R] = useState(!1), [ts, ns] = useState(!1), [rs, is] = useState(l), [as, B] = useState(null), os = c ?? rs, ss = s && (A || ts || os), cs = typeof n == "number" && n > 0 && (o || a === "active");
|
|
23882
23880
|
function ls(e) {
|
|
23883
|
-
c === void 0 &&
|
|
23881
|
+
c === void 0 && is(e), u?.(e);
|
|
23884
23882
|
}
|
|
23885
23883
|
return useLayoutEffect(() => {
|
|
23886
|
-
if (!ss ||
|
|
23884
|
+
if (!ss || !es.current) return;
|
|
23887
23885
|
function e() {
|
|
23888
|
-
let e =
|
|
23889
|
-
e &&
|
|
23886
|
+
let e = es.current?.getBoundingClientRect();
|
|
23887
|
+
e && B({
|
|
23890
23888
|
top: e.top - 8,
|
|
23891
23889
|
left: e.right - 12
|
|
23892
23890
|
});
|
|
@@ -23895,29 +23893,29 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23895
23893
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
23896
23894
|
};
|
|
23897
23895
|
}, [ss]), /* @__PURE__ */ jsxs(Button, {
|
|
23898
|
-
...
|
|
23899
|
-
className: cn(
|
|
23900
|
-
onMouseEnter: () =>
|
|
23901
|
-
onMouseLeave: () =>
|
|
23896
|
+
...g,
|
|
23897
|
+
className: cn(O.root(), p?.root),
|
|
23898
|
+
onMouseEnter: () => R(!0),
|
|
23899
|
+
onMouseLeave: () => R(!1),
|
|
23902
23900
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23903
23901
|
className: "relative",
|
|
23904
23902
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23905
|
-
ref:
|
|
23906
|
-
className: cn(
|
|
23907
|
-
children: renderIcon(e,
|
|
23908
|
-
}), ss &&
|
|
23903
|
+
ref: es,
|
|
23904
|
+
className: cn(O.bubble(), p?.bubble),
|
|
23905
|
+
children: renderIcon(e, O.icon())
|
|
23906
|
+
}), ss && as && typeof document < "u" && ToggleControlPortal({
|
|
23909
23907
|
isPressed: os,
|
|
23910
|
-
isPortalHovered:
|
|
23911
|
-
portalPosition:
|
|
23912
|
-
onMouseEnter: () =>
|
|
23913
|
-
onMouseLeave: () =>
|
|
23908
|
+
isPortalHovered: ts,
|
|
23909
|
+
portalPosition: as,
|
|
23910
|
+
onMouseEnter: () => ns(!0),
|
|
23911
|
+
onMouseLeave: () => ns(!1),
|
|
23914
23912
|
onToggle: () => ls(!os)
|
|
23915
23913
|
})]
|
|
23916
23914
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23917
|
-
className: cn(
|
|
23915
|
+
className: cn(O.label(), p?.label),
|
|
23918
23916
|
children: [/* @__PURE__ */ jsx("span", { children: t }), cs && /* @__PURE__ */ jsxs("span", {
|
|
23919
23917
|
"aria-label": `${n} items`,
|
|
23920
|
-
className: cn(
|
|
23918
|
+
className: cn(O.count(), p?.count),
|
|
23921
23919
|
children: [
|
|
23922
23920
|
"(",
|
|
23923
23921
|
formatCount(n),
|
|
@@ -23949,7 +23947,7 @@ function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
|
23949
23947
|
});
|
|
23950
23948
|
}
|
|
23951
23949
|
function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
|
|
23952
|
-
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [
|
|
23950
|
+
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [g, O] = useState(() => {
|
|
23953
23951
|
let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
|
|
23954
23952
|
return {
|
|
23955
23953
|
year: r.getFullYear(),
|
|
@@ -23958,13 +23956,13 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23958
23956
|
});
|
|
23959
23957
|
useEffect(() => {
|
|
23960
23958
|
(e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !== f.current.startDate?.getTime() || n.endDate?.getTime() !== f.current.endDate?.getTime())) && queueMicrotask(() => {
|
|
23961
|
-
if (e === "single" && t)
|
|
23959
|
+
if (e === "single" && t) O({
|
|
23962
23960
|
year: t.getFullYear(),
|
|
23963
23961
|
month: t.getMonth()
|
|
23964
23962
|
});
|
|
23965
23963
|
else if (e === "range") {
|
|
23966
23964
|
let e = n.startDate ?? n.endDate;
|
|
23967
|
-
e &&
|
|
23965
|
+
e && O({
|
|
23968
23966
|
year: e.getFullYear(),
|
|
23969
23967
|
month: e.getMonth()
|
|
23970
23968
|
});
|
|
@@ -23975,10 +23973,10 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23975
23973
|
t,
|
|
23976
23974
|
n
|
|
23977
23975
|
]);
|
|
23978
|
-
let
|
|
23979
|
-
function
|
|
23976
|
+
let es = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
|
|
23977
|
+
function A(t) {
|
|
23980
23978
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23981
|
-
if ((o !==
|
|
23979
|
+
if ((o !== g.month || s !== g.year) && O({
|
|
23982
23980
|
year: s,
|
|
23983
23981
|
month: o
|
|
23984
23982
|
}), e === "single") r(t), a();
|
|
@@ -23993,8 +23991,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23993
23991
|
}), a());
|
|
23994
23992
|
}
|
|
23995
23993
|
}
|
|
23996
|
-
function
|
|
23997
|
-
|
|
23994
|
+
function R() {
|
|
23995
|
+
O((e) => e.month === 0 ? {
|
|
23998
23996
|
year: e.year - 1,
|
|
23999
23997
|
month: 11
|
|
24000
23998
|
} : {
|
|
@@ -24002,8 +24000,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24002
24000
|
month: e.month - 1
|
|
24003
24001
|
});
|
|
24004
24002
|
}
|
|
24005
|
-
function
|
|
24006
|
-
|
|
24003
|
+
function ts() {
|
|
24004
|
+
O((e) => e.month === 11 ? {
|
|
24007
24005
|
year: e.year + 1,
|
|
24008
24006
|
month: 0
|
|
24009
24007
|
} : {
|
|
@@ -24011,7 +24009,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24011
24009
|
month: e.month + 1
|
|
24012
24010
|
});
|
|
24013
24011
|
}
|
|
24014
|
-
let
|
|
24012
|
+
let ns = getWeekdays();
|
|
24015
24013
|
return /* @__PURE__ */ jsxs("div", {
|
|
24016
24014
|
className: "mt-1 rounded-lg p-2 shadow-lg w-fit border border-neutral-400 bg-white",
|
|
24017
24015
|
children: [
|
|
@@ -24023,16 +24021,16 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24023
24021
|
direction: "left",
|
|
24024
24022
|
size: 20
|
|
24025
24023
|
}),
|
|
24026
|
-
onClick:
|
|
24024
|
+
onClick: R,
|
|
24027
24025
|
className: "hover:opacity-60",
|
|
24028
24026
|
"aria-label": "Previous month"
|
|
24029
24027
|
}),
|
|
24030
24028
|
/* @__PURE__ */ jsxs("div", {
|
|
24031
24029
|
className: "font-bold text-[10px] text-neutral-900",
|
|
24032
24030
|
children: [
|
|
24033
|
-
getMonthName(
|
|
24031
|
+
getMonthName(g.month),
|
|
24034
24032
|
" ",
|
|
24035
|
-
|
|
24033
|
+
g.year
|
|
24036
24034
|
]
|
|
24037
24035
|
}),
|
|
24038
24036
|
/* @__PURE__ */ jsx(IconButton, {
|
|
@@ -24040,7 +24038,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24040
24038
|
direction: "right",
|
|
24041
24039
|
size: 20
|
|
24042
24040
|
}),
|
|
24043
|
-
onClick:
|
|
24041
|
+
onClick: ts,
|
|
24044
24042
|
className: "hover:opacity-60",
|
|
24045
24043
|
"aria-label": "Next month"
|
|
24046
24044
|
})
|
|
@@ -24048,20 +24046,20 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24048
24046
|
}),
|
|
24049
24047
|
/* @__PURE__ */ jsx("div", {
|
|
24050
24048
|
className: "mb-2 grid grid-cols-7",
|
|
24051
|
-
children:
|
|
24049
|
+
children: ns.map((e) => /* @__PURE__ */ jsx("div", {
|
|
24052
24050
|
className: "p-0.5 font-bold flex items-center justify-center text-[9px] text-neutral-900",
|
|
24053
24051
|
children: e
|
|
24054
24052
|
}, e))
|
|
24055
24053
|
}),
|
|
24056
24054
|
/* @__PURE__ */ jsx("div", {
|
|
24057
24055
|
className: "grid grid-cols-7",
|
|
24058
|
-
children:
|
|
24059
|
-
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f),
|
|
24060
|
-
e === "range" && u && !f && s && !isDateBefore(s, u) ? (
|
|
24061
|
-
let
|
|
24056
|
+
children: es.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
24057
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), Zo = u, g = s;
|
|
24058
|
+
e === "range" && u && !f && s && !isDateBefore(s, u) ? (Zo = u, g = s) : (Zo = null, g = null);
|
|
24059
|
+
let O = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, Zo, g)), $o = l || p || h;
|
|
24062
24060
|
return /* @__PURE__ */ jsx(Button, {
|
|
24063
24061
|
type: "button",
|
|
24064
|
-
onClick: () =>
|
|
24062
|
+
onClick: () => A(i),
|
|
24065
24063
|
onMouseEnter: () => {
|
|
24066
24064
|
e === "range" && u && !f && !isDateBefore(i, u) && c(i);
|
|
24067
24065
|
},
|
|
@@ -24070,9 +24068,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24070
24068
|
},
|
|
24071
24069
|
className: "p-0.5",
|
|
24072
24070
|
"aria-label": `Select ${formatDate(i)}`,
|
|
24073
|
-
"aria-selected":
|
|
24071
|
+
"aria-selected": $o || void 0,
|
|
24074
24072
|
children: /* @__PURE__ */ jsx("div", {
|
|
24075
|
-
className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors",
|
|
24073
|
+
className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", $o && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", O && !$o && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !$o && !O && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !$o && !O && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
24076
24074
|
children: r
|
|
24077
24075
|
})
|
|
24078
24076
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -24137,11 +24135,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
24137
24135
|
function h(t) {
|
|
24138
24136
|
e === "single" && (u || s(t), r?.(t));
|
|
24139
24137
|
}
|
|
24140
|
-
function
|
|
24138
|
+
function g(t) {
|
|
24141
24139
|
e === "range" && (u || l(t), r?.(t));
|
|
24142
24140
|
}
|
|
24143
|
-
function
|
|
24144
|
-
e === "single" ? h(null) :
|
|
24141
|
+
function $o() {
|
|
24142
|
+
e === "single" ? h(null) : g({
|
|
24145
24143
|
startDate: null,
|
|
24146
24144
|
endDate: null
|
|
24147
24145
|
});
|
|
@@ -24151,7 +24149,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
24151
24149
|
displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
|
|
24152
24150
|
disabled: i,
|
|
24153
24151
|
className: a,
|
|
24154
|
-
onClear:
|
|
24152
|
+
onClear: $o
|
|
24155
24153
|
}),
|
|
24156
24154
|
disabled: i,
|
|
24157
24155
|
children: /* @__PURE__ */ jsx(CalendarPanel, {
|
|
@@ -24159,7 +24157,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
24159
24157
|
selectedDate: f,
|
|
24160
24158
|
selectedRange: p,
|
|
24161
24159
|
onDateSelect: h,
|
|
24162
|
-
onRangeSelect:
|
|
24160
|
+
onRangeSelect: g
|
|
24163
24161
|
})
|
|
24164
24162
|
}) });
|
|
24165
24163
|
}
|
|
@@ -24365,18 +24363,18 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
24365
24363
|
}) })
|
|
24366
24364
|
});
|
|
24367
24365
|
}
|
|
24368
|
-
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions:
|
|
24366
|
+
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: Zo = {}, density: g = "normal", className: O, style: es, isPriority: A, isDone: R }) {
|
|
24369
24367
|
return /* @__PURE__ */ jsx(Card, {
|
|
24370
24368
|
as: Pressable,
|
|
24371
24369
|
onPress: u,
|
|
24372
24370
|
className: cn(eventCardStyles({
|
|
24373
|
-
tone:
|
|
24371
|
+
tone: A ? "priority" : R ? "done" : "default",
|
|
24374
24372
|
state: l ? "selected" : c ? "read" : "unread",
|
|
24375
|
-
density:
|
|
24376
|
-
}),
|
|
24377
|
-
style:
|
|
24373
|
+
density: g
|
|
24374
|
+
}), O),
|
|
24375
|
+
style: es,
|
|
24378
24376
|
"data-service": t,
|
|
24379
|
-
children:
|
|
24377
|
+
children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
24380
24378
|
className: "gap-x-2 gap-y-1",
|
|
24381
24379
|
children: [
|
|
24382
24380
|
/* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
@@ -24412,7 +24410,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24412
24410
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
24413
24411
|
className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
|
|
24414
24412
|
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
24415
|
-
actions:
|
|
24413
|
+
actions: Zo,
|
|
24416
24414
|
className: "col-start-2 justify-self-end"
|
|
24417
24415
|
})]
|
|
24418
24416
|
})
|
|
@@ -24431,7 +24429,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24431
24429
|
e,
|
|
24432
24430
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
24433
24431
|
statusBadges: h,
|
|
24434
|
-
density:
|
|
24432
|
+
density: g
|
|
24435
24433
|
}),
|
|
24436
24434
|
/* @__PURE__ */ jsxs("div", {
|
|
24437
24435
|
className: cn("min-w-0 gap-2 text-sm font-bold flex items-center whitespace-nowrap text-neutral-900", c && "font-medium"),
|
|
@@ -24451,7 +24449,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24451
24449
|
]
|
|
24452
24450
|
}),
|
|
24453
24451
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
24454
|
-
/* @__PURE__ */ jsx(EventActionsList, { actions:
|
|
24452
|
+
/* @__PURE__ */ jsx(EventActionsList, { actions: Zo }),
|
|
24455
24453
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
24456
24454
|
content: o,
|
|
24457
24455
|
children: /* @__PURE__ */ jsx("span", {
|
|
@@ -24696,11 +24694,11 @@ function EventSummaryFireButton({ active: e, onClick: t }) {
|
|
|
24696
24694
|
}) });
|
|
24697
24695
|
}
|
|
24698
24696
|
function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, workspace: o, selected: s = !1, onSelect: c, actions: l, className: u }) {
|
|
24699
|
-
let { fire: f, insight: p, link: h } = l,
|
|
24697
|
+
let { fire: f, insight: p, link: h } = l, Zo = p?.label ?? null;
|
|
24700
24698
|
return /* @__PURE__ */ jsxs(Pressable, {
|
|
24701
24699
|
onPress: c,
|
|
24702
24700
|
className: cn(eventSummaryCardStyles({
|
|
24703
|
-
tone: f.active ? "priority" : insightLabelVisible(
|
|
24701
|
+
tone: f.active ? "priority" : insightLabelVisible(Zo) ? "insight" : "default",
|
|
24704
24702
|
state: s ? "selected" : "normal"
|
|
24705
24703
|
}), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
|
|
24706
24704
|
"data-service": t,
|
|
@@ -24724,8 +24722,8 @@ function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i
|
|
|
24724
24722
|
className: "text-xs leading-tight font-semibold tracking-wide flex-1 text-right whitespace-nowrap text-neutral-800",
|
|
24725
24723
|
children: a
|
|
24726
24724
|
}),
|
|
24727
|
-
insightLabelVisible(
|
|
24728
|
-
/* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
24725
|
+
insightLabelVisible(Zo) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: Zo }),
|
|
24726
|
+
f.onClick && /* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
24729
24727
|
active: f.active,
|
|
24730
24728
|
onClick: f.onClick
|
|
24731
24729
|
})
|
|
@@ -24886,41 +24884,43 @@ function MessageItem({ message: e, isPriority: t = !1 }) {
|
|
|
24886
24884
|
})
|
|
24887
24885
|
});
|
|
24888
24886
|
}
|
|
24889
|
-
function PriorityNavigation({
|
|
24890
|
-
if (!
|
|
24891
|
-
let
|
|
24892
|
-
|
|
24887
|
+
function PriorityNavigation({ mode: e = "fire", priorityIndex: t, priorityTotal: n, onPreviousPriority: r, onNextPriority: i }) {
|
|
24888
|
+
if (!t || !n || n <= 1) return null;
|
|
24889
|
+
let a = t > 1, o = t < n;
|
|
24890
|
+
if (!o && !a) return null;
|
|
24891
|
+
let s = e === "fire" ? "Fire" : "Insight", c = e === "fire" ? "border-tertiary-500 text-tertiary-500 hover:bg-tertiary-50" : "border-primary-500 text-primary-500 hover:bg-primary-light";
|
|
24892
|
+
return /* @__PURE__ */ jsx("div", {
|
|
24893
24893
|
className: "mb-3 px-2 flex justify-center",
|
|
24894
24894
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24895
24895
|
className: "gap-4 flex w-full items-center justify-center",
|
|
24896
24896
|
children: [
|
|
24897
24897
|
/* @__PURE__ */ jsx("div", {
|
|
24898
24898
|
className: "flex flex-1 justify-end",
|
|
24899
|
-
children:
|
|
24900
|
-
className: "gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium flex border
|
|
24901
|
-
"aria-label":
|
|
24902
|
-
onClick:
|
|
24899
|
+
children: o && /* @__PURE__ */ jsxs(Button, {
|
|
24900
|
+
className: cn("gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium flex border bg-white transition-colors", c),
|
|
24901
|
+
"aria-label": `Previous ${s}`,
|
|
24902
|
+
onClick: r,
|
|
24903
24903
|
children: [/* @__PURE__ */ jsx(ArrowIcon, {
|
|
24904
24904
|
direction: "left",
|
|
24905
24905
|
size: 14
|
|
24906
|
-
}), /* @__PURE__ */
|
|
24906
|
+
}), /* @__PURE__ */ jsxs("span", { children: ["Previous ", s] })]
|
|
24907
24907
|
})
|
|
24908
24908
|
}),
|
|
24909
24909
|
/* @__PURE__ */ jsxs("span", {
|
|
24910
24910
|
className: "text-xs font-medium text-neutral-700",
|
|
24911
24911
|
children: [
|
|
24912
|
-
|
|
24912
|
+
t,
|
|
24913
24913
|
" / ",
|
|
24914
|
-
|
|
24914
|
+
n
|
|
24915
24915
|
]
|
|
24916
24916
|
}),
|
|
24917
24917
|
/* @__PURE__ */ jsx("div", {
|
|
24918
24918
|
className: "flex-1",
|
|
24919
|
-
children:
|
|
24920
|
-
className: "gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium flex border
|
|
24921
|
-
"aria-label":
|
|
24922
|
-
onClick:
|
|
24923
|
-
children: [/* @__PURE__ */
|
|
24919
|
+
children: a && /* @__PURE__ */ jsxs(Button, {
|
|
24920
|
+
className: cn("gap-1.5 rounded-md px-2.5 py-1.5 text-xs font-medium flex border bg-white transition-colors", c),
|
|
24921
|
+
"aria-label": `Next ${s}`,
|
|
24922
|
+
onClick: i,
|
|
24923
|
+
children: [/* @__PURE__ */ jsxs("span", { children: ["Next ", s] }), /* @__PURE__ */ jsx(ArrowIcon, {
|
|
24924
24924
|
direction: "right",
|
|
24925
24925
|
size: 14
|
|
24926
24926
|
})]
|
|
@@ -24930,34 +24930,40 @@ function PriorityNavigation({ priorityIndex: e, priorityTotal: t, onPreviousPrio
|
|
|
24930
24930
|
})
|
|
24931
24931
|
});
|
|
24932
24932
|
}
|
|
24933
|
-
function PriorityGroupHeader({ title: e,
|
|
24933
|
+
function PriorityGroupHeader({ title: e, mode: t, onMarkAsNotFireClick: n }) {
|
|
24934
24934
|
return e ? /* @__PURE__ */ jsx("div", {
|
|
24935
24935
|
className: "pb-3 border-b border-neutral-200",
|
|
24936
24936
|
children: /* @__PURE__ */ jsxs("div", {
|
|
24937
24937
|
className: "gap-2 flex items-center",
|
|
24938
|
-
children: [/* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
24938
|
+
children: [t === "fire" && n != null ? /* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
24939
24939
|
active: !0,
|
|
24940
|
-
onClick:
|
|
24940
|
+
onClick: n
|
|
24941
|
+
}) : /* @__PURE__ */ jsx(InsightFillIcon, {
|
|
24942
|
+
size: 16,
|
|
24943
|
+
className: "shrink-0 text-primary-500"
|
|
24941
24944
|
}), /* @__PURE__ */ jsx("h4", {
|
|
24942
|
-
className: "text-
|
|
24945
|
+
className: cn("text-xs font-semibold tracking-wide uppercase", t === "fire" ? "text-tertiary-700" : "text-primary-600"),
|
|
24943
24946
|
children: e
|
|
24944
24947
|
})]
|
|
24945
24948
|
})
|
|
24946
24949
|
}) : null;
|
|
24947
24950
|
}
|
|
24948
24951
|
function PriorityGroup({ group: e, children: t, onPreviousPriority: n, onNextPriority: r, onMarkAsNotFireClick: i }) {
|
|
24949
|
-
|
|
24952
|
+
let a = e.isPriority ? "fire" : e.isInsight ? "insight" : null;
|
|
24953
|
+
return a ? /* @__PURE__ */ jsxs("div", {
|
|
24950
24954
|
className: "relative scroll-mt-[180px]",
|
|
24951
24955
|
"data-group-id": e.id,
|
|
24952
24956
|
children: [/* @__PURE__ */ jsx(PriorityNavigation, {
|
|
24957
|
+
mode: a,
|
|
24953
24958
|
priorityIndex: e.priorityIndex,
|
|
24954
24959
|
priorityTotal: e.totalPriorityGroups,
|
|
24955
24960
|
onPreviousPriority: n,
|
|
24956
24961
|
onNextPriority: r
|
|
24957
24962
|
}), /* @__PURE__ */ jsxs("div", {
|
|
24958
|
-
className: "gap-4 rounded-r-lg p-4 relative flex flex-col border-l-[3px] border-tertiary-500 bg-tertiary-50-alpha-50",
|
|
24963
|
+
className: cn("gap-4 rounded-r-lg p-4 relative flex flex-col border-l-[3px]", a === "fire" ? "border-tertiary-500 bg-tertiary-50-alpha-50" : "border-primary-500 bg-primary-light"),
|
|
24959
24964
|
children: [/* @__PURE__ */ jsx(PriorityGroupHeader, {
|
|
24960
|
-
title: e.priorityText,
|
|
24965
|
+
title: a === "fire" ? e.priorityText : e.insightText,
|
|
24966
|
+
mode: a,
|
|
24961
24967
|
onMarkAsNotFireClick: i
|
|
24962
24968
|
}), t]
|
|
24963
24969
|
})]
|
|
@@ -24979,24 +24985,40 @@ function MessageGroup({ group: e, onPreviousPriority: t, onNextPriority: n }) {
|
|
|
24979
24985
|
});
|
|
24980
24986
|
}
|
|
24981
24987
|
function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityText: n, followUpTitle: r, followUpSubtitle: i }, className: a }) {
|
|
24982
|
-
let o = e.filter((e) => e.isPriority).length, c =
|
|
24988
|
+
let o = e.filter((e) => e.isPriority).length, c = e.filter((e) => !e.isPriority && e.isInsight).length, u = useRef(null), f = useRef(null), p = useRef(!1);
|
|
24983
24989
|
useEffect(() => {
|
|
24984
|
-
e.length
|
|
24990
|
+
if (e.length === 0 || p.current) return;
|
|
24991
|
+
p.current = !0;
|
|
24992
|
+
let t = [...e].reverse().find((e) => e.isPriority), n = [...e].reverse().find((e) => !e.isPriority && e.isInsight), r = t ?? n;
|
|
24993
|
+
if (r && u.current) {
|
|
24994
|
+
let e = u.current.querySelector(`[data-group-id="${r.id}"]`);
|
|
24995
|
+
if (e) {
|
|
24996
|
+
e.scrollIntoView({
|
|
24997
|
+
behavior: "smooth",
|
|
24998
|
+
block: "start"
|
|
24999
|
+
});
|
|
25000
|
+
return;
|
|
25001
|
+
}
|
|
25002
|
+
}
|
|
25003
|
+
f.current?.scrollIntoView({ behavior: "smooth" });
|
|
24985
25004
|
}, [e]);
|
|
24986
|
-
let
|
|
24987
|
-
if (!
|
|
24988
|
-
let
|
|
24989
|
-
let
|
|
24990
|
-
|
|
25005
|
+
let Zo = o, g = c, O = useCallback((t, n) => {
|
|
25006
|
+
if (!u.current) return;
|
|
25007
|
+
let r = Array.from(u.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")), i = n === "fire" ? o : c, a = r.filter((t) => {
|
|
25008
|
+
let r = t.getAttribute("data-group-id");
|
|
25009
|
+
if (!r) return !1;
|
|
25010
|
+
let i = e.find((e) => e.id === r);
|
|
25011
|
+
return i ? n === "fire" ? i.isPriority : !i.isPriority && i.isInsight : !1;
|
|
24991
25012
|
});
|
|
24992
|
-
|
|
24993
|
-
|
|
24994
|
-
|
|
24995
|
-
|
|
24996
|
-
|
|
24997
|
-
|
|
24998
|
-
|
|
24999
|
-
|
|
25013
|
+
t >= 1 && t <= i && a.length === i && a[i - t]?.scrollIntoView({
|
|
25014
|
+
behavior: "smooth",
|
|
25015
|
+
block: "start"
|
|
25016
|
+
});
|
|
25017
|
+
}, [
|
|
25018
|
+
e,
|
|
25019
|
+
o,
|
|
25020
|
+
c
|
|
25021
|
+
]);
|
|
25000
25022
|
return /* @__PURE__ */ jsx(EventDetailContentHeader, {
|
|
25001
25023
|
summary: t,
|
|
25002
25024
|
priorityText: n,
|
|
@@ -25004,27 +25026,27 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
25004
25026
|
followUpSubtitle: i,
|
|
25005
25027
|
className: a,
|
|
25006
25028
|
children: /* @__PURE__ */ jsxs("div", {
|
|
25007
|
-
ref:
|
|
25029
|
+
ref: u,
|
|
25008
25030
|
className: "gap-4 flex flex-col",
|
|
25009
25031
|
children: [e.map((e) => {
|
|
25010
|
-
let t = e.isPriority ?
|
|
25011
|
-
let e =
|
|
25012
|
-
e <=
|
|
25013
|
-
} : void 0,
|
|
25014
|
-
let e =
|
|
25015
|
-
e >= 1 &&
|
|
25032
|
+
let t = e.isPriority ? "fire" : e.isInsight ? "insight" : null, n = e.isPriority ? Zo-- : e.isInsight ? g-- : 0, r = e.isPriority ? o : e.isInsight ? c : 0, i = n && t ? () => {
|
|
25033
|
+
let e = n + 1;
|
|
25034
|
+
e <= r && O(e, t);
|
|
25035
|
+
} : void 0, a = n && t ? () => {
|
|
25036
|
+
let e = n - 1;
|
|
25037
|
+
e >= 1 && O(e, t);
|
|
25016
25038
|
} : void 0;
|
|
25017
25039
|
return /* @__PURE__ */ jsx(MessageGroup, {
|
|
25018
25040
|
group: {
|
|
25019
25041
|
...e,
|
|
25020
|
-
priorityIndex:
|
|
25021
|
-
totalPriorityGroups:
|
|
25042
|
+
priorityIndex: n,
|
|
25043
|
+
totalPriorityGroups: r
|
|
25022
25044
|
},
|
|
25023
|
-
onPreviousPriority:
|
|
25024
|
-
onNextPriority:
|
|
25045
|
+
onPreviousPriority: i,
|
|
25046
|
+
onNextPriority: a
|
|
25025
25047
|
}, e.id);
|
|
25026
25048
|
}), /* @__PURE__ */ jsx("div", {
|
|
25027
|
-
ref:
|
|
25049
|
+
ref: f,
|
|
25028
25050
|
"aria-hidden": "true"
|
|
25029
25051
|
})]
|
|
25030
25052
|
})
|
|
@@ -25082,13 +25104,13 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
|
|
|
25082
25104
|
]
|
|
25083
25105
|
})] });
|
|
25084
25106
|
}
|
|
25085
|
-
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location:
|
|
25107
|
+
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location: Zo, related: g }, className: O }) {
|
|
25086
25108
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
25087
25109
|
summary: e,
|
|
25088
25110
|
priorityText: n,
|
|
25089
25111
|
followUpTitle: r,
|
|
25090
25112
|
followUpSubtitle: i,
|
|
25091
|
-
className:
|
|
25113
|
+
className: O,
|
|
25092
25114
|
children: [
|
|
25093
25115
|
/* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
|
|
25094
25116
|
issue: a,
|
|
@@ -25100,8 +25122,8 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
25100
25122
|
assignees: f,
|
|
25101
25123
|
reporter: p,
|
|
25102
25124
|
team: h,
|
|
25103
|
-
location:
|
|
25104
|
-
related:
|
|
25125
|
+
location: Zo,
|
|
25126
|
+
related: g
|
|
25105
25127
|
}),
|
|
25106
25128
|
/* @__PURE__ */ jsx("h2", {
|
|
25107
25129
|
className: "px-4 text-sm font-bold text-neutral-900",
|
|
@@ -25619,16 +25641,16 @@ function OnboardingCard({ stepLabel: e, title: t, description: n, titleAccessory
|
|
|
25619
25641
|
children: [i, a]
|
|
25620
25642
|
})
|
|
25621
25643
|
]
|
|
25622
|
-
}),
|
|
25644
|
+
}), Zo = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
|
|
25623
25645
|
layout: o,
|
|
25624
25646
|
placement: s
|
|
25625
|
-
}), c, l),
|
|
25647
|
+
}), c, l), g = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [Zo, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, Zo] });
|
|
25626
25648
|
return o === "horizontal" ? /* @__PURE__ */ jsx("div", {
|
|
25627
25649
|
className: cn("flex items-center", u),
|
|
25628
|
-
children:
|
|
25650
|
+
children: g
|
|
25629
25651
|
}) : /* @__PURE__ */ jsx("div", {
|
|
25630
25652
|
className: cn("flex flex-col items-center", u),
|
|
25631
|
-
children:
|
|
25653
|
+
children: g
|
|
25632
25654
|
});
|
|
25633
25655
|
}
|
|
25634
25656
|
var subscribeNoop = () => () => {}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, PRIMARY_BTN = "rounded-lg bg-white px-4 py-1.5 text-xs font-semibold text-primary-500 transition-opacity hover:opacity-90", GHOST_BTN = "text-xs font-semibold text-white/70 transition-colors hover:text-white";
|
|
@@ -25676,7 +25698,7 @@ function OnboardingPortal({ currentStep: e, currentStepIndex: t, actions: n, ste
|
|
|
25676
25698
|
let p = e.layout === "vertical" && o.mode === "vertical" ? {
|
|
25677
25699
|
marginLeft: o.arrowMarginLeft,
|
|
25678
25700
|
...e.arrowWrapperStyle
|
|
25679
|
-
} : e.arrowWrapperStyle,
|
|
25701
|
+
} : e.arrowWrapperStyle, O = /* @__PURE__ */ jsx(OnboardingCard, {
|
|
25680
25702
|
stepLabel: e.stepLabel ?? (t == null ? void 0 : `${t + 1} / ${r.length}`),
|
|
25681
25703
|
title: e.title,
|
|
25682
25704
|
description: e.description,
|
|
@@ -25715,7 +25737,7 @@ function OnboardingPortal({ currentStep: e, currentStepIndex: t, actions: n, ste
|
|
|
25715
25737
|
left: o.left
|
|
25716
25738
|
}
|
|
25717
25739
|
},
|
|
25718
|
-
children:
|
|
25740
|
+
children: O
|
|
25719
25741
|
}), document.body);
|
|
25720
25742
|
}
|
|
25721
25743
|
function Onboarding({ steps: e, context: t, storageKey: n, onFinish: r, isEnabled: i = !0 }) {
|
|
@@ -25736,7 +25758,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25736
25758
|
function h(e) {
|
|
25737
25759
|
u || l(e), r?.(e);
|
|
25738
25760
|
}
|
|
25739
|
-
function
|
|
25761
|
+
function g() {
|
|
25740
25762
|
u || l(""), r?.(""), a?.();
|
|
25741
25763
|
}
|
|
25742
25764
|
return /* @__PURE__ */ jsxs("fieldset", {
|
|
@@ -25762,7 +25784,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25762
25784
|
size: 16,
|
|
25763
25785
|
className: "text-neutral-700"
|
|
25764
25786
|
}),
|
|
25765
|
-
onClick:
|
|
25787
|
+
onClick: g,
|
|
25766
25788
|
"aria-label": "Clear search",
|
|
25767
25789
|
className: "rounded p-0 transition-opacity hover:opacity-70"
|
|
25768
25790
|
})
|