@qtalo/qt-ui-library 0.1.16 → 0.1.18
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 +15 -15
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +60 -0
- package/dist/index.js +478 -279
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -326,20 +326,20 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
|
|
|
326
326
|
function createDOMPurify() {
|
|
327
327
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
|
|
328
328
|
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
|
|
329
|
-
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes:
|
|
329
|
+
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e, g = c.prototype, O = lookupGetter(g, "cloneNode"), yo = lookupGetter(g, "remove"), bo = lookupGetter(g, "nextSibling"), A = lookupGetter(g, "childNodes"), xo = lookupGetter(g, "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 R,
|
|
335
|
-
t.isSupported = typeof entries == "function" && typeof
|
|
336
|
-
let { MUSTACHE_EXPR:
|
|
334
|
+
let R, So = "", { implementation: Co, createNodeIterator: wo, createDocumentFragment: To, getElementsByTagName: Eo } = n, { importNode: Do } = r, Oo = _createHooksMap();
|
|
335
|
+
t.isSupported = typeof entries == "function" && typeof xo == "function" && Co && Co.createHTMLDocument !== void 0;
|
|
336
|
+
let { MUSTACHE_EXPR: ko, ERB_EXPR: Ao, TMPLIT_EXPR: jo, DATA_ATTR: Mo, ARIA_ATTR: No, IS_SCRIPT_OR_DATA: Po, ATTR_WHITESPACE: Fo, CUSTOM_ELEMENT: Io } = EXPRESSIONS, { IS_ALLOWED_URI: Lo } = EXPRESSIONS, B = null, Ro = 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, zo = 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
|
+
})), Bo = null, Vo = null, Ho = 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
|
+
})), Uo = !0, Wo = !0, Go = !1, Ko = !0, qo = !1, Jo = !0, Yo = !1, Xo = !1, Zo = !1, Qo = !1, $o = !1, es = !1, ts = !0, ns = !1, rs = !0, is = !1, as = {}, os = null, ss = 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
|
+
]), cs = null, ls = addToSet({}, [
|
|
406
406
|
"audio",
|
|
407
407
|
"video",
|
|
408
408
|
"img",
|
|
409
409
|
"source",
|
|
410
410
|
"image",
|
|
411
411
|
"track"
|
|
412
|
-
]),
|
|
412
|
+
]), us = null, ds = 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
|
+
]), fs = "http://www.w3.org/1998/Math/MathML", ps = "http://www.w3.org/2000/svg", ms = "http://www.w3.org/1999/xhtml", hs = ms, gs = !1, _s = null, vs = addToSet({}, [
|
|
428
|
+
fs,
|
|
429
|
+
ps,
|
|
430
|
+
ms
|
|
431
|
+
], stringToString), ys = addToSet({}, [
|
|
432
432
|
"mi",
|
|
433
433
|
"mo",
|
|
434
434
|
"mn",
|
|
435
435
|
"ms",
|
|
436
436
|
"mtext"
|
|
437
|
-
]),
|
|
437
|
+
]), bs = addToSet({}, ["annotation-xml"]), xs = addToSet({}, [
|
|
438
438
|
"title",
|
|
439
439
|
"style",
|
|
440
440
|
"font",
|
|
441
441
|
"a",
|
|
442
442
|
"script"
|
|
443
|
-
]),
|
|
443
|
+
]), Ss = null, Cs = ["application/xhtml+xml", "text/html"], Y = null, ws = null, Ts = n.createElement("form"), Es = function(e) {
|
|
444
444
|
return e instanceof RegExp || e instanceof Function;
|
|
445
|
-
},
|
|
445
|
+
}, Ds = 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 (!(ws && ws === e)) {
|
|
448
|
+
if ((!e || typeof e != "object") && (e = {}), e = clone(e), Ss = Cs.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = Ss === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : Ro, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : zo, _s = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : vs, us = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(ds), e.ADD_URI_SAFE_ATTR, Y) : ds, cs = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(ls), e.ADD_DATA_URI_TAGS, Y) : ls, os = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : ss, Bo = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), Vo = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), as = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, Uo = e.ALLOW_ARIA_ATTR !== !1, Wo = e.ALLOW_DATA_ATTR !== !1, Go = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Ko = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, qo = e.SAFE_FOR_TEMPLATES || !1, Jo = e.SAFE_FOR_XML !== !1, Yo = e.WHOLE_DOCUMENT || !1, Qo = e.RETURN_DOM || !1, $o = e.RETURN_DOM_FRAGMENT || !1, es = e.RETURN_TRUSTED_TYPE || !1, Zo = e.FORCE_BODY || !1, ts = e.SANITIZE_DOM !== !1, ns = e.SANITIZE_NAMED_PROPS || !1, rs = e.KEEP_CONTENT !== !1, is = e.IN_PLACE || !1, Lo = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, hs = e.NAMESPACE || ms, ys = e.MATHML_TEXT_INTEGRATION_POINTS || ys, bs = e.HTML_INTEGRATION_POINTS || bs, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && Es(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && Es(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), qo && (Wo = !1), $o && (Qo = !0), as && (B = addToSet({}, text), V = [], as.html === !0 && (addToSet(B, html$1), addToSet(V, html)), as.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), as.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), as.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? Ho.tagCheck = e.ADD_TAGS : (B === Ro && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? Ho.attributeCheck = e.ADD_ATTR : (V === zo && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(us, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (os === ss && (os = clone(os)), addToSet(os, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (os === ss && (os = clone(os)), addToSet(os, e.ADD_FORBID_CONTENTS, Y)), rs && (B["#text"] = !0), Yo && 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 Bo.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
|
-
R = e.TRUSTED_TYPES_POLICY,
|
|
456
|
-
} else R === void 0 && (R = _createTrustedTypesPolicy(
|
|
457
|
-
freeze && freeze(e),
|
|
455
|
+
R = e.TRUSTED_TYPES_POLICY, So = R.createHTML("");
|
|
456
|
+
} else R === void 0 && (R = _createTrustedTypesPolicy(h, i)), R !== null && typeof So == "string" && (So = R.createHTML(""));
|
|
457
|
+
freeze && freeze(e), ws = e;
|
|
458
458
|
}
|
|
459
|
-
},
|
|
459
|
+
}, Os = addToSet({}, [
|
|
460
460
|
...svg$1,
|
|
461
461
|
...svgFilters,
|
|
462
462
|
...svgDisallowed
|
|
463
|
-
]),
|
|
464
|
-
let t =
|
|
463
|
+
]), ks = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), As = function(e) {
|
|
464
|
+
let t = xo(e);
|
|
465
465
|
(!t || !t.tagName) && (t = {
|
|
466
|
-
namespaceURI:
|
|
466
|
+
namespaceURI: hs,
|
|
467
467
|
tagName: "template"
|
|
468
468
|
});
|
|
469
469
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
470
|
-
return
|
|
471
|
-
},
|
|
470
|
+
return _s[e.namespaceURI] ? e.namespaceURI === ps ? t.namespaceURI === ms ? n === "svg" : t.namespaceURI === fs ? n === "svg" && (r === "annotation-xml" || ys[r]) : !!Os[n] : e.namespaceURI === fs ? t.namespaceURI === ms ? n === "math" : t.namespaceURI === ps ? n === "math" && bs[r] : !!ks[n] : e.namespaceURI === ms ? t.namespaceURI === ps && !bs[r] || t.namespaceURI === fs && !ys[r] ? !1 : !ks[n] && (xs[n] || !Os[n]) : !!(Ss === "application/xhtml+xml" && _s[e.namespaceURI]) : !1;
|
|
471
|
+
}, js = function(e) {
|
|
472
472
|
arrayPush(t.removed, { element: e });
|
|
473
473
|
try {
|
|
474
|
-
|
|
474
|
+
xo(e).removeChild(e);
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
yo(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 (Qo || $o) try {
|
|
491
|
+
js(n);
|
|
492
492
|
} catch {}
|
|
493
493
|
else try {
|
|
494
494
|
n.setAttribute(e, "");
|
|
495
495
|
} catch {}
|
|
496
|
-
},
|
|
496
|
+
}, Ns = function(e) {
|
|
497
497
|
let t = null, r = null;
|
|
498
|
-
if (
|
|
498
|
+
if (Zo) 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
|
+
Ss === "application/xhtml+xml" && hs === ms && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
504
504
|
let i = R ? R.createHTML(e) : e;
|
|
505
|
-
if (
|
|
506
|
-
t = new p().parseFromString(i,
|
|
505
|
+
if (hs === ms) try {
|
|
506
|
+
t = new p().parseFromString(i, Ss);
|
|
507
507
|
} catch {}
|
|
508
508
|
if (!t || !t.documentElement) {
|
|
509
|
-
t =
|
|
509
|
+
t = Co.createDocument(hs, "template", null);
|
|
510
510
|
try {
|
|
511
|
-
t.documentElement.innerHTML =
|
|
511
|
+
t.documentElement.innerHTML = gs ? So : 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), hs === ms ? Eo.call(t, Yo ? "html" : "body")[0] : Yo ? t.documentElement : a;
|
|
516
|
+
}, Ps = function(e) {
|
|
517
|
+
return wo.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
518
|
+
}, Fs = 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
|
+
}, Is = function(e) {
|
|
521
521
|
return typeof s == "function" && e instanceof s;
|
|
522
522
|
};
|
|
523
|
-
function
|
|
523
|
+
function Ls(e, n, r) {
|
|
524
524
|
arrayForEach(e, (e) => {
|
|
525
|
-
e.call(t, n, r,
|
|
525
|
+
e.call(t, n, r, ws);
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
let
|
|
528
|
+
let Rs = function(e) {
|
|
529
529
|
let n = null;
|
|
530
|
-
if (
|
|
530
|
+
if (Ls(Oo.beforeSanitizeElements, e, null), Fs(e)) return js(e), !0;
|
|
531
531
|
let r = Y(e.nodeName);
|
|
532
|
-
if (
|
|
532
|
+
if (Ls(Oo.uponSanitizeElement, e, {
|
|
533
533
|
tagName: r,
|
|
534
534
|
allowedTags: B
|
|
535
|
-
}),
|
|
536
|
-
if (!(
|
|
537
|
-
if (!
|
|
538
|
-
if (
|
|
539
|
-
let t =
|
|
535
|
+
}), Jo && e.hasChildNodes() && !Is(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Jo && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return js(e), !0;
|
|
536
|
+
if (!(Ho.tagCheck instanceof Function && Ho.tagCheck(r)) && (!B[r] || Bo[r])) {
|
|
537
|
+
if (!Bo[r] && Bs(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
|
|
538
|
+
if (rs && !os[r]) {
|
|
539
|
+
let t = xo(e) || e.parentNode, n = A(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 = O(n[i], !0);
|
|
544
|
+
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, bo(e));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
return
|
|
548
|
+
return js(e), !0;
|
|
549
549
|
}
|
|
550
|
-
return e instanceof c && !
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
return e instanceof c && !As(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (js(e), !0) : (qo && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
|
|
551
|
+
ko,
|
|
552
|
+
Ao,
|
|
553
|
+
jo
|
|
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)), Ls(Oo.afterSanitizeElements, e, null), !1);
|
|
557
|
+
}, zs = function(e, t, r) {
|
|
558
|
+
if (ts && (t === "id" || t === "name") && (r in n || r in Ts)) return !1;
|
|
559
|
+
if (!(Wo && !Vo[t] && regExpTest(Mo, t)) && !(Uo && regExpTest(No, t)) && !(Ho.attributeCheck instanceof Function && Ho.attributeCheck(t, e))) {
|
|
560
|
+
if (!V[t] || Vo[t]) {
|
|
561
|
+
if (!(Bs(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 (!us[t] && !regExpTest(Lo, stringReplace(r, Fo, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && cs[e]) && !(Go && !regExpTest(Po, stringReplace(r, Fo, ""))) && r) return !1;
|
|
563
563
|
}
|
|
564
564
|
return !0;
|
|
565
|
-
},
|
|
566
|
-
return e !== "annotation-xml" && stringMatch(e,
|
|
567
|
-
},
|
|
568
|
-
|
|
565
|
+
}, Bs = function(e) {
|
|
566
|
+
return e !== "annotation-xml" && stringMatch(e, Io);
|
|
567
|
+
}, Vs = function(e) {
|
|
568
|
+
Ls(Oo.beforeSanitizeAttributes, e, null);
|
|
569
569
|
let { attributes: n } = e;
|
|
570
|
-
if (!n ||
|
|
570
|
+
if (!n || Fs(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, Ls(Oo.uponSanitizeAttribute, e, r), u = r.attrValue, ns && (c === "id" || c === "name") && (Ms(a, e), u = "user-content-" + u), Jo && 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 (!Ko && regExpTest(/\/>/i, u)) {
|
|
594
|
+
Ms(a, e);
|
|
595
595
|
continue;
|
|
596
596
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
qo && arrayForEach([
|
|
598
|
+
ko,
|
|
599
|
+
Ao,
|
|
600
|
+
jo
|
|
601
601
|
], (e) => {
|
|
602
602
|
u = stringReplace(u, e, " ");
|
|
603
603
|
});
|
|
604
604
|
let f = Y(e.nodeName);
|
|
605
|
-
if (!
|
|
606
|
-
|
|
605
|
+
if (!zs(f, c, u)) {
|
|
606
|
+
Ms(a, e);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
|
-
if (R && typeof
|
|
609
|
+
if (R && typeof h == "object" && typeof h.getAttributeType == "function" && !o) switch (h.getAttributeType(f, c)) {
|
|
610
610
|
case "TrustedHTML":
|
|
611
611
|
u = R.createHTML(u);
|
|
612
612
|
break;
|
|
@@ -615,68 +615,68 @@ 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), Fs(e) ? js(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
|
+
Ls(Oo.afterSanitizeAttributes, e, null);
|
|
624
|
+
}, Hs = function e(t) {
|
|
625
|
+
let n = null, r = Ps(t);
|
|
626
|
+
for (Ls(Oo.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) Ls(Oo.uponSanitizeShadowNode, n, null), Rs(n), Vs(n), n.content instanceof a && e(n.content);
|
|
627
|
+
Ls(Oo.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 (gs = !e, gs && (e = "<!-->"), typeof e != "string" && !Is(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 (Xo || Ds(n), t.removed = [], typeof e == "string" && (is = !1), is) {
|
|
636
636
|
if (e.nodeName) {
|
|
637
637
|
let t = Y(e.nodeName);
|
|
638
|
-
if (!B[t] ||
|
|
638
|
+
if (!B[t] || Bo[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 = Ns("<!---->"), 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 (!Qo && !qo && !Yo && e.indexOf("<") === -1) return R && es ? R.createHTML(e) : e;
|
|
643
|
+
if (i = Ns(e), !i) return Qo ? null : es ? So : "";
|
|
644
644
|
}
|
|
645
|
-
i &&
|
|
646
|
-
let u =
|
|
647
|
-
for (; c = u.nextNode();)
|
|
648
|
-
if (
|
|
649
|
-
if (
|
|
650
|
-
if (
|
|
645
|
+
i && Zo && js(i.firstChild);
|
|
646
|
+
let u = Ps(is ? e : i);
|
|
647
|
+
for (; c = u.nextNode();) Rs(c), Vs(c), c.content instanceof a && Hs(c.content);
|
|
648
|
+
if (is) return e;
|
|
649
|
+
if (Qo) {
|
|
650
|
+
if ($o) for (l = To.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 = Do.call(r, l, !0)), l;
|
|
653
653
|
}
|
|
654
|
-
let f =
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
654
|
+
let f = Yo ? i.outerHTML : i.innerHTML;
|
|
655
|
+
return Yo && 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), qo && arrayForEach([
|
|
656
|
+
ko,
|
|
657
|
+
Ao,
|
|
658
|
+
jo
|
|
659
659
|
], (e) => {
|
|
660
660
|
f = stringReplace(f, e, " ");
|
|
661
|
-
}), R &&
|
|
661
|
+
}), R && es ? R.createHTML(f) : f;
|
|
662
662
|
}, t.setConfig = function() {
|
|
663
|
-
|
|
663
|
+
Ds(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Xo = !0;
|
|
664
664
|
}, t.clearConfig = function() {
|
|
665
|
-
|
|
665
|
+
ws = null, Xo = !1;
|
|
666
666
|
}, t.isValidAttribute = function(e, t, n) {
|
|
667
|
-
return
|
|
667
|
+
return ws || Ds({}), zs(Y(e), Y(t), n);
|
|
668
668
|
}, t.addHook = function(e, t) {
|
|
669
|
-
typeof t == "function" && arrayPush(
|
|
669
|
+
typeof t == "function" && arrayPush(Oo[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(Oo[e], t);
|
|
673
|
+
return n === -1 ? void 0 : arraySplice(Oo[e], n, 1)[0];
|
|
674
674
|
}
|
|
675
|
-
return arrayPop(
|
|
675
|
+
return arrayPop(Oo[e]);
|
|
676
676
|
}, t.removeHooks = function(e) {
|
|
677
|
-
|
|
677
|
+
Oo[e] = [];
|
|
678
678
|
}, t.removeAllHooks = function() {
|
|
679
|
-
|
|
679
|
+
Oo = _createHooksMap();
|
|
680
680
|
}, t;
|
|
681
681
|
}
|
|
682
682
|
var purify = createDOMPurify();
|
|
@@ -20157,14 +20157,14 @@ ${c}` : c;
|
|
|
20157
20157
|
if (this.options.pedantic ? (f = 2, s = c.trimStart()) : u ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, s = c.slice(f), f += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
20158
20158
|
let t = this.rules.other.nextBulletRegex(f), n = this.rules.other.hrRegex(f), i = this.rules.other.fencesBeginRegex(f), a = this.rules.other.headingBeginRegex(f), o = this.rules.other.htmlBeginRegex(f);
|
|
20159
20159
|
for (; e;) {
|
|
20160
|
-
let p = e.split("\n", 1)[0],
|
|
20161
|
-
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "),
|
|
20162
|
-
if (
|
|
20160
|
+
let p = e.split("\n", 1)[0], h;
|
|
20161
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), h = l) : h = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
|
|
20162
|
+
if (h.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + h.slice(f);
|
|
20163
20163
|
else {
|
|
20164
20164
|
if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
|
|
20165
20165
|
s += "\n" + l;
|
|
20166
20166
|
}
|
|
20167
|
-
!u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c =
|
|
20167
|
+
!u && !l.trim() && (u = !0), r += p + "\n", e = e.substring(p.length + 1), c = h.slice(f);
|
|
20168
20168
|
}
|
|
20169
20169
|
}
|
|
20170
20170
|
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
|
|
@@ -21328,13 +21328,13 @@ function Button({ className: e, children: t, ...n }) {
|
|
|
21328
21328
|
});
|
|
21329
21329
|
}
|
|
21330
21330
|
function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, indeterminateIcon: i, onChange: a, disabled: o, children: s, className: c }) {
|
|
21331
|
-
let u = useRef(null), [f,
|
|
21331
|
+
let u = useRef(null), [f, g] = useState(t ?? !1), O = e ?? f;
|
|
21332
21332
|
useEffect(() => {
|
|
21333
21333
|
u.current && (u.current.indeterminate = !!r);
|
|
21334
21334
|
}, [r]);
|
|
21335
|
-
function
|
|
21335
|
+
function A(t) {
|
|
21336
21336
|
let n = t.target.checked;
|
|
21337
|
-
e === void 0 &&
|
|
21337
|
+
e === void 0 && g(n), a?.(n);
|
|
21338
21338
|
}
|
|
21339
21339
|
return /* @__PURE__ */ jsxs("label", {
|
|
21340
21340
|
className: cn("relative inline-flex w-fit cursor-pointer items-center gap-2 select-none", o && "pointer-events-none opacity-50", c),
|
|
@@ -21344,17 +21344,17 @@ function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, in
|
|
|
21344
21344
|
type: "checkbox",
|
|
21345
21345
|
className: cn("absolute h-px w-px overflow-hidden p-0 whitespace-nowrap", "[clip-path:inset(50%)]", "border-0"),
|
|
21346
21346
|
disabled: o,
|
|
21347
|
-
onChange:
|
|
21347
|
+
onChange: A,
|
|
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" : O,
|
|
21353
21353
|
tabIndex: -1,
|
|
21354
|
-
"data-state": r ? "indeterminate" :
|
|
21354
|
+
"data-state": r ? "indeterminate" : O ? "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", !(O || r) && "opacity-0"),
|
|
21358
21358
|
children: r ? i ?? "—" : n ?? "✓"
|
|
21359
21359
|
})
|
|
21360
21360
|
}),
|
|
@@ -21372,10 +21372,10 @@ 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 }) {
|
|
21375
|
-
let [s, c] = useState(!1), f = useRef(null),
|
|
21375
|
+
let [s, c] = useState(!1), f = useRef(null), g = useRef(null), O = useRef(null), [xo, R] = useState(null);
|
|
21376
21376
|
useLayoutEffect(() => {
|
|
21377
|
-
if (!s || !f.current || !
|
|
21378
|
-
let e = f.current.getBoundingClientRect(), t =
|
|
21377
|
+
if (!s || !f.current || !g.current) return;
|
|
21378
|
+
let e = f.current.getBoundingClientRect(), t = g.current.getBoundingClientRect(), o = e.left;
|
|
21379
21379
|
n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
|
|
21380
21380
|
let c;
|
|
21381
21381
|
c = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => R({
|
|
@@ -21389,42 +21389,42 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21389
21389
|
i,
|
|
21390
21390
|
a
|
|
21391
21391
|
]);
|
|
21392
|
-
function
|
|
21393
|
-
|
|
21392
|
+
function So() {
|
|
21393
|
+
O.current &&= (clearTimeout(O.current), null), c(!0);
|
|
21394
21394
|
}
|
|
21395
|
-
function
|
|
21396
|
-
|
|
21395
|
+
function Co() {
|
|
21396
|
+
O.current = window.setTimeout(() => {
|
|
21397
21397
|
c(!1);
|
|
21398
21398
|
}, 120);
|
|
21399
21399
|
}
|
|
21400
21400
|
return useEffect(() => {
|
|
21401
21401
|
function e(e) {
|
|
21402
21402
|
let t = e.target;
|
|
21403
|
-
f.current?.contains(t) ||
|
|
21403
|
+
f.current?.contains(t) || g.current?.contains(t) || c(!1);
|
|
21404
21404
|
}
|
|
21405
21405
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21406
21406
|
}, []), useEffect(() => () => {
|
|
21407
|
-
|
|
21407
|
+
O.current && clearTimeout(O.current);
|
|
21408
21408
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21409
21409
|
value: { close: () => c(!1) },
|
|
21410
21410
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21411
21411
|
ref: f,
|
|
21412
21412
|
className: "inline-flex",
|
|
21413
|
-
onMouseEnter:
|
|
21414
|
-
onMouseLeave:
|
|
21413
|
+
onMouseEnter: So,
|
|
21414
|
+
onMouseLeave: Co,
|
|
21415
21415
|
onClick: () => c((e) => !e),
|
|
21416
21416
|
"aria-haspopup": "menu",
|
|
21417
21417
|
"aria-expanded": s,
|
|
21418
21418
|
children: e
|
|
21419
21419
|
}), s && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21420
|
-
ref:
|
|
21421
|
-
onMouseEnter:
|
|
21422
|
-
onMouseLeave:
|
|
21420
|
+
ref: g,
|
|
21421
|
+
onMouseEnter: So,
|
|
21422
|
+
onMouseLeave: Co,
|
|
21423
21423
|
style: {
|
|
21424
21424
|
position: "fixed",
|
|
21425
|
-
top:
|
|
21426
|
-
left:
|
|
21427
|
-
visibility:
|
|
21425
|
+
top: xo?.top ?? 0,
|
|
21426
|
+
left: xo?.left ?? 0,
|
|
21427
|
+
visibility: xo ? "visible" : "hidden",
|
|
21428
21428
|
zIndex: 1e3
|
|
21429
21429
|
},
|
|
21430
21430
|
children: t
|
|
@@ -21433,11 +21433,11 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21433
21433
|
}
|
|
21434
21434
|
function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1, error: i = !1, placeholder: a, onChange: o, onKeyDown: s, className: c }) {
|
|
21435
21435
|
let [l, u] = useState(n ?? ""), f = t !== void 0, p = f ? t : l;
|
|
21436
|
-
function
|
|
21436
|
+
function g(e) {
|
|
21437
21437
|
let t = e.target.value;
|
|
21438
21438
|
f || u(t), o?.(t);
|
|
21439
21439
|
}
|
|
21440
|
-
function
|
|
21440
|
+
function O(e) {
|
|
21441
21441
|
s?.(e);
|
|
21442
21442
|
}
|
|
21443
21443
|
return /* @__PURE__ */ jsx("input", {
|
|
@@ -21447,8 +21447,8 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21447
21447
|
disabled: r,
|
|
21448
21448
|
"aria-disabled": r || void 0,
|
|
21449
21449
|
"aria-invalid": i || void 0,
|
|
21450
|
-
onChange:
|
|
21451
|
-
onKeyDown:
|
|
21450
|
+
onChange: g,
|
|
21451
|
+
onKeyDown: O,
|
|
21452
21452
|
className: cn("bg-transparent outline-none", r && "pointer-events-none", c)
|
|
21453
21453
|
});
|
|
21454
21454
|
}
|
|
@@ -21486,17 +21486,17 @@ function getVerticalAlign(e, t, n) {
|
|
|
21486
21486
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21487
21487
|
}
|
|
21488
21488
|
function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
|
|
21489
|
-
let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [
|
|
21489
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [g, xo] = useState(null), R = () => {
|
|
21490
21490
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21491
21491
|
f(!0);
|
|
21492
21492
|
}, r);
|
|
21493
|
-
},
|
|
21493
|
+
}, So = () => {
|
|
21494
21494
|
s.current &&= (clearTimeout(s.current), null), f(!1);
|
|
21495
21495
|
};
|
|
21496
21496
|
return useLayoutEffect(() => {
|
|
21497
21497
|
if (!c || !a.current || !o.current) return;
|
|
21498
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)),
|
|
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)), xo((e) => e && e.top === l && e.left === u ? e : {
|
|
21500
21500
|
top: l,
|
|
21501
21501
|
left: u
|
|
21502
21502
|
});
|
|
@@ -21506,18 +21506,18 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
|
|
|
21506
21506
|
ref: a,
|
|
21507
21507
|
className: "inline-flex",
|
|
21508
21508
|
onMouseEnter: R,
|
|
21509
|
-
onMouseLeave:
|
|
21509
|
+
onMouseLeave: So,
|
|
21510
21510
|
onFocus: R,
|
|
21511
|
-
onBlur:
|
|
21511
|
+
onBlur: So,
|
|
21512
21512
|
children: e
|
|
21513
21513
|
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21514
21514
|
ref: o,
|
|
21515
21515
|
role: "tooltip",
|
|
21516
21516
|
style: {
|
|
21517
21517
|
position: "fixed",
|
|
21518
|
-
top:
|
|
21519
|
-
left:
|
|
21520
|
-
visibility:
|
|
21518
|
+
top: g?.top ?? 0,
|
|
21519
|
+
left: g?.left ?? 0,
|
|
21520
|
+
visibility: g ? "visible" : "hidden",
|
|
21521
21521
|
zIndex: 1e3
|
|
21522
21522
|
},
|
|
21523
21523
|
className: cn(i),
|
|
@@ -22363,29 +22363,57 @@ function CheckCircleIcon({ pathProps: e, ...t }) {
|
|
|
22363
22363
|
})
|
|
22364
22364
|
});
|
|
22365
22365
|
}
|
|
22366
|
-
function
|
|
22366
|
+
function FireFillIcon({ pathProps: e, ...t }) {
|
|
22367
22367
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22368
22368
|
viewBox: "0 0 20 20",
|
|
22369
22369
|
...t,
|
|
22370
22370
|
children: /* @__PURE__ */ jsx("path", {
|
|
22371
|
-
d: "
|
|
22371
|
+
d: "M3.72,11.13c0-1.23.27-2.35.82-3.33.54-.99,1.16-1.84,1.85-2.56.69-.72,1.35-1.29,1.98-1.73.63-.44,1.04-.72,1.21-.84v2.01c0,.65.22,1.16.65,1.53.43.38.92.56,1.46.56.25,0,.49-.05.72-.14.23-.09.45-.24.65-.43l.37-.37c.86.56,1.55,1.31,2.07,2.25.52.93.78,1.95.78,3.05,0,1.25-.33,2.38-1,3.38-.66,1-1.53,1.75-2.58,2.24.27-.3.48-.64.63-1.01.15-.38.23-.78.23-1.21,0-.47-.09-.91-.27-1.33-.18-.42-.43-.8-.76-1.13l-2.53-2.47-2.51,2.47c-.34.34-.6.72-.78,1.13-.18.42-.27.86-.27,1.33,0,.43.08.84.23,1.21.15.38.36.72.63,1.01-1.06-.49-1.92-1.23-2.58-2.24-.66-1-1-2.13-1-3.38ZM10,11.33l1.63,1.6c.22.22.38.46.5.72.11.27.17.55.17.86,0,.62-.22,1.16-.67,1.6-.45.44-.99.66-1.63.66s-1.18-.22-1.63-.66c-.45-.44-.67-.97-.67-1.6,0-.29.06-.58.17-.85.11-.27.28-.52.5-.74l1.63-1.6Z",
|
|
22372
22372
|
fill: "currentColor",
|
|
22373
22373
|
...e
|
|
22374
22374
|
})
|
|
22375
22375
|
});
|
|
22376
22376
|
}
|
|
22377
|
-
function
|
|
22377
|
+
function FireIcon({ pathProps: e, ...t }) {
|
|
22378
22378
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22379
|
-
viewBox: "0 0
|
|
22379
|
+
viewBox: "0 0 20 20",
|
|
22380
22380
|
...t,
|
|
22381
22381
|
children: /* @__PURE__ */ jsx("path", {
|
|
22382
|
-
d: "
|
|
22383
|
-
|
|
22384
|
-
strokeWidth: "1.25",
|
|
22382
|
+
d: "M5,11.09c0,.84.2,1.62.6,2.34.4.72.95,1.31,1.65,1.75-.06-.12-.11-.23-.13-.35-.03-.12-.04-.24-.04-.37,0-.39.07-.75.22-1.09.15-.34.36-.65.64-.93l2.06-2.02,2.07,2.02c.28.28.49.59.63.93.15.34.22.7.22,1.09,0,.13-.01.25-.04.37-.03.12-.07.23-.13.35.7-.44,1.25-1.03,1.65-1.75.4-.72.6-1.5.6-2.34,0-.69-.13-1.35-.39-1.97-.26-.62-.63-1.17-1.11-1.66-.28.18-.57.32-.87.41-.31.09-.62.14-.94.14-.87,0-1.62-.28-2.25-.85-.63-.57-.99-1.28-1.09-2.12-.54.45-1.02.93-1.44,1.42-.42.49-.77,1-1.05,1.51-.28.51-.5,1.03-.65,1.56-.15.53-.22,1.05-.22,1.57ZM10,12.17l-1.19,1.17c-.15.15-.27.33-.35.52-.08.19-.12.4-.12.6,0,.44.16.83.49,1.15.33.32.72.48,1.18.48s.85-.16,1.18-.48c.33-.32.49-.7.49-1.15,0-.22-.04-.43-.12-.61s-.2-.36-.35-.51l-1.19-1.17ZM9.58,2.66v2c0,.59.2,1.08.61,1.48.41.4.9.6,1.49.6.26,0,.5-.05.73-.14.23-.1.44-.24.64-.42l.37-.37c.88.56,1.57,1.31,2.07,2.25.5.94.76,1.95.76,3.02,0,1.74-.61,3.22-1.82,4.43-1.21,1.21-2.69,1.82-4.43,1.82s-3.22-.61-4.43-1.82c-1.21-1.21-1.82-2.69-1.82-4.43,0-1.61.52-3.16,1.57-4.65,1.05-1.49,2.47-2.75,4.26-3.77Z",
|
|
22383
|
+
fill: "currentColor",
|
|
22385
22384
|
...e
|
|
22386
22385
|
})
|
|
22387
22386
|
});
|
|
22388
22387
|
}
|
|
22388
|
+
function InsightIcon({ pathProps: e, ...t }) {
|
|
22389
|
+
return /* @__PURE__ */ jsxs(Icon, {
|
|
22390
|
+
viewBox: "0 0 36 36",
|
|
22391
|
+
...t,
|
|
22392
|
+
children: [
|
|
22393
|
+
/* @__PURE__ */ jsx("path", {
|
|
22394
|
+
d: "M17.0527 16.4541C18.2689 19.5795 20.869 22.0499 24.1299 23.2246C20.8699 24.3991 18.2702 26.8695 17.0537 29.9932C15.8366 26.8693 13.2372 24.3989 9.97656 23.2246C13.2373 22.0499 15.8365 19.5788 17.0527 16.4541Z",
|
|
22395
|
+
fill: "currentColor",
|
|
22396
|
+
stroke: "currentColor",
|
|
22397
|
+
strokeWidth: "1.5",
|
|
22398
|
+
...e
|
|
22399
|
+
}),
|
|
22400
|
+
/* @__PURE__ */ jsx("path", {
|
|
22401
|
+
d: "M22.7314 8.93945C23.4251 10.4334 24.6294 11.6381 26.123 12.332C24.6301 13.0254 23.4251 14.2296 22.7314 15.7227C22.0375 14.2298 20.8332 13.0254 19.3398 12.332C20.8337 11.6382 22.0379 10.4335 22.7314 8.93945Z",
|
|
22402
|
+
fill: "currentColor",
|
|
22403
|
+
stroke: "currentColor",
|
|
22404
|
+
strokeWidth: "1.3",
|
|
22405
|
+
...e
|
|
22406
|
+
}),
|
|
22407
|
+
/* @__PURE__ */ jsx("path", {
|
|
22408
|
+
d: "M14.2139 6.0166C14.7609 7.10848 15.6497 7.99743 16.7412 8.54492C15.6505 9.09176 14.7612 9.97957 14.2139 11.0703C13.6666 9.97972 12.7784 9.09169 11.6875 8.54492C12.7791 7.99747 13.6667 7.10806 14.2139 6.0166Z",
|
|
22409
|
+
fill: "currentColor",
|
|
22410
|
+
stroke: "currentColor",
|
|
22411
|
+
strokeWidth: "1.2",
|
|
22412
|
+
...e
|
|
22413
|
+
})
|
|
22414
|
+
]
|
|
22415
|
+
});
|
|
22416
|
+
}
|
|
22389
22417
|
function NotFireIcon({ pathProps: e, ...t }) {
|
|
22390
22418
|
return /* @__PURE__ */ jsxs(Icon, {
|
|
22391
22419
|
viewBox: "0 0 20 20",
|
|
@@ -22568,6 +22596,17 @@ function ExternalLinkIcon({ pathProps: e, ...t }) {
|
|
|
22568
22596
|
})
|
|
22569
22597
|
});
|
|
22570
22598
|
}
|
|
22599
|
+
function HomeIcon({ pathProps: e, ...t }) {
|
|
22600
|
+
return /* @__PURE__ */ jsx(Icon, {
|
|
22601
|
+
viewBox: "0 0 24 24",
|
|
22602
|
+
...t,
|
|
22603
|
+
children: /* @__PURE__ */ jsx("path", {
|
|
22604
|
+
d: "M3.48,21.87h4.75v-8.44h7.54v8.44h4.75v-12.79L12,2.66,3.48,9.08v12.79ZM1.35,24v-15.98L12,0l10.65,8.02v15.98h-9.02v-8.44h-3.28v8.44H1.35Z",
|
|
22605
|
+
fill: "currentColor",
|
|
22606
|
+
...e
|
|
22607
|
+
})
|
|
22608
|
+
});
|
|
22609
|
+
}
|
|
22571
22610
|
function LightIcon({ pathProps: e, ...t }) {
|
|
22572
22611
|
return /* @__PURE__ */ jsx(Icon, {
|
|
22573
22612
|
viewBox: "0 0 24 24",
|
|
@@ -22901,7 +22940,7 @@ function useToastTimers(e, t) {
|
|
|
22901
22940
|
}), n;
|
|
22902
22941
|
});
|
|
22903
22942
|
}, COUNTDOWN_INTERVAL_MS);
|
|
22904
|
-
}, []),
|
|
22943
|
+
}, []), g = useCallback(() => {
|
|
22905
22944
|
if (o.current) return;
|
|
22906
22945
|
o.current = !0;
|
|
22907
22946
|
let e = Date.now();
|
|
@@ -22915,7 +22954,7 @@ function useToastTimers(e, t) {
|
|
|
22915
22954
|
isPaused: !0
|
|
22916
22955
|
});
|
|
22917
22956
|
}), a.current &&= (clearInterval(a.current), null);
|
|
22918
|
-
}, []),
|
|
22957
|
+
}, []), O = useCallback(() => {
|
|
22919
22958
|
o.current && (o.current = !1, i.current.forEach((t, n) => {
|
|
22920
22959
|
if (t.isPaused && t.remainingTime > 0) {
|
|
22921
22960
|
let r = e.find((e) => e.id === n);
|
|
@@ -22926,7 +22965,7 @@ function useToastTimers(e, t) {
|
|
|
22926
22965
|
e,
|
|
22927
22966
|
u,
|
|
22928
22967
|
f
|
|
22929
|
-
]),
|
|
22968
|
+
]), yo = useCallback((e) => {
|
|
22930
22969
|
i.current.delete(e), r((t) => {
|
|
22931
22970
|
let n = new Map(t);
|
|
22932
22971
|
return n.delete(e), n;
|
|
@@ -22946,23 +22985,23 @@ function useToastTimers(e, t) {
|
|
|
22946
22985
|
a.current && clearInterval(a.current);
|
|
22947
22986
|
}, []), {
|
|
22948
22987
|
remainingTimes: n,
|
|
22949
|
-
pauseAll:
|
|
22950
|
-
resumeAll:
|
|
22951
|
-
cleanupTimer:
|
|
22988
|
+
pauseAll: g,
|
|
22989
|
+
resumeAll: O,
|
|
22990
|
+
cleanupTimer: yo
|
|
22952
22991
|
};
|
|
22953
22992
|
}
|
|
22954
22993
|
function Toaster() {
|
|
22955
|
-
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer:
|
|
22994
|
+
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer: xo } = useToastTimers(e, a);
|
|
22956
22995
|
useEffect(() => toastStore.subscribe(t), []);
|
|
22957
|
-
let R = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot),
|
|
22996
|
+
let R = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), So = useCallback((e) => {
|
|
22958
22997
|
e.callbacks?.onOpen?.();
|
|
22959
|
-
}, []),
|
|
22998
|
+
}, []), Co = useCallback((e, t) => {
|
|
22960
22999
|
t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
22961
23000
|
}, []);
|
|
22962
23001
|
useEffect(() => {
|
|
22963
23002
|
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
22964
23003
|
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
22965
|
-
|
|
23004
|
+
Co(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
22966
23005
|
}), r((r) => {
|
|
22967
23006
|
let i = r.map((e) => {
|
|
22968
23007
|
let t = n.get(e.id);
|
|
@@ -22971,7 +23010,7 @@ function Toaster() {
|
|
|
22971
23010
|
content: t.content,
|
|
22972
23011
|
duration: t.duration
|
|
22973
23012
|
} : e;
|
|
22974
|
-
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (
|
|
23013
|
+
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (So(e), {
|
|
22975
23014
|
...e,
|
|
22976
23015
|
animationState: "entering"
|
|
22977
23016
|
})), ...i];
|
|
@@ -22979,30 +23018,30 @@ function Toaster() {
|
|
|
22979
23018
|
}), i.current = t;
|
|
22980
23019
|
}, [
|
|
22981
23020
|
e,
|
|
22982
|
-
|
|
22983
|
-
|
|
23021
|
+
So,
|
|
23022
|
+
Co
|
|
22984
23023
|
]);
|
|
22985
|
-
let
|
|
23024
|
+
let wo = useCallback((e) => {
|
|
22986
23025
|
r((t) => {
|
|
22987
23026
|
let n = t.filter((t) => t.id !== e);
|
|
22988
23027
|
return o.current = n, n;
|
|
22989
|
-
}),
|
|
22990
|
-
}, [
|
|
23028
|
+
}), xo(e), toastStore.cleanup(e);
|
|
23029
|
+
}, [xo]), To = useCallback((e) => {
|
|
22991
23030
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
22992
23031
|
}, []);
|
|
22993
23032
|
if (!R) return null;
|
|
22994
|
-
let
|
|
22995
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23033
|
+
let Eo = groupByPosition(n);
|
|
23034
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(Eo).map(([e, t]) => {
|
|
22996
23035
|
let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
22997
23036
|
className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
|
|
22998
23037
|
children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
|
|
22999
|
-
className: "col-span-full
|
|
23038
|
+
className: "col-span-full col-start-1 row-span-full row-start-1",
|
|
23000
23039
|
style: { zIndex: n.length - t },
|
|
23001
23040
|
children: /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23002
23041
|
toast: e,
|
|
23003
23042
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23004
|
-
onExitComplete:
|
|
23005
|
-
onClose:
|
|
23043
|
+
onExitComplete: wo,
|
|
23044
|
+
onClose: To,
|
|
23006
23045
|
onHoverStart: u,
|
|
23007
23046
|
onHoverEnd: f
|
|
23008
23047
|
})
|
|
@@ -23010,8 +23049,8 @@ function Toaster() {
|
|
|
23010
23049
|
}) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23011
23050
|
toast: e,
|
|
23012
23051
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23013
|
-
onExitComplete:
|
|
23014
|
-
onClose:
|
|
23052
|
+
onExitComplete: wo,
|
|
23053
|
+
onClose: To,
|
|
23015
23054
|
onHoverStart: u,
|
|
23016
23055
|
onHoverEnd: f
|
|
23017
23056
|
}, e.id));
|
|
@@ -23166,18 +23205,18 @@ var statusBadgeStyles = tv({
|
|
|
23166
23205
|
}
|
|
23167
23206
|
};
|
|
23168
23207
|
function StatusBadge({ className: e, label: t, status: n, onAction: r, density: i = "normal" }) {
|
|
23169
|
-
let [a, o] = useState(!1), s = i === "compact", c = STATUS_CONFIG[n], l = s ? c.compact : c.normal, u = statusBadgeStyles({ status: n }), f = l.includes("icon"), p = l.includes("label"),
|
|
23208
|
+
let [a, o] = useState(!1), s = i === "compact", c = STATUS_CONFIG[n], l = s ? c.compact : c.normal, u = statusBadgeStyles({ status: n }), f = l.includes("icon"), p = l.includes("label"), g = l.includes("action") && r;
|
|
23170
23209
|
return /* @__PURE__ */ jsx(Badge, {
|
|
23171
23210
|
className: cn(u.root(), s ? "h-6 w-6" : "py-1 pr-2.5 pl-2", e),
|
|
23172
23211
|
icon: f ? /* @__PURE__ */ jsx(c.icon, {
|
|
23173
23212
|
size: 16,
|
|
23174
|
-
className: cn(u.text(), s &&
|
|
23213
|
+
className: cn(u.text(), s && g && "absolute inset-0 m-auto", s && g && a && "opacity-0")
|
|
23175
23214
|
}) : void 0,
|
|
23176
23215
|
label: p ? /* @__PURE__ */ jsx("span", {
|
|
23177
23216
|
className: cn(u.text(), s && "absolute inset-0 flex items-center justify-center text-center text-[10px]"),
|
|
23178
23217
|
children: t ?? c.label
|
|
23179
23218
|
}) : void 0,
|
|
23180
|
-
action:
|
|
23219
|
+
action: g ? /* @__PURE__ */ jsx(Button, {
|
|
23181
23220
|
onClick: r,
|
|
23182
23221
|
"aria-label": "Dismiss status",
|
|
23183
23222
|
className: cn("group", s ? cn("absolute inset-0 m-auto transition-opacity", a ? "opacity-100" : "opacity-0") : void 0),
|
|
@@ -23223,13 +23262,13 @@ function InfoTooltip({ className: e, ...t }) {
|
|
|
23223
23262
|
});
|
|
23224
23263
|
}
|
|
23225
23264
|
function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n, actions: r, defaultDensity: i = "normal", onDensityChange: a, className: o }) {
|
|
23226
|
-
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"),
|
|
23265
|
+
let s = e > 0, c = s && t === e, l = s && t > 0 && t < e, u = c ? `All (${e})` : l ? `${t}/${e} selected` : `Select all (${e})`, [f, p] = useState(i ?? "normal"), g = () => {
|
|
23227
23266
|
n(!c);
|
|
23228
23267
|
};
|
|
23229
|
-
function
|
|
23268
|
+
function A(e) {
|
|
23230
23269
|
p(e), a?.(e);
|
|
23231
23270
|
}
|
|
23232
|
-
let
|
|
23271
|
+
let xo = {
|
|
23233
23272
|
fire: [{
|
|
23234
23273
|
id: "fire",
|
|
23235
23274
|
tooltip: "Mark as fire",
|
|
@@ -23296,7 +23335,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23296
23335
|
/* @__PURE__ */ jsx(Checkbox, {
|
|
23297
23336
|
checked: c,
|
|
23298
23337
|
indeterminate: l,
|
|
23299
|
-
onChange:
|
|
23338
|
+
onChange: g,
|
|
23300
23339
|
icon: /* @__PURE__ */ jsx(CheckboxIcon, {
|
|
23301
23340
|
size: 16,
|
|
23302
23341
|
className: "text-white-variant-7"
|
|
@@ -23310,7 +23349,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23310
23349
|
}),
|
|
23311
23350
|
/* @__PURE__ */ jsx("div", {
|
|
23312
23351
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23313
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23352
|
+
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(xo).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
23314
23353
|
className: "flex items-center gap-2 px-1",
|
|
23315
23354
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23316
23355
|
content: e.tooltip,
|
|
@@ -23331,7 +23370,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23331
23370
|
content: t,
|
|
23332
23371
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
23333
23372
|
className: cn("h-7 w-7 p-0 text-neutral-900", r && "bg-white-variant-4"),
|
|
23334
|
-
onClick: () =>
|
|
23373
|
+
onClick: () => A(e),
|
|
23335
23374
|
icon: n,
|
|
23336
23375
|
"aria-pressed": r
|
|
23337
23376
|
})
|
|
@@ -23399,6 +23438,7 @@ var filterButtonStyles = tv({
|
|
|
23399
23438
|
}), FILTER_BUTTON_META = {
|
|
23400
23439
|
fire: {
|
|
23401
23440
|
icon: FireIcon,
|
|
23441
|
+
selectedIcon: FireFillIcon,
|
|
23402
23442
|
label: "Fire",
|
|
23403
23443
|
iconColor: "text-tertiary-500"
|
|
23404
23444
|
},
|
|
@@ -23431,7 +23471,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23431
23471
|
let c = !!o, l = filterButtonStyles({
|
|
23432
23472
|
variant: e,
|
|
23433
23473
|
selected: !c && r
|
|
23434
|
-
}), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label,
|
|
23474
|
+
}), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? (u && !c && r && "selectedIcon" in u && u.selectedIcon ? u.selectedIcon : u?.icon), p = t ?? u?.label, h = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
|
|
23435
23475
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23436
23476
|
...s,
|
|
23437
23477
|
disabled: o,
|
|
@@ -23439,7 +23479,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23439
23479
|
className: cn("group", l.root(), c && "border-neutral-300 bg-white hover:border-neutral-300", a?.root),
|
|
23440
23480
|
children: [f && /* @__PURE__ */ jsx("span", {
|
|
23441
23481
|
className: cn("flex items-center", a?.icon),
|
|
23442
|
-
children: renderIcon$1(f, cn("shrink-0",
|
|
23482
|
+
children: renderIcon$1(f, cn("shrink-0", h))
|
|
23443
23483
|
}), p && /* @__PURE__ */ jsxs("span", {
|
|
23444
23484
|
className: cn(l.label(), c && "font-medium text-neutral-400", a?.label),
|
|
23445
23485
|
children: [/* @__PURE__ */ jsx("span", { children: p }), typeof n == "number" && n > 0 && /* @__PURE__ */ jsxs("span", {
|
|
@@ -23580,20 +23620,20 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
|
|
|
23580
23620
|
})
|
|
23581
23621
|
}), document.body);
|
|
23582
23622
|
}
|
|
23583
|
-
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: f, classNames:
|
|
23584
|
-
let
|
|
23623
|
+
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: f, classNames: g, ...O }) {
|
|
23624
|
+
let A = iconCountButtonStyles({
|
|
23585
23625
|
variant: r,
|
|
23586
23626
|
orientation: i,
|
|
23587
23627
|
status: a
|
|
23588
|
-
}),
|
|
23589
|
-
function
|
|
23590
|
-
c === void 0 &&
|
|
23628
|
+
}), xo = useRef(null), [R, So] = useState(!1), [Co, wo] = useState(!1), [To, Eo] = useState(l), [Do, Oo] = useState(null), ko = c ?? To, Ao = s && (R || Co || ko), jo = typeof n == "number" && n > 0 && (o || a === "active");
|
|
23629
|
+
function Mo(e) {
|
|
23630
|
+
c === void 0 && Eo(e), f?.(e);
|
|
23591
23631
|
}
|
|
23592
23632
|
return useLayoutEffect(() => {
|
|
23593
|
-
if (!
|
|
23633
|
+
if (!Ao || !xo.current) return;
|
|
23594
23634
|
function e() {
|
|
23595
|
-
let e =
|
|
23596
|
-
e &&
|
|
23635
|
+
let e = xo.current?.getBoundingClientRect();
|
|
23636
|
+
e && Oo({
|
|
23597
23637
|
top: e.top - 8,
|
|
23598
23638
|
left: e.right - 12
|
|
23599
23639
|
});
|
|
@@ -23601,30 +23641,30 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23601
23641
|
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
23602
23642
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
23603
23643
|
};
|
|
23604
|
-
}, [
|
|
23605
|
-
...
|
|
23606
|
-
className: cn(
|
|
23607
|
-
onMouseEnter: () =>
|
|
23608
|
-
onMouseLeave: () =>
|
|
23644
|
+
}, [Ao]), /* @__PURE__ */ jsxs(Button, {
|
|
23645
|
+
...O,
|
|
23646
|
+
className: cn(A.root(), g?.root),
|
|
23647
|
+
onMouseEnter: () => So(!0),
|
|
23648
|
+
onMouseLeave: () => So(!1),
|
|
23609
23649
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23610
23650
|
className: "relative",
|
|
23611
23651
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23612
|
-
ref:
|
|
23613
|
-
className: cn(
|
|
23614
|
-
children: renderIcon(e,
|
|
23615
|
-
}),
|
|
23616
|
-
isPressed:
|
|
23617
|
-
isPortalHovered:
|
|
23618
|
-
portalPosition:
|
|
23619
|
-
onMouseEnter: () =>
|
|
23620
|
-
onMouseLeave: () =>
|
|
23621
|
-
onToggle: () =>
|
|
23652
|
+
ref: xo,
|
|
23653
|
+
className: cn(A.bubble(), g?.bubble),
|
|
23654
|
+
children: renderIcon(e, A.icon())
|
|
23655
|
+
}), Ao && Do && typeof document < "u" && ToggleControlPortal({
|
|
23656
|
+
isPressed: ko,
|
|
23657
|
+
isPortalHovered: Co,
|
|
23658
|
+
portalPosition: Do,
|
|
23659
|
+
onMouseEnter: () => wo(!0),
|
|
23660
|
+
onMouseLeave: () => wo(!1),
|
|
23661
|
+
onToggle: () => Mo(!ko)
|
|
23622
23662
|
})]
|
|
23623
23663
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23624
|
-
className: cn(
|
|
23625
|
-
children: [/* @__PURE__ */ jsx("span", { children: t }),
|
|
23664
|
+
className: cn(A.label(), g?.label),
|
|
23665
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), jo && /* @__PURE__ */ jsxs("span", {
|
|
23626
23666
|
"aria-label": `${n} items`,
|
|
23627
|
-
className: cn(
|
|
23667
|
+
className: cn(A.count(), g?.count),
|
|
23628
23668
|
children: [
|
|
23629
23669
|
"(",
|
|
23630
23670
|
formatCount(n),
|
|
@@ -23656,7 +23696,7 @@ function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
|
23656
23696
|
});
|
|
23657
23697
|
}
|
|
23658
23698
|
function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
|
|
23659
|
-
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t),
|
|
23699
|
+
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), g = useRef(n), [O, A] = useState(() => {
|
|
23660
23700
|
let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
|
|
23661
23701
|
return {
|
|
23662
23702
|
year: r.getFullYear(),
|
|
@@ -23664,28 +23704,28 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23664
23704
|
};
|
|
23665
23705
|
});
|
|
23666
23706
|
useEffect(() => {
|
|
23667
|
-
(e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !==
|
|
23668
|
-
if (e === "single" && t)
|
|
23707
|
+
(e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !== g.current.startDate?.getTime() || n.endDate?.getTime() !== g.current.endDate?.getTime())) && queueMicrotask(() => {
|
|
23708
|
+
if (e === "single" && t) A({
|
|
23669
23709
|
year: t.getFullYear(),
|
|
23670
23710
|
month: t.getMonth()
|
|
23671
23711
|
});
|
|
23672
23712
|
else if (e === "range") {
|
|
23673
23713
|
let e = n.startDate ?? n.endDate;
|
|
23674
|
-
e &&
|
|
23714
|
+
e && A({
|
|
23675
23715
|
year: e.getFullYear(),
|
|
23676
23716
|
month: e.getMonth()
|
|
23677
23717
|
});
|
|
23678
23718
|
}
|
|
23679
|
-
}), u.current = t,
|
|
23719
|
+
}), u.current = t, g.current = n;
|
|
23680
23720
|
}, [
|
|
23681
23721
|
e,
|
|
23682
23722
|
t,
|
|
23683
23723
|
n
|
|
23684
23724
|
]);
|
|
23685
|
-
let
|
|
23725
|
+
let xo = useMemo(() => generateCalendarDays(O.year, O.month), [O.year, O.month]);
|
|
23686
23726
|
function R(t) {
|
|
23687
23727
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23688
|
-
if ((o !==
|
|
23728
|
+
if ((o !== O.month || s !== O.year) && A({
|
|
23689
23729
|
year: s,
|
|
23690
23730
|
month: o
|
|
23691
23731
|
}), e === "single") r(t), a();
|
|
@@ -23700,8 +23740,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23700
23740
|
}), a());
|
|
23701
23741
|
}
|
|
23702
23742
|
}
|
|
23703
|
-
function
|
|
23704
|
-
|
|
23743
|
+
function So() {
|
|
23744
|
+
A((e) => e.month === 0 ? {
|
|
23705
23745
|
year: e.year - 1,
|
|
23706
23746
|
month: 11
|
|
23707
23747
|
} : {
|
|
@@ -23709,8 +23749,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23709
23749
|
month: e.month - 1
|
|
23710
23750
|
});
|
|
23711
23751
|
}
|
|
23712
|
-
function
|
|
23713
|
-
|
|
23752
|
+
function Co() {
|
|
23753
|
+
A((e) => e.month === 11 ? {
|
|
23714
23754
|
year: e.year + 1,
|
|
23715
23755
|
month: 0
|
|
23716
23756
|
} : {
|
|
@@ -23718,7 +23758,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23718
23758
|
month: e.month + 1
|
|
23719
23759
|
});
|
|
23720
23760
|
}
|
|
23721
|
-
let
|
|
23761
|
+
let wo = getWeekdays();
|
|
23722
23762
|
return /* @__PURE__ */ jsxs("div", {
|
|
23723
23763
|
className: "mt-1 w-fit rounded-lg border border-neutral-400 bg-white p-2 shadow-lg",
|
|
23724
23764
|
children: [
|
|
@@ -23730,16 +23770,16 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23730
23770
|
direction: "left",
|
|
23731
23771
|
size: 20
|
|
23732
23772
|
}),
|
|
23733
|
-
onClick:
|
|
23773
|
+
onClick: So,
|
|
23734
23774
|
className: "hover:opacity-60",
|
|
23735
23775
|
"aria-label": "Previous month"
|
|
23736
23776
|
}),
|
|
23737
23777
|
/* @__PURE__ */ jsxs("div", {
|
|
23738
23778
|
className: "text-[10px] font-bold text-neutral-900",
|
|
23739
23779
|
children: [
|
|
23740
|
-
getMonthName(
|
|
23780
|
+
getMonthName(O.month),
|
|
23741
23781
|
" ",
|
|
23742
|
-
|
|
23782
|
+
O.year
|
|
23743
23783
|
]
|
|
23744
23784
|
}),
|
|
23745
23785
|
/* @__PURE__ */ jsx(IconButton, {
|
|
@@ -23747,7 +23787,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23747
23787
|
direction: "right",
|
|
23748
23788
|
size: 20
|
|
23749
23789
|
}),
|
|
23750
|
-
onClick:
|
|
23790
|
+
onClick: Co,
|
|
23751
23791
|
className: "hover:opacity-60",
|
|
23752
23792
|
"aria-label": "Next month"
|
|
23753
23793
|
})
|
|
@@ -23755,17 +23795,17 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23755
23795
|
}),
|
|
23756
23796
|
/* @__PURE__ */ jsx("div", {
|
|
23757
23797
|
className: "mb-2 grid grid-cols-7",
|
|
23758
|
-
children:
|
|
23798
|
+
children: wo.map((e) => /* @__PURE__ */ jsx("div", {
|
|
23759
23799
|
className: "flex items-center justify-center p-0.5 text-[9px] font-bold text-neutral-900",
|
|
23760
23800
|
children: e
|
|
23761
23801
|
}, e))
|
|
23762
23802
|
}),
|
|
23763
23803
|
/* @__PURE__ */ jsx("div", {
|
|
23764
23804
|
className: "grid grid-cols-7",
|
|
23765
|
-
children:
|
|
23766
|
-
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u),
|
|
23767
|
-
e === "range" && u && !f && s && !isDateBefore(s, u) ? (
|
|
23768
|
-
let
|
|
23805
|
+
children: xo.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
23806
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), g = u, O = s;
|
|
23807
|
+
e === "range" && u && !f && s && !isDateBefore(s, u) ? (g = u, O = s) : (g = null, O = null);
|
|
23808
|
+
let bo = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, g, O)), A = l || p || h;
|
|
23769
23809
|
return /* @__PURE__ */ jsx(Button, {
|
|
23770
23810
|
type: "button",
|
|
23771
23811
|
onClick: () => R(i),
|
|
@@ -23777,9 +23817,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23777
23817
|
},
|
|
23778
23818
|
className: "p-0.5",
|
|
23779
23819
|
"aria-label": `Select ${formatDate(i)}`,
|
|
23780
|
-
"aria-selected":
|
|
23820
|
+
"aria-selected": A || void 0,
|
|
23781
23821
|
children: /* @__PURE__ */ jsx("div", {
|
|
23782
|
-
className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors",
|
|
23822
|
+
className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", A && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500", bo && !A && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !A && !bo && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !A && !bo && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
23783
23823
|
children: r
|
|
23784
23824
|
})
|
|
23785
23825
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -23841,14 +23881,14 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23841
23881
|
startDate: null,
|
|
23842
23882
|
endDate: null
|
|
23843
23883
|
};
|
|
23844
|
-
function
|
|
23884
|
+
function g(t) {
|
|
23845
23885
|
e === "single" && (u || s(t), r?.(t));
|
|
23846
23886
|
}
|
|
23847
|
-
function
|
|
23887
|
+
function bo(t) {
|
|
23848
23888
|
e === "range" && (u || l(t), r?.(t));
|
|
23849
23889
|
}
|
|
23850
|
-
function
|
|
23851
|
-
e === "single" ?
|
|
23890
|
+
function A() {
|
|
23891
|
+
e === "single" ? g(null) : bo({
|
|
23852
23892
|
startDate: null,
|
|
23853
23893
|
endDate: null
|
|
23854
23894
|
});
|
|
@@ -23858,15 +23898,15 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23858
23898
|
displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
|
|
23859
23899
|
disabled: i,
|
|
23860
23900
|
className: a,
|
|
23861
|
-
onClear:
|
|
23901
|
+
onClear: A
|
|
23862
23902
|
}),
|
|
23863
23903
|
disabled: i,
|
|
23864
23904
|
children: /* @__PURE__ */ jsx(CalendarPanel, {
|
|
23865
23905
|
mode: e,
|
|
23866
23906
|
selectedDate: f,
|
|
23867
23907
|
selectedRange: p,
|
|
23868
|
-
onDateSelect:
|
|
23869
|
-
onRangeSelect:
|
|
23908
|
+
onDateSelect: g,
|
|
23909
|
+
onRangeSelect: bo
|
|
23870
23910
|
})
|
|
23871
23911
|
}) });
|
|
23872
23912
|
}
|
|
@@ -23879,6 +23919,9 @@ const EVENT_CARD_HEIGHT_SIZE = {
|
|
|
23879
23919
|
style: "h-[60px]",
|
|
23880
23920
|
value: 60
|
|
23881
23921
|
}
|
|
23922
|
+
}, EVENT_SUMMARY_CARD_HEIGHT_SIZE = {
|
|
23923
|
+
style: "h-[104px]",
|
|
23924
|
+
value: 104
|
|
23882
23925
|
};
|
|
23883
23926
|
function EventCardSkeleton({ density: e = "normal", className: t, style: n }) {
|
|
23884
23927
|
return /* @__PURE__ */ jsx(Card, {
|
|
@@ -24069,18 +24112,18 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
24069
24112
|
}) })
|
|
24070
24113
|
});
|
|
24071
24114
|
}
|
|
24072
|
-
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges:
|
|
24115
|
+
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: g = {}, density: O = "normal", className: A, style: xo, isPriority: R, isDone: So }) {
|
|
24073
24116
|
return /* @__PURE__ */ jsx(Card, {
|
|
24074
24117
|
as: Pressable,
|
|
24075
24118
|
onPress: u,
|
|
24076
24119
|
className: cn(eventCardStyles({
|
|
24077
|
-
tone: R ? "priority" :
|
|
24120
|
+
tone: R ? "priority" : So ? "done" : "default",
|
|
24078
24121
|
state: l ? "selected" : c ? "read" : "unread",
|
|
24079
|
-
density:
|
|
24080
|
-
}),
|
|
24081
|
-
style:
|
|
24122
|
+
density: O
|
|
24123
|
+
}), A),
|
|
24124
|
+
style: xo,
|
|
24082
24125
|
"data-service": t,
|
|
24083
|
-
children:
|
|
24126
|
+
children: O === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
24084
24127
|
className: "gap-x-2 gap-y-1",
|
|
24085
24128
|
children: [
|
|
24086
24129
|
/* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
@@ -24115,8 +24158,8 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24115
24158
|
}),
|
|
24116
24159
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
24117
24160
|
className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1",
|
|
24118
|
-
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges:
|
|
24119
|
-
actions:
|
|
24161
|
+
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
24162
|
+
actions: g,
|
|
24120
24163
|
className: "col-start-2 justify-self-end"
|
|
24121
24164
|
})]
|
|
24122
24165
|
})
|
|
@@ -24134,8 +24177,8 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24134
24177
|
children: [
|
|
24135
24178
|
e,
|
|
24136
24179
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
24137
|
-
statusBadges:
|
|
24138
|
-
density:
|
|
24180
|
+
statusBadges: h,
|
|
24181
|
+
density: O
|
|
24139
24182
|
}),
|
|
24140
24183
|
/* @__PURE__ */ jsxs("div", {
|
|
24141
24184
|
className: cn("flex min-w-0 items-center gap-2 text-sm font-bold whitespace-nowrap text-neutral-900", c && "font-medium"),
|
|
@@ -24155,7 +24198,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24155
24198
|
]
|
|
24156
24199
|
}),
|
|
24157
24200
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
24158
|
-
/* @__PURE__ */ jsx(EventActionsList, { actions:
|
|
24201
|
+
/* @__PURE__ */ jsx(EventActionsList, { actions: g }),
|
|
24159
24202
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
24160
24203
|
content: o,
|
|
24161
24204
|
children: /* @__PURE__ */ jsx("span", {
|
|
@@ -24632,12 +24675,12 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
|
|
|
24632
24675
|
]
|
|
24633
24676
|
})] });
|
|
24634
24677
|
}
|
|
24635
|
-
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related:
|
|
24678
|
+
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related: h }, className: g }) {
|
|
24636
24679
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24637
24680
|
summary: e,
|
|
24638
24681
|
priorityText: n,
|
|
24639
24682
|
highlightPriority: !!n,
|
|
24640
|
-
className:
|
|
24683
|
+
className: g,
|
|
24641
24684
|
children: [
|
|
24642
24685
|
/* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
|
|
24643
24686
|
issue: r,
|
|
@@ -24650,7 +24693,7 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
24650
24693
|
reporter: u,
|
|
24651
24694
|
team: f,
|
|
24652
24695
|
location: p,
|
|
24653
|
-
related:
|
|
24696
|
+
related: h
|
|
24654
24697
|
}),
|
|
24655
24698
|
/* @__PURE__ */ jsx("h2", {
|
|
24656
24699
|
className: "px-4 text-sm font-bold text-neutral-900",
|
|
@@ -24871,6 +24914,162 @@ const EventEmptyState = ({ icon: e, title: t, description: n }) => /* @__PURE__
|
|
|
24871
24914
|
})]
|
|
24872
24915
|
})]
|
|
24873
24916
|
});
|
|
24917
|
+
function EventSummaryCardSkeleton({ className: e, style: t }) {
|
|
24918
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24919
|
+
className: cn("flex w-full flex-col justify-between gap-1 rounded-lg border-[1.5px] border-neutral-400 bg-white-variant-5 p-4", EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, e),
|
|
24920
|
+
style: t,
|
|
24921
|
+
children: [
|
|
24922
|
+
/* @__PURE__ */ jsxs("div", {
|
|
24923
|
+
className: "grid grid-cols-[auto_minmax(0,1fr)_auto_auto_auto_auto] items-center gap-1.5",
|
|
24924
|
+
children: [
|
|
24925
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-4" }),
|
|
24926
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-full max-w-40" }),
|
|
24927
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-4 rounded-full" }),
|
|
24928
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-3 w-12" }),
|
|
24929
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-5 w-16 rounded-full" }),
|
|
24930
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "size-5 rounded-full" })
|
|
24931
|
+
]
|
|
24932
|
+
}),
|
|
24933
|
+
/* @__PURE__ */ jsx(Skeleton, { className: "h-4 w-7/12" }),
|
|
24934
|
+
/* @__PURE__ */ jsxs("div", {
|
|
24935
|
+
className: "flex items-center gap-2",
|
|
24936
|
+
children: [/* @__PURE__ */ jsx(Skeleton, { className: "h-4 min-w-0 flex-1" }), /* @__PURE__ */ jsx(Skeleton, { className: "size-5 shrink-0" })]
|
|
24937
|
+
})
|
|
24938
|
+
]
|
|
24939
|
+
});
|
|
24940
|
+
}
|
|
24941
|
+
var eventSummaryCardStyles = tv({
|
|
24942
|
+
base: "flex w-full flex-col justify-between gap-1 rounded-lg border-[1.5px] bg-white-variant-5 p-4",
|
|
24943
|
+
variants: {
|
|
24944
|
+
tone: {
|
|
24945
|
+
default: "hover:bg-primary-light",
|
|
24946
|
+
priority: "hover:bg-tertiary-500-variant-4"
|
|
24947
|
+
},
|
|
24948
|
+
state: {
|
|
24949
|
+
normal: "",
|
|
24950
|
+
selected: ""
|
|
24951
|
+
}
|
|
24952
|
+
},
|
|
24953
|
+
compoundVariants: [
|
|
24954
|
+
{
|
|
24955
|
+
tone: "default",
|
|
24956
|
+
state: "normal",
|
|
24957
|
+
class: "border-neutral-400"
|
|
24958
|
+
},
|
|
24959
|
+
{
|
|
24960
|
+
tone: "default",
|
|
24961
|
+
state: "selected",
|
|
24962
|
+
class: "border-primary-500 bg-primary-light"
|
|
24963
|
+
},
|
|
24964
|
+
{
|
|
24965
|
+
tone: "priority",
|
|
24966
|
+
state: "normal",
|
|
24967
|
+
class: "border-tertiary-500-variant-3"
|
|
24968
|
+
},
|
|
24969
|
+
{
|
|
24970
|
+
tone: "priority",
|
|
24971
|
+
state: "selected",
|
|
24972
|
+
class: "border-tertiary-500-variant-2 bg-tertiary-500-variant-4"
|
|
24973
|
+
}
|
|
24974
|
+
]
|
|
24975
|
+
});
|
|
24976
|
+
function insightLabelVisible(e) {
|
|
24977
|
+
return e != null && e !== "";
|
|
24978
|
+
}
|
|
24979
|
+
function EventSummaryInsightChip({ label: e }) {
|
|
24980
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24981
|
+
className: "inline-flex h-5 shrink-0 items-center gap-1 rounded-full border border-primary-400 bg-primary-light px-1.5",
|
|
24982
|
+
children: [/* @__PURE__ */ jsx(InsightIcon, {
|
|
24983
|
+
size: 13,
|
|
24984
|
+
className: "text-primary-500"
|
|
24985
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
24986
|
+
className: "text-[10px] leading-none font-semibold whitespace-nowrap text-primary-500",
|
|
24987
|
+
children: e
|
|
24988
|
+
})]
|
|
24989
|
+
});
|
|
24990
|
+
}
|
|
24991
|
+
function EventSummaryFireButton({ active: e, onClick: t }) {
|
|
24992
|
+
return /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
|
|
24993
|
+
className: cn("group h-5 w-5 rounded-full border border-neutral-300 hover:border-tertiary-400 hover:bg-tertiary-50", e && "border-tertiary-400 bg-tertiary-50"),
|
|
24994
|
+
icon: e ? /* @__PURE__ */ jsxs("span", {
|
|
24995
|
+
className: "contents",
|
|
24996
|
+
children: [/* @__PURE__ */ jsx(FireFillIcon, {
|
|
24997
|
+
size: 16,
|
|
24998
|
+
className: "block text-tertiary-500-variant-2 opacity-100 group-hover:hidden group-hover:opacity-0"
|
|
24999
|
+
}), /* @__PURE__ */ jsx(CloseIcon, {
|
|
25000
|
+
size: 12,
|
|
25001
|
+
className: "hidden text-neutral-500 opacity-0 group-hover:block group-hover:text-tertiary-500-variant-2 group-hover:opacity-100",
|
|
25002
|
+
strokeWidth: 2
|
|
25003
|
+
})]
|
|
25004
|
+
}) : /* @__PURE__ */ jsx(FireIcon, {
|
|
25005
|
+
size: 16,
|
|
25006
|
+
className: "text-neutral-500 group-hover:text-tertiary-500-variant-2"
|
|
25007
|
+
}),
|
|
25008
|
+
onClick: t,
|
|
25009
|
+
"aria-pressed": e
|
|
25010
|
+
}) });
|
|
25011
|
+
}
|
|
25012
|
+
function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, workspace: o, selected: s = !1, onSelect: c, actions: l, className: u }) {
|
|
25013
|
+
let { fire: f, insight: p, link: h } = l, g = p?.label ?? null;
|
|
25014
|
+
return /* @__PURE__ */ jsxs(Pressable, {
|
|
25015
|
+
onPress: c,
|
|
25016
|
+
className: cn(eventSummaryCardStyles({
|
|
25017
|
+
tone: f.active ? "priority" : "default",
|
|
25018
|
+
state: s ? "selected" : "normal"
|
|
25019
|
+
}), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
|
|
25020
|
+
"data-service": t,
|
|
25021
|
+
children: [
|
|
25022
|
+
/* @__PURE__ */ jsxs("div", {
|
|
25023
|
+
className: "flex items-center justify-between gap-1.5",
|
|
25024
|
+
children: [
|
|
25025
|
+
e,
|
|
25026
|
+
/* @__PURE__ */ jsx("span", {
|
|
25027
|
+
className: "min-w-0 -translate-x-0.5 truncate text-sm font-medium text-neutral-900",
|
|
25028
|
+
children: n
|
|
25029
|
+
}),
|
|
25030
|
+
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
25031
|
+
content: o,
|
|
25032
|
+
children: /* @__PURE__ */ jsx(Avatar, {
|
|
25033
|
+
name: o,
|
|
25034
|
+
size: "xs"
|
|
25035
|
+
})
|
|
25036
|
+
}),
|
|
25037
|
+
/* @__PURE__ */ jsx("span", {
|
|
25038
|
+
className: "flex-1 text-right text-xs leading-tight font-semibold tracking-wide whitespace-nowrap text-neutral-800",
|
|
25039
|
+
children: a
|
|
25040
|
+
}),
|
|
25041
|
+
insightLabelVisible(g) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: g }),
|
|
25042
|
+
/* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
25043
|
+
active: f.active,
|
|
25044
|
+
onClick: f.onClick
|
|
25045
|
+
})
|
|
25046
|
+
]
|
|
25047
|
+
}),
|
|
25048
|
+
/* @__PURE__ */ jsx("div", {
|
|
25049
|
+
className: "line-clamp-1 text-sm font-medium text-neutral-900",
|
|
25050
|
+
children: r
|
|
25051
|
+
}),
|
|
25052
|
+
/* @__PURE__ */ jsxs("div", {
|
|
25053
|
+
className: "flex gap-2",
|
|
25054
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
25055
|
+
className: "line-clamp-1 min-w-0 flex-1 text-sm font-normal text-neutral-700",
|
|
25056
|
+
children: i
|
|
25057
|
+
}), /* @__PURE__ */ jsx(InfoTooltip, {
|
|
25058
|
+
content: h.tooltip,
|
|
25059
|
+
children: /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx(IconButton, {
|
|
25060
|
+
type: "button",
|
|
25061
|
+
icon: /* @__PURE__ */ jsx(ExternalLinkIcon, {
|
|
25062
|
+
size: 16,
|
|
25063
|
+
className: "text-neutral-800"
|
|
25064
|
+
}),
|
|
25065
|
+
className: "text-primary-500",
|
|
25066
|
+
onClick: h.onClick
|
|
25067
|
+
}) })
|
|
25068
|
+
})]
|
|
25069
|
+
})
|
|
25070
|
+
]
|
|
25071
|
+
});
|
|
25072
|
+
}
|
|
24874
25073
|
function FilterBarSkeleton({ itemCount: e = 3, className: t }) {
|
|
24875
25074
|
return /* @__PURE__ */ jsx("div", {
|
|
24876
25075
|
className: cn("flex flex-wrap items-center gap-2", t),
|
|
@@ -25064,10 +25263,10 @@ function IntegrationItem({ account: e, valid: t, disconnectLabel: n, onDisconnec
|
|
|
25064
25263
|
}
|
|
25065
25264
|
function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...", onChange: r, onKeyDown: i, onClear: a, disabled: o = !1, className: s }) {
|
|
25066
25265
|
let [c, l] = useState(t ?? ""), u = typeof e == "string", f = u ? e : c, p = f.length > 0;
|
|
25067
|
-
function
|
|
25266
|
+
function g(e) {
|
|
25068
25267
|
u || l(e), r?.(e);
|
|
25069
25268
|
}
|
|
25070
|
-
function
|
|
25269
|
+
function O() {
|
|
25071
25270
|
u || l(""), r?.(""), a?.();
|
|
25072
25271
|
}
|
|
25073
25272
|
return /* @__PURE__ */ jsxs("fieldset", {
|
|
@@ -25083,7 +25282,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25083
25282
|
type: "text",
|
|
25084
25283
|
value: f,
|
|
25085
25284
|
placeholder: n,
|
|
25086
|
-
onChange:
|
|
25285
|
+
onChange: g,
|
|
25087
25286
|
onKeyDown: i,
|
|
25088
25287
|
className: cn("m-0 h-5 min-w-0 flex-1 border-0 p-0 text-xs text-neutral-800", "bg-transparent outline-none", "placeholder:text-neutral-700-alpha-60", o && "text-neutral-700-alpha-60")
|
|
25089
25288
|
}),
|
|
@@ -25093,7 +25292,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25093
25292
|
size: 16,
|
|
25094
25293
|
className: "text-neutral-700"
|
|
25095
25294
|
}),
|
|
25096
|
-
onClick:
|
|
25295
|
+
onClick: O,
|
|
25097
25296
|
"aria-label": "Clear search",
|
|
25098
25297
|
className: "rounded p-0 transition-opacity hover:opacity-70"
|
|
25099
25298
|
})
|
|
@@ -25280,6 +25479,6 @@ function QtaloImage({ size: e = 40, className: t, ...n }) {
|
|
|
25280
25479
|
}) })]
|
|
25281
25480
|
});
|
|
25282
25481
|
}
|
|
25283
|
-
export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddCircleIcon, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, CheckSquareIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EmptyBoxIcon, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, EventEmptyState, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireIcon, GmailIcon, GoogleCalendarIcon, Icon, IconButton, IconCountButton, IconCountButtonSkeleton, InfoTooltip, Input, InsightIcon, IntegrationBar, IntegrationBarSkeleton, IntegrationItem, IntegrationItemSkeleton, IntegrationsCard, JiraIcon, LightIcon, LogoIcon, MinusIcon, MoreIcon, NormalDensityIcon, NotFireIcon, OutlookCalendarIcon, OutlookIcon, Pressable, QtaloImage, ReadIcon, RichContent, SearchIcon, SearchInput, SignOutIcon, Skeleton, SlackIcon, StatusBadge, StopPropagation, SummaryIcon, SystemIcon, TeamsIcon, Toaster, Tooltip, UnreadIcon, capitalize, cn, colors, formatDate, formatDateRange, formatTimestamp, generateCalendarDays, getDaysInMonth, getFirstDayOfMonth, getInitials, getMonthName, getWeekdays, isDateBefore, isDateInRange, isSameDay, isToday, normalizeContent, parseDate, pickColorFromPalette, stringHash, toMondayBased, toast, toastStore, useAccordion, useDropdown, useLongPress };
|
|
25482
|
+
export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddCircleIcon, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, CheckSquareIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EVENT_SUMMARY_CARD_HEIGHT_SIZE, EmptyBoxIcon, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, EventEmptyState, EventSummaryCard, EventSummaryCardSkeleton, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireFillIcon, FireIcon, GmailIcon, GoogleCalendarIcon, HomeIcon, Icon, IconButton, IconCountButton, IconCountButtonSkeleton, InfoTooltip, Input, InsightIcon, IntegrationBar, IntegrationBarSkeleton, IntegrationItem, IntegrationItemSkeleton, IntegrationsCard, JiraIcon, LightIcon, LogoIcon, MinusIcon, MoreIcon, NormalDensityIcon, NotFireIcon, OutlookCalendarIcon, OutlookIcon, Pressable, QtaloImage, ReadIcon, RichContent, SearchIcon, SearchInput, SignOutIcon, Skeleton, SlackIcon, StatusBadge, StopPropagation, SummaryIcon, SystemIcon, TeamsIcon, Toaster, Tooltip, UnreadIcon, capitalize, cn, colors, formatDate, formatDateRange, formatTimestamp, generateCalendarDays, getDaysInMonth, getFirstDayOfMonth, getInitials, getMonthName, getWeekdays, isDateBefore, isDateInRange, isSameDay, isToday, normalizeContent, parseDate, pickColorFromPalette, stringHash, toMondayBased, toast, toastStore, useAccordion, useDropdown, useLongPress };
|
|
25284
25483
|
|
|
25285
25484
|
//# sourceMappingURL=index.js.map
|