@qtalo/qt-ui-library 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +1 -1
- package/dist/index.d.ts +40 -5
- package/dist/index.js +366 -236
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/styles/styles.css +4 -0
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: eo } = e, h = c.prototype, g = lookupGetter(h, "cloneNode"), to = lookupGetter(h, "remove"), no = lookupGetter(h, "nextSibling"), O = lookupGetter(h, "childNodes"), ro = lookupGetter(h, "parentNode");
|
|
330
330
|
if (typeof o == "function") {
|
|
331
331
|
let e = n.createElement("template");
|
|
332
332
|
e.content && e.content.ownerDocument && (n = e.content.ownerDocument);
|
|
333
333
|
}
|
|
334
|
-
let A,
|
|
335
|
-
t.isSupported = typeof entries == "function" && typeof
|
|
336
|
-
let { MUSTACHE_EXPR:
|
|
334
|
+
let A, io = "", { implementation: ao, createNodeIterator: oo, createDocumentFragment: so, getElementsByTagName: co } = n, { importNode: lo } = r, R = _createHooksMap();
|
|
335
|
+
t.isSupported = typeof entries == "function" && typeof ro == "function" && ao && ao.createHTMLDocument !== void 0;
|
|
336
|
+
let { MUSTACHE_EXPR: uo, ERB_EXPR: fo, TMPLIT_EXPR: po, DATA_ATTR: mo, ARIA_ATTR: ho, IS_SCRIPT_OR_DATA: go, ATTR_WHITESPACE: _o, CUSTOM_ELEMENT: vo } = EXPRESSIONS, { IS_ALLOWED_URI: yo } = EXPRESSIONS, B = null, bo = addToSet({}, [
|
|
337
337
|
...html$1,
|
|
338
338
|
...svg$1,
|
|
339
339
|
...svgFilters,
|
|
340
340
|
...mathMl$1,
|
|
341
341
|
...text
|
|
342
|
-
]), V = null,
|
|
342
|
+
]), V = null, xo = addToSet({}, [
|
|
343
343
|
...html,
|
|
344
344
|
...svg,
|
|
345
345
|
...mathMl,
|
|
@@ -363,7 +363,7 @@ function createDOMPurify() {
|
|
|
363
363
|
enumerable: !0,
|
|
364
364
|
value: !1
|
|
365
365
|
}
|
|
366
|
-
})),
|
|
366
|
+
})), So = null, Co = null, wo = Object.seal(create(null, {
|
|
367
367
|
tagCheck: {
|
|
368
368
|
writable: !0,
|
|
369
369
|
configurable: !1,
|
|
@@ -376,7 +376,7 @@ function createDOMPurify() {
|
|
|
376
376
|
enumerable: !0,
|
|
377
377
|
value: null
|
|
378
378
|
}
|
|
379
|
-
})),
|
|
379
|
+
})), To = !0, Eo = !0, Do = !1, Oo = !0, ko = !1, Ao = !0, jo = !1, Mo = !1, No = !1, Po = !1, Fo = !1, Io = !1, Lo = !0, Ro = !1, zo = !0, Bo = !1, Vo = {}, Ho = null, Uo = addToSet({}, [
|
|
380
380
|
"annotation-xml",
|
|
381
381
|
"audio",
|
|
382
382
|
"colgroup",
|
|
@@ -402,14 +402,14 @@ function createDOMPurify() {
|
|
|
402
402
|
"title",
|
|
403
403
|
"video",
|
|
404
404
|
"xmp"
|
|
405
|
-
]),
|
|
405
|
+
]), Wo = null, Go = addToSet({}, [
|
|
406
406
|
"audio",
|
|
407
407
|
"video",
|
|
408
408
|
"img",
|
|
409
409
|
"source",
|
|
410
410
|
"image",
|
|
411
411
|
"track"
|
|
412
|
-
]),
|
|
412
|
+
]), Ko = null, qo = addToSet({}, [
|
|
413
413
|
"alt",
|
|
414
414
|
"class",
|
|
415
415
|
"for",
|
|
@@ -424,58 +424,58 @@ function createDOMPurify() {
|
|
|
424
424
|
"value",
|
|
425
425
|
"style",
|
|
426
426
|
"xmlns"
|
|
427
|
-
]),
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
], stringToString),
|
|
427
|
+
]), Jo = "http://www.w3.org/1998/Math/MathML", Yo = "http://www.w3.org/2000/svg", Xo = "http://www.w3.org/1999/xhtml", Zo = Xo, Qo = !1, $o = null, es = addToSet({}, [
|
|
428
|
+
Jo,
|
|
429
|
+
Yo,
|
|
430
|
+
Xo
|
|
431
|
+
], stringToString), ts = addToSet({}, [
|
|
432
432
|
"mi",
|
|
433
433
|
"mo",
|
|
434
434
|
"mn",
|
|
435
435
|
"ms",
|
|
436
436
|
"mtext"
|
|
437
|
-
]),
|
|
437
|
+
]), ns = addToSet({}, ["annotation-xml"]), rs = addToSet({}, [
|
|
438
438
|
"title",
|
|
439
439
|
"style",
|
|
440
440
|
"font",
|
|
441
441
|
"a",
|
|
442
442
|
"script"
|
|
443
|
-
]),
|
|
443
|
+
]), is = null, as = ["application/xhtml+xml", "text/html"], Y = null, os = null, ss = n.createElement("form"), cs = function(e) {
|
|
444
444
|
return e instanceof RegExp || e instanceof Function;
|
|
445
|
-
},
|
|
445
|
+
}, ls = function() {
|
|
446
446
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
447
|
-
if (!(
|
|
448
|
-
if ((!e || typeof e != "object") && (e = {}), e = clone(e),
|
|
447
|
+
if (!(os && os === e)) {
|
|
448
|
+
if ((!e || typeof e != "object") && (e = {}), e = clone(e), is = as.indexOf(e.PARSER_MEDIA_TYPE) === -1 ? "text/html" : e.PARSER_MEDIA_TYPE, Y = is === "application/xhtml+xml" ? stringToString : stringToLowerCase, B = objectHasOwnProperty(e, "ALLOWED_TAGS") ? addToSet({}, e.ALLOWED_TAGS, Y) : bo, V = objectHasOwnProperty(e, "ALLOWED_ATTR") ? addToSet({}, e.ALLOWED_ATTR, Y) : xo, $o = objectHasOwnProperty(e, "ALLOWED_NAMESPACES") ? addToSet({}, e.ALLOWED_NAMESPACES, stringToString) : es, Ko = objectHasOwnProperty(e, "ADD_URI_SAFE_ATTR") ? addToSet(clone(qo), e.ADD_URI_SAFE_ATTR, Y) : qo, Wo = objectHasOwnProperty(e, "ADD_DATA_URI_TAGS") ? addToSet(clone(Go), e.ADD_DATA_URI_TAGS, Y) : Go, Ho = objectHasOwnProperty(e, "FORBID_CONTENTS") ? addToSet({}, e.FORBID_CONTENTS, Y) : Uo, So = objectHasOwnProperty(e, "FORBID_TAGS") ? addToSet({}, e.FORBID_TAGS, Y) : clone({}), Co = objectHasOwnProperty(e, "FORBID_ATTR") ? addToSet({}, e.FORBID_ATTR, Y) : clone({}), Vo = objectHasOwnProperty(e, "USE_PROFILES") ? e.USE_PROFILES : !1, To = e.ALLOW_ARIA_ATTR !== !1, Eo = e.ALLOW_DATA_ATTR !== !1, Do = e.ALLOW_UNKNOWN_PROTOCOLS || !1, Oo = e.ALLOW_SELF_CLOSE_IN_ATTR !== !1, ko = e.SAFE_FOR_TEMPLATES || !1, Ao = e.SAFE_FOR_XML !== !1, jo = e.WHOLE_DOCUMENT || !1, Po = e.RETURN_DOM || !1, Fo = e.RETURN_DOM_FRAGMENT || !1, Io = e.RETURN_TRUSTED_TYPE || !1, No = e.FORCE_BODY || !1, Lo = e.SANITIZE_DOM !== !1, Ro = e.SANITIZE_NAMED_PROPS || !1, zo = e.KEEP_CONTENT !== !1, Bo = e.IN_PLACE || !1, yo = e.ALLOWED_URI_REGEXP || IS_ALLOWED_URI, Zo = e.NAMESPACE || Xo, ts = e.MATHML_TEXT_INTEGRATION_POINTS || ts, ns = e.HTML_INTEGRATION_POINTS || ns, H = e.CUSTOM_ELEMENT_HANDLING || {}, e.CUSTOM_ELEMENT_HANDLING && cs(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck) && (H.tagNameCheck = e.CUSTOM_ELEMENT_HANDLING.tagNameCheck), e.CUSTOM_ELEMENT_HANDLING && cs(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck) && (H.attributeNameCheck = e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck), e.CUSTOM_ELEMENT_HANDLING && typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements == "boolean" && (H.allowCustomizedBuiltInElements = e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements), ko && (Eo = !1), Fo && (Po = !0), Vo && (B = addToSet({}, text), V = [], Vo.html === !0 && (addToSet(B, html$1), addToSet(V, html)), Vo.svg === !0 && (addToSet(B, svg$1), addToSet(V, svg), addToSet(V, xml)), Vo.svgFilters === !0 && (addToSet(B, svgFilters), addToSet(V, svg), addToSet(V, xml)), Vo.mathMl === !0 && (addToSet(B, mathMl$1), addToSet(V, mathMl), addToSet(V, xml))), e.ADD_TAGS && (typeof e.ADD_TAGS == "function" ? wo.tagCheck = e.ADD_TAGS : (B === bo && (B = clone(B)), addToSet(B, e.ADD_TAGS, Y))), e.ADD_ATTR && (typeof e.ADD_ATTR == "function" ? wo.attributeCheck = e.ADD_ATTR : (V === xo && (V = clone(V)), addToSet(V, e.ADD_ATTR, Y))), e.ADD_URI_SAFE_ATTR && addToSet(Ko, e.ADD_URI_SAFE_ATTR, Y), e.FORBID_CONTENTS && (Ho === Uo && (Ho = clone(Ho)), addToSet(Ho, e.FORBID_CONTENTS, Y)), e.ADD_FORBID_CONTENTS && (Ho === Uo && (Ho = clone(Ho)), addToSet(Ho, e.ADD_FORBID_CONTENTS, Y)), zo && (B["#text"] = !0), jo && addToSet(B, [
|
|
449
449
|
"html",
|
|
450
450
|
"head",
|
|
451
451
|
"body"
|
|
452
|
-
]), B.table && (addToSet(B, ["tbody"]), delete
|
|
452
|
+
]), B.table && (addToSet(B, ["tbody"]), delete So.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
453
453
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
454
454
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
455
|
-
A = e.TRUSTED_TYPES_POLICY,
|
|
456
|
-
} else A === void 0 && (A = _createTrustedTypesPolicy(
|
|
457
|
-
freeze && freeze(e),
|
|
455
|
+
A = e.TRUSTED_TYPES_POLICY, io = A.createHTML("");
|
|
456
|
+
} else A === void 0 && (A = _createTrustedTypesPolicy(eo, i)), A !== null && typeof io == "string" && (io = A.createHTML(""));
|
|
457
|
+
freeze && freeze(e), os = e;
|
|
458
458
|
}
|
|
459
|
-
},
|
|
459
|
+
}, us = addToSet({}, [
|
|
460
460
|
...svg$1,
|
|
461
461
|
...svgFilters,
|
|
462
462
|
...svgDisallowed
|
|
463
|
-
]),
|
|
464
|
-
let t =
|
|
463
|
+
]), ds = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), fs = function(e) {
|
|
464
|
+
let t = ro(e);
|
|
465
465
|
(!t || !t.tagName) && (t = {
|
|
466
|
-
namespaceURI:
|
|
466
|
+
namespaceURI: Zo,
|
|
467
467
|
tagName: "template"
|
|
468
468
|
});
|
|
469
469
|
let n = stringToLowerCase(e.tagName), r = stringToLowerCase(t.tagName);
|
|
470
|
-
return
|
|
471
|
-
},
|
|
470
|
+
return $o[e.namespaceURI] ? e.namespaceURI === Yo ? t.namespaceURI === Xo ? n === "svg" : t.namespaceURI === Jo ? n === "svg" && (r === "annotation-xml" || ts[r]) : !!us[n] : e.namespaceURI === Jo ? t.namespaceURI === Xo ? n === "math" : t.namespaceURI === Yo ? n === "math" && ns[r] : !!ds[n] : e.namespaceURI === Xo ? t.namespaceURI === Yo && !ns[r] || t.namespaceURI === Jo && !ts[r] ? !1 : !ds[n] && (rs[n] || !us[n]) : !!(is === "application/xhtml+xml" && $o[e.namespaceURI]) : !1;
|
|
471
|
+
}, ps = function(e) {
|
|
472
472
|
arrayPush(t.removed, { element: e });
|
|
473
473
|
try {
|
|
474
|
-
|
|
474
|
+
ro(e).removeChild(e);
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
to(e);
|
|
477
477
|
}
|
|
478
|
-
},
|
|
478
|
+
}, ms = function(e, n) {
|
|
479
479
|
try {
|
|
480
480
|
arrayPush(t.removed, {
|
|
481
481
|
attribute: n.getAttributeNode(e),
|
|
@@ -487,87 +487,87 @@ function createDOMPurify() {
|
|
|
487
487
|
from: n
|
|
488
488
|
});
|
|
489
489
|
}
|
|
490
|
-
if (n.removeAttribute(e), e === "is") if (
|
|
491
|
-
|
|
490
|
+
if (n.removeAttribute(e), e === "is") if (Po || Fo) try {
|
|
491
|
+
ps(n);
|
|
492
492
|
} catch {}
|
|
493
493
|
else try {
|
|
494
494
|
n.setAttribute(e, "");
|
|
495
495
|
} catch {}
|
|
496
|
-
},
|
|
496
|
+
}, hs = function(e) {
|
|
497
497
|
let t = null, r = null;
|
|
498
|
-
if (
|
|
498
|
+
if (No) e = "<remove></remove>" + e;
|
|
499
499
|
else {
|
|
500
500
|
let t = stringMatch(e, /^[\r\n\t ]+/);
|
|
501
501
|
r = t && t[0];
|
|
502
502
|
}
|
|
503
|
-
|
|
503
|
+
is === "application/xhtml+xml" && Zo === Xo && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
504
504
|
let i = A ? A.createHTML(e) : e;
|
|
505
|
-
if (
|
|
506
|
-
t = new p().parseFromString(i,
|
|
505
|
+
if (Zo === Xo) try {
|
|
506
|
+
t = new p().parseFromString(i, is);
|
|
507
507
|
} catch {}
|
|
508
508
|
if (!t || !t.documentElement) {
|
|
509
|
-
t =
|
|
509
|
+
t = ao.createDocument(Zo, "template", null);
|
|
510
510
|
try {
|
|
511
|
-
t.documentElement.innerHTML =
|
|
511
|
+
t.documentElement.innerHTML = Qo ? io : i;
|
|
512
512
|
} catch {}
|
|
513
513
|
}
|
|
514
514
|
let a = t.body || t.documentElement;
|
|
515
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null),
|
|
516
|
-
},
|
|
517
|
-
return
|
|
518
|
-
},
|
|
515
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), Zo === Xo ? co.call(t, jo ? "html" : "body")[0] : jo ? t.documentElement : a;
|
|
516
|
+
}, gs = function(e) {
|
|
517
|
+
return oo.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
518
|
+
}, _s = function(e) {
|
|
519
519
|
return e instanceof f && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
520
|
-
},
|
|
520
|
+
}, vs = function(e) {
|
|
521
521
|
return typeof s == "function" && e instanceof s;
|
|
522
522
|
};
|
|
523
|
-
function
|
|
523
|
+
function ys(e, n, r) {
|
|
524
524
|
arrayForEach(e, (e) => {
|
|
525
|
-
e.call(t, n, r,
|
|
525
|
+
e.call(t, n, r, os);
|
|
526
526
|
});
|
|
527
527
|
}
|
|
528
|
-
let
|
|
528
|
+
let bs = function(e) {
|
|
529
529
|
let n = null;
|
|
530
|
-
if (
|
|
530
|
+
if (ys(R.beforeSanitizeElements, e, null), _s(e)) return ps(e), !0;
|
|
531
531
|
let r = Y(e.nodeName);
|
|
532
|
-
if (
|
|
532
|
+
if (ys(R.uponSanitizeElement, e, {
|
|
533
533
|
tagName: r,
|
|
534
534
|
allowedTags: B
|
|
535
|
-
}),
|
|
536
|
-
if (!(
|
|
537
|
-
if (!
|
|
538
|
-
if (
|
|
539
|
-
let t =
|
|
535
|
+
}), Ao && e.hasChildNodes() && !vs(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Ao && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return ps(e), !0;
|
|
536
|
+
if (!(wo.tagCheck instanceof Function && wo.tagCheck(r)) && (!B[r] || So[r])) {
|
|
537
|
+
if (!So[r] && Ss(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
|
|
538
|
+
if (zo && !Ho[r]) {
|
|
539
|
+
let t = ro(e) || e.parentNode, n = O(e) || e.childNodes;
|
|
540
540
|
if (n && t) {
|
|
541
541
|
let r = n.length;
|
|
542
542
|
for (let i = r - 1; i >= 0; --i) {
|
|
543
543
|
let r = g(n[i], !0);
|
|
544
|
-
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r,
|
|
544
|
+
r.__removalCount = (e.__removalCount || 0) + 1, t.insertBefore(r, no(e));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
548
|
-
return
|
|
548
|
+
return ps(e), !0;
|
|
549
549
|
}
|
|
550
|
-
return e instanceof c && !
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
return e instanceof c && !fs(e) || (r === "noscript" || r === "noembed" || r === "noframes") && regExpTest(/<\/no(script|embed|frames)/i, e.innerHTML) ? (ps(e), !0) : (ko && e.nodeType === NODE_TYPE.text && (n = e.textContent, arrayForEach([
|
|
551
|
+
uo,
|
|
552
|
+
fo,
|
|
553
|
+
po
|
|
554
554
|
], (e) => {
|
|
555
555
|
n = stringReplace(n, e, " ");
|
|
556
|
-
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)),
|
|
557
|
-
},
|
|
558
|
-
if (
|
|
559
|
-
if (!(
|
|
560
|
-
if (!V[t] ||
|
|
561
|
-
if (!(
|
|
562
|
-
} else if (!
|
|
556
|
+
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), ys(R.afterSanitizeElements, e, null), !1);
|
|
557
|
+
}, xs = function(e, t, r) {
|
|
558
|
+
if (Lo && (t === "id" || t === "name") && (r in n || r in ss)) return !1;
|
|
559
|
+
if (!(Eo && !Co[t] && regExpTest(mo, t)) && !(To && regExpTest(ho, t)) && !(wo.attributeCheck instanceof Function && wo.attributeCheck(t, e))) {
|
|
560
|
+
if (!V[t] || Co[t]) {
|
|
561
|
+
if (!(Ss(e) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, e) || H.tagNameCheck instanceof Function && H.tagNameCheck(e)) && (H.attributeNameCheck instanceof RegExp && regExpTest(H.attributeNameCheck, t) || H.attributeNameCheck instanceof Function && H.attributeNameCheck(t, e)) || t === "is" && H.allowCustomizedBuiltInElements && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r)))) return !1;
|
|
562
|
+
} else if (!Ko[t] && !regExpTest(yo, stringReplace(r, _o, "")) && !((t === "src" || t === "xlink:href" || t === "href") && e !== "script" && stringIndexOf(r, "data:") === 0 && Wo[e]) && !(Do && !regExpTest(go, stringReplace(r, _o, ""))) && r) return !1;
|
|
563
563
|
}
|
|
564
564
|
return !0;
|
|
565
|
-
},
|
|
566
|
-
return e !== "annotation-xml" && stringMatch(e,
|
|
567
|
-
},
|
|
568
|
-
|
|
565
|
+
}, Ss = function(e) {
|
|
566
|
+
return e !== "annotation-xml" && stringMatch(e, vo);
|
|
567
|
+
}, Cs = function(e) {
|
|
568
|
+
ys(R.beforeSanitizeAttributes, e, null);
|
|
569
569
|
let { attributes: n } = e;
|
|
570
|
-
if (!n ||
|
|
570
|
+
if (!n || _s(e)) return;
|
|
571
571
|
let r = {
|
|
572
572
|
attrName: "",
|
|
573
573
|
attrValue: "",
|
|
@@ -577,36 +577,36 @@ function createDOMPurify() {
|
|
|
577
577
|
}, i = n.length;
|
|
578
578
|
for (; i--;) {
|
|
579
579
|
let { name: a, namespaceURI: o, value: s } = n[i], c = Y(a), l = s, u = a === "value" ? l : stringTrim(l);
|
|
580
|
-
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0,
|
|
581
|
-
|
|
580
|
+
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, ys(R.uponSanitizeAttribute, e, r), u = r.attrValue, Ro && (c === "id" || c === "name") && (ms(a, e), u = "user-content-" + u), Ao && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
581
|
+
ms(a, e);
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
584
584
|
if (c === "attributename" && stringMatch(u, "href")) {
|
|
585
|
-
|
|
585
|
+
ms(a, e);
|
|
586
586
|
continue;
|
|
587
587
|
}
|
|
588
588
|
if (r.forceKeepAttr) continue;
|
|
589
589
|
if (!r.keepAttr) {
|
|
590
|
-
|
|
590
|
+
ms(a, e);
|
|
591
591
|
continue;
|
|
592
592
|
}
|
|
593
|
-
if (!
|
|
594
|
-
|
|
593
|
+
if (!Oo && regExpTest(/\/>/i, u)) {
|
|
594
|
+
ms(a, e);
|
|
595
595
|
continue;
|
|
596
596
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
597
|
+
ko && arrayForEach([
|
|
598
|
+
uo,
|
|
599
|
+
fo,
|
|
600
|
+
po
|
|
601
601
|
], (e) => {
|
|
602
602
|
u = stringReplace(u, e, " ");
|
|
603
603
|
});
|
|
604
604
|
let f = Y(e.nodeName);
|
|
605
|
-
if (!
|
|
606
|
-
|
|
605
|
+
if (!xs(f, c, u)) {
|
|
606
|
+
ms(a, e);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
|
-
if (A && typeof
|
|
609
|
+
if (A && typeof eo == "object" && typeof eo.getAttributeType == "function" && !o) switch (eo.getAttributeType(f, c)) {
|
|
610
610
|
case "TrustedHTML":
|
|
611
611
|
u = A.createHTML(u);
|
|
612
612
|
break;
|
|
@@ -615,56 +615,56 @@ function createDOMPurify() {
|
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
if (u !== l) try {
|
|
618
|
-
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u),
|
|
618
|
+
o ? e.setAttributeNS(o, a, u) : e.setAttribute(a, u), _s(e) ? ps(e) : arrayPop(t.removed);
|
|
619
619
|
} catch {
|
|
620
|
-
|
|
620
|
+
ms(a, e);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
|
|
624
|
-
},
|
|
625
|
-
let n = null, r =
|
|
626
|
-
for (
|
|
627
|
-
|
|
623
|
+
ys(R.afterSanitizeAttributes, e, null);
|
|
624
|
+
}, ws = function e(t) {
|
|
625
|
+
let n = null, r = gs(t);
|
|
626
|
+
for (ys(R.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) ys(R.uponSanitizeShadowNode, n, null), bs(n), Cs(n), n.content instanceof a && e(n.content);
|
|
627
|
+
ys(R.afterSanitizeShadowDOM, t, null);
|
|
628
628
|
};
|
|
629
629
|
return t.sanitize = function(e) {
|
|
630
630
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
|
|
631
|
-
if (
|
|
631
|
+
if (Qo = !e, Qo && (e = "<!-->"), typeof e != "string" && !vs(e)) if (typeof e.toString == "function") {
|
|
632
632
|
if (e = e.toString(), typeof e != "string") throw typeErrorCreate("dirty is not a string, aborting");
|
|
633
633
|
} else throw typeErrorCreate("toString is not a function");
|
|
634
634
|
if (!t.isSupported) return e;
|
|
635
|
-
if (
|
|
635
|
+
if (Mo || ls(n), t.removed = [], typeof e == "string" && (Bo = !1), Bo) {
|
|
636
636
|
if (e.nodeName) {
|
|
637
637
|
let t = Y(e.nodeName);
|
|
638
|
-
if (!B[t] ||
|
|
638
|
+
if (!B[t] || So[t]) throw typeErrorCreate("root node is forbidden and cannot be sanitized in-place");
|
|
639
639
|
}
|
|
640
|
-
} else if (e instanceof s) i =
|
|
640
|
+
} else if (e instanceof s) i = hs("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
|
|
641
641
|
else {
|
|
642
|
-
if (!
|
|
643
|
-
if (i =
|
|
642
|
+
if (!Po && !ko && !jo && e.indexOf("<") === -1) return A && Io ? A.createHTML(e) : e;
|
|
643
|
+
if (i = hs(e), !i) return Po ? null : Io ? io : "";
|
|
644
644
|
}
|
|
645
|
-
i &&
|
|
646
|
-
let u =
|
|
647
|
-
for (; c = u.nextNode();)
|
|
648
|
-
if (
|
|
649
|
-
if (
|
|
650
|
-
if (
|
|
645
|
+
i && No && ps(i.firstChild);
|
|
646
|
+
let u = gs(Bo ? e : i);
|
|
647
|
+
for (; c = u.nextNode();) bs(c), Cs(c), c.content instanceof a && ws(c.content);
|
|
648
|
+
if (Bo) return e;
|
|
649
|
+
if (Po) {
|
|
650
|
+
if (Fo) for (l = so.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
651
651
|
else l = i;
|
|
652
|
-
return (V.shadowroot || V.shadowrootmode) && (l =
|
|
652
|
+
return (V.shadowroot || V.shadowrootmode) && (l = lo.call(r, l, !0)), l;
|
|
653
653
|
}
|
|
654
|
-
let f =
|
|
655
|
-
return
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
654
|
+
let f = jo ? i.outerHTML : i.innerHTML;
|
|
655
|
+
return jo && B["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), ko && arrayForEach([
|
|
656
|
+
uo,
|
|
657
|
+
fo,
|
|
658
|
+
po
|
|
659
659
|
], (e) => {
|
|
660
660
|
f = stringReplace(f, e, " ");
|
|
661
|
-
}), A &&
|
|
661
|
+
}), A && Io ? A.createHTML(f) : f;
|
|
662
662
|
}, t.setConfig = function() {
|
|
663
|
-
|
|
663
|
+
ls(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Mo = !0;
|
|
664
664
|
}, t.clearConfig = function() {
|
|
665
|
-
|
|
665
|
+
os = null, Mo = !1;
|
|
666
666
|
}, t.isValidAttribute = function(e, t, n) {
|
|
667
|
-
return
|
|
667
|
+
return os || ls({}), xs(Y(e), Y(t), n);
|
|
668
668
|
}, t.addHook = function(e, t) {
|
|
669
669
|
typeof t == "function" && arrayPush(R[e], t);
|
|
670
670
|
}, t.removeHook = function(e, t) {
|
|
@@ -20157,14 +20157,14 @@ ${c}` : c;
|
|
|
20157
20157
|
if (this.options.pedantic ? (f = 2, s = c.trimStart()) : u ? f = t[1].length + 1 : (f = t[2].search(this.rules.other.nonSpaceChar), f = f > 4 ? 1 : f, s = c.slice(f), f += t[1].length), u && this.rules.other.blankLine.test(l) && (r += l + "\n", e = e.substring(l.length + 1), n = !0), !n) {
|
|
20158
20158
|
let t = this.rules.other.nextBulletRegex(f), n = this.rules.other.hrRegex(f), i = this.rules.other.fencesBeginRegex(f), a = this.rules.other.headingBeginRegex(f), o = this.rules.other.htmlBeginRegex(f);
|
|
20159
20159
|
for (; e;) {
|
|
20160
|
-
let 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], eo;
|
|
20161
|
+
if (l = p, this.options.pedantic ? (l = l.replace(this.rules.other.listReplaceNesting, " "), eo = l) : eo = l.replace(this.rules.other.tabCharGlobal, " "), i.test(l) || a.test(l) || o.test(l) || t.test(l) || n.test(l)) break;
|
|
20162
|
+
if (eo.search(this.rules.other.nonSpaceChar) >= f || !l.trim()) s += "\n" + eo.slice(f);
|
|
20163
20163
|
else {
|
|
20164
20164
|
if (u || c.replace(this.rules.other.tabCharGlobal, " ").search(this.rules.other.nonSpaceChar) >= 4 || i.test(c) || a.test(c) || n.test(c)) break;
|
|
20165
20165
|
s += "\n" + l;
|
|
20166
20166
|
}
|
|
20167
|
-
!u && !l.trim() && (u = !0), r += 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 = eo.slice(f);
|
|
20168
20168
|
}
|
|
20169
20169
|
}
|
|
20170
20170
|
i.loose || (o ? i.loose = !0 : this.rules.other.doubleBlankLine.test(r) && (o = !0)), i.items.push({
|
|
@@ -21371,52 +21371,60 @@ function useDropdown() {
|
|
|
21371
21371
|
if (!e) throw Error("useDropdown must be used inside Dropdown");
|
|
21372
21372
|
return e;
|
|
21373
21373
|
}
|
|
21374
|
-
function Dropdown({ trigger: e, children: t, align: n = "start",
|
|
21375
|
-
let [
|
|
21374
|
+
function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1 }) {
|
|
21375
|
+
let [s, c] = useState(!1), f = useRef(null), h = useRef(null), g = useRef(null), [ro, A] = useState(null);
|
|
21376
21376
|
useLayoutEffect(() => {
|
|
21377
|
-
if (!
|
|
21378
|
-
let e =
|
|
21379
|
-
n === "end" && (
|
|
21380
|
-
|
|
21381
|
-
|
|
21382
|
-
|
|
21383
|
-
|
|
21384
|
-
|
|
21385
|
-
|
|
21377
|
+
if (!s || !f.current || !h.current) return;
|
|
21378
|
+
let e = f.current.getBoundingClientRect(), t = h.current.getBoundingClientRect(), o = e.left;
|
|
21379
|
+
n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
|
|
21380
|
+
let c;
|
|
21381
|
+
c = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => A({
|
|
21382
|
+
top: c,
|
|
21383
|
+
left: o
|
|
21384
|
+
}));
|
|
21385
|
+
}, [
|
|
21386
|
+
s,
|
|
21387
|
+
n,
|
|
21388
|
+
r,
|
|
21389
|
+
i,
|
|
21390
|
+
a
|
|
21391
|
+
]);
|
|
21392
|
+
function io() {
|
|
21393
|
+
g.current &&= (clearTimeout(g.current), null), c(!0);
|
|
21386
21394
|
}
|
|
21387
|
-
function
|
|
21388
|
-
|
|
21389
|
-
|
|
21395
|
+
function ao() {
|
|
21396
|
+
g.current = window.setTimeout(() => {
|
|
21397
|
+
c(!1);
|
|
21390
21398
|
}, 120);
|
|
21391
21399
|
}
|
|
21392
21400
|
return useEffect(() => {
|
|
21393
21401
|
function e(e) {
|
|
21394
21402
|
let t = e.target;
|
|
21395
|
-
|
|
21403
|
+
f.current?.contains(t) || h.current?.contains(t) || c(!1);
|
|
21396
21404
|
}
|
|
21397
21405
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21398
21406
|
}, []), useEffect(() => () => {
|
|
21399
|
-
|
|
21407
|
+
g.current && clearTimeout(g.current);
|
|
21400
21408
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21401
|
-
value: { close: () =>
|
|
21409
|
+
value: { close: () => c(!1) },
|
|
21402
21410
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21403
|
-
ref:
|
|
21411
|
+
ref: f,
|
|
21404
21412
|
className: "inline-flex",
|
|
21405
|
-
onMouseEnter:
|
|
21406
|
-
onMouseLeave:
|
|
21407
|
-
onClick: () =>
|
|
21413
|
+
onMouseEnter: io,
|
|
21414
|
+
onMouseLeave: ao,
|
|
21415
|
+
onClick: () => c((e) => !e),
|
|
21408
21416
|
"aria-haspopup": "menu",
|
|
21409
|
-
"aria-expanded":
|
|
21417
|
+
"aria-expanded": s,
|
|
21410
21418
|
children: e
|
|
21411
|
-
}),
|
|
21412
|
-
ref:
|
|
21413
|
-
onMouseEnter:
|
|
21414
|
-
onMouseLeave:
|
|
21419
|
+
}), s && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21420
|
+
ref: h,
|
|
21421
|
+
onMouseEnter: io,
|
|
21422
|
+
onMouseLeave: ao,
|
|
21415
21423
|
style: {
|
|
21416
21424
|
position: "fixed",
|
|
21417
|
-
top:
|
|
21418
|
-
left:
|
|
21419
|
-
visibility:
|
|
21425
|
+
top: ro?.top ?? 0,
|
|
21426
|
+
left: ro?.left ?? 0,
|
|
21427
|
+
visibility: ro ? "visible" : "hidden",
|
|
21420
21428
|
zIndex: 1e3
|
|
21421
21429
|
},
|
|
21422
21430
|
children: t
|
|
@@ -21478,17 +21486,17 @@ function getVerticalAlign(e, t, n) {
|
|
|
21478
21486
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21479
21487
|
}
|
|
21480
21488
|
function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
|
|
21481
|
-
let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h,
|
|
21489
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, f] = useState(!1), [h, ro] = useState(null), A = () => {
|
|
21482
21490
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21483
21491
|
f(!0);
|
|
21484
21492
|
}, r);
|
|
21485
|
-
},
|
|
21493
|
+
}, io = () => {
|
|
21486
21494
|
s.current &&= (clearTimeout(s.current), null), f(!1);
|
|
21487
21495
|
};
|
|
21488
21496
|
return useLayoutEffect(() => {
|
|
21489
21497
|
if (!c || !a.current || !o.current) return;
|
|
21490
21498
|
let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
|
|
21491
|
-
r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)),
|
|
21499
|
+
r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), ro((e) => e && e.top === l && e.left === u ? e : {
|
|
21492
21500
|
top: l,
|
|
21493
21501
|
left: u
|
|
21494
21502
|
});
|
|
@@ -21498,9 +21506,9 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
|
|
|
21498
21506
|
ref: a,
|
|
21499
21507
|
className: "inline-flex",
|
|
21500
21508
|
onMouseEnter: A,
|
|
21501
|
-
onMouseLeave:
|
|
21509
|
+
onMouseLeave: io,
|
|
21502
21510
|
onFocus: A,
|
|
21503
|
-
onBlur:
|
|
21511
|
+
onBlur: io,
|
|
21504
21512
|
children: e
|
|
21505
21513
|
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21506
21514
|
ref: o,
|
|
@@ -22827,7 +22835,7 @@ function useToastTimers(e, t) {
|
|
|
22827
22835
|
e,
|
|
22828
22836
|
u,
|
|
22829
22837
|
f
|
|
22830
|
-
]),
|
|
22838
|
+
]), to = useCallback((e) => {
|
|
22831
22839
|
i.current.delete(e), r((t) => {
|
|
22832
22840
|
let n = new Map(t);
|
|
22833
22841
|
return n.delete(e), n;
|
|
@@ -22849,21 +22857,21 @@ function useToastTimers(e, t) {
|
|
|
22849
22857
|
remainingTimes: n,
|
|
22850
22858
|
pauseAll: h,
|
|
22851
22859
|
resumeAll: g,
|
|
22852
|
-
cleanupTimer:
|
|
22860
|
+
cleanupTimer: to
|
|
22853
22861
|
};
|
|
22854
22862
|
}
|
|
22855
22863
|
function Toaster() {
|
|
22856
|
-
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer:
|
|
22864
|
+
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer: no } = useToastTimers(e, a);
|
|
22857
22865
|
useEffect(() => toastStore.subscribe(t), []);
|
|
22858
|
-
let
|
|
22866
|
+
let ro = useSyncExternalStore(subscribeNoop, getClientSnapshot, getServerSnapshot), A = useCallback((e) => {
|
|
22859
22867
|
e.callbacks?.onOpen?.();
|
|
22860
|
-
}, []),
|
|
22868
|
+
}, []), io = useCallback((e, t) => {
|
|
22861
22869
|
t === "manual" ? e.callbacks?.onClose?.() : e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
22862
22870
|
}, []);
|
|
22863
22871
|
useEffect(() => {
|
|
22864
22872
|
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
22865
22873
|
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
22866
|
-
|
|
22874
|
+
io(e, a.current.get(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
22867
22875
|
}), r((r) => {
|
|
22868
22876
|
let i = r.map((e) => {
|
|
22869
22877
|
let t = n.get(e.id);
|
|
@@ -22881,25 +22889,25 @@ function Toaster() {
|
|
|
22881
22889
|
}, [
|
|
22882
22890
|
e,
|
|
22883
22891
|
A,
|
|
22884
|
-
|
|
22892
|
+
io
|
|
22885
22893
|
]);
|
|
22886
|
-
let
|
|
22894
|
+
let ao = useCallback((e) => {
|
|
22887
22895
|
r((t) => {
|
|
22888
22896
|
let n = t.filter((t) => t.id !== e);
|
|
22889
22897
|
return o.current = n, n;
|
|
22890
|
-
}),
|
|
22891
|
-
}, [
|
|
22898
|
+
}), no(e), toastStore.cleanup(e);
|
|
22899
|
+
}, [no]), oo = useCallback((e) => {
|
|
22892
22900
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
22893
22901
|
}, []);
|
|
22894
|
-
if (
|
|
22895
|
-
let
|
|
22896
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
22902
|
+
if (!ro) return null;
|
|
22903
|
+
let so = groupByPosition(n);
|
|
22904
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(so).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
22897
22905
|
className: cn("pointer-events-none fixed z-1000 flex flex-col items-end gap-2 p-4", POSITION_CLASSES[e]),
|
|
22898
22906
|
children: t.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
22899
22907
|
toast: e,
|
|
22900
22908
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
22901
|
-
onExitComplete:
|
|
22902
|
-
onClose:
|
|
22909
|
+
onExitComplete: ao,
|
|
22910
|
+
onClose: oo,
|
|
22903
22911
|
onHoverStart: u,
|
|
22904
22912
|
onHoverEnd: f
|
|
22905
22913
|
}, e.id))
|
|
@@ -23113,7 +23121,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23113
23121
|
function O(e) {
|
|
23114
23122
|
p(e), a?.(e);
|
|
23115
23123
|
}
|
|
23116
|
-
let
|
|
23124
|
+
let ro = {
|
|
23117
23125
|
fire: [{
|
|
23118
23126
|
id: "fire",
|
|
23119
23127
|
tooltip: "Mark as fire",
|
|
@@ -23194,7 +23202,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23194
23202
|
}),
|
|
23195
23203
|
/* @__PURE__ */ jsx("div", {
|
|
23196
23204
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23197
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23205
|
+
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(ro).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
23198
23206
|
className: "flex items-center gap-2 px-1",
|
|
23199
23207
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23200
23208
|
content: e.tooltip,
|
|
@@ -23227,20 +23235,59 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23227
23235
|
}
|
|
23228
23236
|
var filterButtonStyles = tv({
|
|
23229
23237
|
slots: {
|
|
23230
|
-
root: "inline-flex w-fit items-center gap-1 rounded-full border px-2 py-1 transition-colors",
|
|
23238
|
+
root: "inline-flex w-fit items-center gap-1 rounded-full border-[1.5px] px-2 py-1 transition-colors",
|
|
23231
23239
|
label: "flex shrink-0 items-center gap-1 text-xs whitespace-nowrap"
|
|
23232
23240
|
},
|
|
23233
|
-
variants: {
|
|
23234
|
-
|
|
23235
|
-
|
|
23236
|
-
|
|
23241
|
+
variants: {
|
|
23242
|
+
variant: {
|
|
23243
|
+
custom: {},
|
|
23244
|
+
fire: {},
|
|
23245
|
+
unread: {},
|
|
23246
|
+
insight: {},
|
|
23247
|
+
done: {}
|
|
23237
23248
|
},
|
|
23238
|
-
|
|
23239
|
-
|
|
23240
|
-
|
|
23249
|
+
selected: {
|
|
23250
|
+
false: {
|
|
23251
|
+
root: "border-neutral-300 bg-white hover:border-neutral-500-variant-4 hover:bg-neutral-100",
|
|
23252
|
+
label: "font-semibold text-neutral-800 opacity-80 group-hover:opacity-100"
|
|
23253
|
+
},
|
|
23254
|
+
true: {
|
|
23255
|
+
root: "bg-white hover:bg-white",
|
|
23256
|
+
label: "font-semibold text-neutral-900"
|
|
23257
|
+
}
|
|
23241
23258
|
}
|
|
23242
|
-
}
|
|
23243
|
-
|
|
23259
|
+
},
|
|
23260
|
+
compoundVariants: [
|
|
23261
|
+
{
|
|
23262
|
+
variant: "custom",
|
|
23263
|
+
selected: !0,
|
|
23264
|
+
class: { root: "border-primary-400 hover:border-primary-400" }
|
|
23265
|
+
},
|
|
23266
|
+
{
|
|
23267
|
+
variant: "fire",
|
|
23268
|
+
selected: !0,
|
|
23269
|
+
class: { root: "border-tertiary-400 hover:border-tertiary-500" }
|
|
23270
|
+
},
|
|
23271
|
+
{
|
|
23272
|
+
variant: "unread",
|
|
23273
|
+
selected: !0,
|
|
23274
|
+
class: { root: "border-primary-400 hover:border-primary-500" }
|
|
23275
|
+
},
|
|
23276
|
+
{
|
|
23277
|
+
variant: "insight",
|
|
23278
|
+
selected: !0,
|
|
23279
|
+
class: { root: "border-brand-primary-100 hover:border-brand-primary-200" }
|
|
23280
|
+
},
|
|
23281
|
+
{
|
|
23282
|
+
variant: "done",
|
|
23283
|
+
selected: !0,
|
|
23284
|
+
class: { root: "border-success-base hover:border-success-base" }
|
|
23285
|
+
}
|
|
23286
|
+
],
|
|
23287
|
+
defaultVariants: {
|
|
23288
|
+
variant: "custom",
|
|
23289
|
+
selected: !1
|
|
23290
|
+
}
|
|
23244
23291
|
}), FILTER_BUTTON_META = {
|
|
23245
23292
|
fire: {
|
|
23246
23293
|
icon: FireIcon,
|
|
@@ -23263,7 +23310,7 @@ var filterButtonStyles = tv({
|
|
|
23263
23310
|
iconColor: "text-success-base"
|
|
23264
23311
|
}
|
|
23265
23312
|
};
|
|
23266
|
-
function renderIcon(e, t) {
|
|
23313
|
+
function renderIcon$1(e, t) {
|
|
23267
23314
|
return typeof e == "function" ? /* @__PURE__ */ jsx(e, {
|
|
23268
23315
|
size: 20,
|
|
23269
23316
|
className: t
|
|
@@ -23273,7 +23320,10 @@ function renderIcon(e, t) {
|
|
|
23273
23320
|
});
|
|
23274
23321
|
}
|
|
23275
23322
|
function FilterButton({ variant: e = "custom", label: t, count: n, selected: r = !1, icon: i, classNames: a, disabled: o, ...s }) {
|
|
23276
|
-
let c = !!o, l = filterButtonStyles({
|
|
23323
|
+
let c = !!o, l = filterButtonStyles({
|
|
23324
|
+
variant: e,
|
|
23325
|
+
selected: !c && r
|
|
23326
|
+
}), u = e === "custom" ? void 0 : FILTER_BUTTON_META[e], f = i ?? u?.icon, p = t ?? u?.label, eo = c ? "text-neutral-400" : r && u?.iconColor ? u.iconColor : "text-neutral-900 opacity-60 group-hover:opacity-80";
|
|
23277
23327
|
return /* @__PURE__ */ jsxs(Button, {
|
|
23278
23328
|
...s,
|
|
23279
23329
|
disabled: o,
|
|
@@ -23281,7 +23331,7 @@ function FilterButton({ variant: e = "custom", label: t, count: n, selected: r =
|
|
|
23281
23331
|
className: cn("group", l.root(), c && "border-neutral-300 bg-white hover:border-neutral-300", a?.root),
|
|
23282
23332
|
children: [f && /* @__PURE__ */ jsx("span", {
|
|
23283
23333
|
className: cn("flex items-center", a?.icon),
|
|
23284
|
-
children: renderIcon(f, cn("shrink-0",
|
|
23334
|
+
children: renderIcon$1(f, cn("shrink-0", eo))
|
|
23285
23335
|
}), p && /* @__PURE__ */ jsxs("span", {
|
|
23286
23336
|
className: cn(l.label(), c && "font-medium text-neutral-400", a?.label),
|
|
23287
23337
|
children: [/* @__PURE__ */ jsx("span", { children: p }), typeof n == "number" && n > 0 && /* @__PURE__ */ jsxs("span", {
|
|
@@ -23380,32 +23430,96 @@ var iconCountButtonStyles = tv({
|
|
|
23380
23430
|
status: "active"
|
|
23381
23431
|
}
|
|
23382
23432
|
});
|
|
23383
|
-
function
|
|
23384
|
-
|
|
23385
|
-
|
|
23386
|
-
|
|
23387
|
-
|
|
23433
|
+
function formatCount(e, t = 99) {
|
|
23434
|
+
return e > t ? `${t}+` : String(e);
|
|
23435
|
+
}
|
|
23436
|
+
function renderIcon(e, t) {
|
|
23437
|
+
return cloneElement(e, {
|
|
23438
|
+
size: e.props.size ?? 20,
|
|
23439
|
+
className: cn(t, e.props.className)
|
|
23388
23440
|
});
|
|
23389
|
-
|
|
23390
|
-
|
|
23441
|
+
}
|
|
23442
|
+
function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition: n, onMouseEnter: r, onMouseLeave: i, onToggle: a }) {
|
|
23443
|
+
let o = t && !e, s = e ? "Clear" : "Only", c = e ? "Reset state" : "Activate state";
|
|
23444
|
+
return createPortal(/* @__PURE__ */ jsx("div", {
|
|
23445
|
+
className: "flex",
|
|
23446
|
+
style: {
|
|
23447
|
+
position: "fixed",
|
|
23448
|
+
top: n.top,
|
|
23449
|
+
left: n.left,
|
|
23450
|
+
zIndex: 100
|
|
23451
|
+
},
|
|
23452
|
+
children: /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23453
|
+
content: s,
|
|
23454
|
+
position: "right-end",
|
|
23455
|
+
children: /* @__PURE__ */ jsx(StopPropagation, { children: /* @__PURE__ */ jsx("div", {
|
|
23456
|
+
role: "button",
|
|
23457
|
+
tabIndex: 0,
|
|
23458
|
+
"aria-pressed": e,
|
|
23459
|
+
"aria-label": c,
|
|
23460
|
+
className: "flex size-5 cursor-pointer items-center justify-center rounded-full bg-white",
|
|
23461
|
+
onMouseEnter: r,
|
|
23462
|
+
onMouseLeave: i,
|
|
23463
|
+
onClick: a,
|
|
23464
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
23465
|
+
className: cn("flex size-4 items-center justify-center rounded-full border", e ? "border-tertiary-500" : "border-neutral-800"),
|
|
23466
|
+
children: [o && /* @__PURE__ */ jsx("div", { className: "size-2 rounded-full bg-neutral-800" }), e && /* @__PURE__ */ jsx(CloseIcon, {
|
|
23467
|
+
size: 12,
|
|
23468
|
+
className: "text-tertiary-500"
|
|
23469
|
+
})]
|
|
23470
|
+
})
|
|
23471
|
+
}) })
|
|
23472
|
+
})
|
|
23473
|
+
}), document.body);
|
|
23474
|
+
}
|
|
23475
|
+
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: f, classNames: h, ...g }) {
|
|
23476
|
+
let O = iconCountButtonStyles({
|
|
23477
|
+
variant: r,
|
|
23478
|
+
orientation: i,
|
|
23479
|
+
status: a
|
|
23480
|
+
}), ro = useRef(null), [A, io] = useState(!1), [ao, oo] = useState(!1), [so, co] = useState(l), [lo, R] = useState(null), uo = c ?? so, fo = s && (A || ao || uo), po = typeof n == "number" && n > 0 && (o || a === "active");
|
|
23481
|
+
function mo(e) {
|
|
23482
|
+
c === void 0 && co(e), f?.(e);
|
|
23391
23483
|
}
|
|
23392
|
-
return
|
|
23393
|
-
|
|
23394
|
-
|
|
23395
|
-
|
|
23396
|
-
|
|
23397
|
-
|
|
23398
|
-
|
|
23399
|
-
|
|
23400
|
-
|
|
23484
|
+
return useLayoutEffect(() => {
|
|
23485
|
+
if (!fo || !ro.current) return;
|
|
23486
|
+
function e() {
|
|
23487
|
+
let e = ro.current?.getBoundingClientRect();
|
|
23488
|
+
e && R({
|
|
23489
|
+
top: e.top - 6,
|
|
23490
|
+
left: e.right - 14
|
|
23491
|
+
});
|
|
23492
|
+
}
|
|
23493
|
+
return e(), window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
23494
|
+
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
23495
|
+
};
|
|
23496
|
+
}, [fo]), /* @__PURE__ */ jsxs(Button, {
|
|
23497
|
+
...g,
|
|
23498
|
+
className: cn(O.root(), h?.root),
|
|
23499
|
+
onMouseEnter: () => io(!0),
|
|
23500
|
+
onMouseLeave: () => io(!1),
|
|
23501
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
23502
|
+
className: "relative",
|
|
23503
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
23504
|
+
ref: ro,
|
|
23505
|
+
className: cn(O.bubble(), h?.bubble),
|
|
23506
|
+
children: renderIcon(e, O.icon())
|
|
23507
|
+
}), fo && lo && typeof document < "u" && ToggleControlPortal({
|
|
23508
|
+
isPressed: uo,
|
|
23509
|
+
isPortalHovered: ao,
|
|
23510
|
+
portalPosition: lo,
|
|
23511
|
+
onMouseEnter: () => oo(!0),
|
|
23512
|
+
onMouseLeave: () => oo(!1),
|
|
23513
|
+
onToggle: () => mo(!uo)
|
|
23514
|
+
})]
|
|
23401
23515
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23402
|
-
className: cn(
|
|
23403
|
-
children: [/* @__PURE__ */ jsx("span", { children: t }),
|
|
23516
|
+
className: cn(O.label(), h?.label),
|
|
23517
|
+
children: [/* @__PURE__ */ jsx("span", { children: t }), po && /* @__PURE__ */ jsxs("span", {
|
|
23404
23518
|
"aria-label": `${n} items`,
|
|
23405
|
-
className: cn(
|
|
23519
|
+
className: cn(O.count(), h?.count),
|
|
23406
23520
|
children: [
|
|
23407
23521
|
"(",
|
|
23408
|
-
|
|
23522
|
+
formatCount(n),
|
|
23409
23523
|
")"
|
|
23410
23524
|
]
|
|
23411
23525
|
})]
|
|
@@ -23460,7 +23574,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23460
23574
|
t,
|
|
23461
23575
|
n
|
|
23462
23576
|
]);
|
|
23463
|
-
let
|
|
23577
|
+
let ro = useMemo(() => generateCalendarDays(g.year, g.month), [g.year, g.month]);
|
|
23464
23578
|
function A(t) {
|
|
23465
23579
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23466
23580
|
if ((o !== g.month || s !== g.year) && O({
|
|
@@ -23478,7 +23592,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23478
23592
|
}), a());
|
|
23479
23593
|
}
|
|
23480
23594
|
}
|
|
23481
|
-
function
|
|
23595
|
+
function io() {
|
|
23482
23596
|
O((e) => e.month === 0 ? {
|
|
23483
23597
|
year: e.year - 1,
|
|
23484
23598
|
month: 11
|
|
@@ -23487,7 +23601,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23487
23601
|
month: e.month - 1
|
|
23488
23602
|
});
|
|
23489
23603
|
}
|
|
23490
|
-
function
|
|
23604
|
+
function ao() {
|
|
23491
23605
|
O((e) => e.month === 11 ? {
|
|
23492
23606
|
year: e.year + 1,
|
|
23493
23607
|
month: 0
|
|
@@ -23496,7 +23610,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23496
23610
|
month: e.month + 1
|
|
23497
23611
|
});
|
|
23498
23612
|
}
|
|
23499
|
-
let
|
|
23613
|
+
let oo = getWeekdays();
|
|
23500
23614
|
return /* @__PURE__ */ jsxs("div", {
|
|
23501
23615
|
className: "mt-1 w-fit rounded-lg border border-neutral-400 bg-white p-2 shadow-lg",
|
|
23502
23616
|
children: [
|
|
@@ -23508,7 +23622,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23508
23622
|
direction: "left",
|
|
23509
23623
|
size: 20
|
|
23510
23624
|
}),
|
|
23511
|
-
onClick:
|
|
23625
|
+
onClick: io,
|
|
23512
23626
|
className: "hover:opacity-60",
|
|
23513
23627
|
"aria-label": "Previous month"
|
|
23514
23628
|
}),
|
|
@@ -23525,7 +23639,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23525
23639
|
direction: "right",
|
|
23526
23640
|
size: 20
|
|
23527
23641
|
}),
|
|
23528
|
-
onClick:
|
|
23642
|
+
onClick: ao,
|
|
23529
23643
|
className: "hover:opacity-60",
|
|
23530
23644
|
"aria-label": "Next month"
|
|
23531
23645
|
})
|
|
@@ -23533,17 +23647,17 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23533
23647
|
}),
|
|
23534
23648
|
/* @__PURE__ */ jsx("div", {
|
|
23535
23649
|
className: "mb-2 grid grid-cols-7",
|
|
23536
|
-
children:
|
|
23650
|
+
children: oo.map((e) => /* @__PURE__ */ jsx("div", {
|
|
23537
23651
|
className: "flex items-center justify-center p-0.5 text-[9px] font-bold text-neutral-900",
|
|
23538
23652
|
children: e
|
|
23539
23653
|
}, e))
|
|
23540
23654
|
}),
|
|
23541
23655
|
/* @__PURE__ */ jsx("div", {
|
|
23542
23656
|
className: "grid grid-cols-7",
|
|
23543
|
-
children:
|
|
23544
|
-
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u),
|
|
23657
|
+
children: ro.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
23658
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), eo = f && isSameDay(i, f), h = u, g = s;
|
|
23545
23659
|
e === "range" && u && !f && s && !isDateBefore(s, u) ? (h = u, g = s) : (h = null, g = null);
|
|
23546
|
-
let
|
|
23660
|
+
let no = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, h, g)), O = l || p || eo;
|
|
23547
23661
|
return /* @__PURE__ */ jsx(Button, {
|
|
23548
23662
|
type: "button",
|
|
23549
23663
|
onClick: () => A(i),
|
|
@@ -23557,7 +23671,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23557
23671
|
"aria-label": `Select ${formatDate(i)}`,
|
|
23558
23672
|
"aria-selected": O || void 0,
|
|
23559
23673
|
children: /* @__PURE__ */ jsx("div", {
|
|
23560
|
-
className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", O && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500",
|
|
23674
|
+
className: cn("flex h-[26px] w-[26px] items-center justify-center rounded text-[9px] transition-colors", O && "bg-primary-500 font-semibold text-white-variant-1 hover:bg-primary-500", no && !O && "bg-primary-500/20 font-normal text-neutral-900 hover:bg-primary-500/30", o && !O && !no && "border border-primary-500 bg-primary-500/15 font-bold hover:bg-primary-500 hover:text-white", !O && !no && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
23561
23675
|
children: r
|
|
23562
23676
|
})
|
|
23563
23677
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -23622,11 +23736,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23622
23736
|
function h(t) {
|
|
23623
23737
|
e === "single" && (u || s(t), r?.(t));
|
|
23624
23738
|
}
|
|
23625
|
-
function
|
|
23739
|
+
function no(t) {
|
|
23626
23740
|
e === "range" && (u || l(t), r?.(t));
|
|
23627
23741
|
}
|
|
23628
23742
|
function O() {
|
|
23629
|
-
e === "single" ? h(null) :
|
|
23743
|
+
e === "single" ? h(null) : no({
|
|
23630
23744
|
startDate: null,
|
|
23631
23745
|
endDate: null
|
|
23632
23746
|
});
|
|
@@ -23644,7 +23758,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
23644
23758
|
selectedDate: f,
|
|
23645
23759
|
selectedRange: p,
|
|
23646
23760
|
onDateSelect: h,
|
|
23647
|
-
onRangeSelect:
|
|
23761
|
+
onRangeSelect: no
|
|
23648
23762
|
})
|
|
23649
23763
|
}) });
|
|
23650
23764
|
}
|
|
@@ -23782,12 +23896,12 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
23782
23896
|
}) })
|
|
23783
23897
|
});
|
|
23784
23898
|
}
|
|
23785
|
-
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges:
|
|
23899
|
+
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: eo = {}, actions: h = {}, density: g = "normal", className: O, style: ro, isPriority: A = !1 }) {
|
|
23786
23900
|
return /* @__PURE__ */ jsx(Card, {
|
|
23787
23901
|
as: Pressable,
|
|
23788
23902
|
onPress: u,
|
|
23789
|
-
className: cn("w-full rounded-lg border-[1.5px]
|
|
23790
|
-
style:
|
|
23903
|
+
className: cn("w-full rounded-lg border-[1.5px] bg-white-variant-5 p-4", A ? "hover:bg-tertiary-500-variant-4" : "hover:bg-primary-light", !c && !A && "border-primary-400", !c && A && "border-tertiary-500-variant-2", c && !A && "border-neutral-400", c && A && "border-tertiary-500-variant-3", l && !A && "border-primary-500 bg-primary-light", l && A && "border-tertiary-500-variant-2 bg-tertiary-500-variant-4", g === "normal" ? `${EVENT_CARD_HEIGHT_SIZE.normal.style}` : `${EVENT_CARD_HEIGHT_SIZE.compact.style}`, O),
|
|
23904
|
+
style: ro,
|
|
23791
23905
|
"data-service": t,
|
|
23792
23906
|
children: g === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
23793
23907
|
className: "gap-x-2 gap-y-1",
|
|
@@ -23824,7 +23938,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
23824
23938
|
}),
|
|
23825
23939
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
23826
23940
|
className: "mt-3 grid grid-cols-[minmax(0,1fr)_auto] items-center gap-1",
|
|
23827
|
-
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges:
|
|
23941
|
+
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: eo }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
23828
23942
|
actions: h,
|
|
23829
23943
|
className: "col-start-2 justify-self-end"
|
|
23830
23944
|
})]
|
|
@@ -23843,7 +23957,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
23843
23957
|
children: [
|
|
23844
23958
|
e,
|
|
23845
23959
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
23846
|
-
statusBadges:
|
|
23960
|
+
statusBadges: eo,
|
|
23847
23961
|
density: g
|
|
23848
23962
|
}),
|
|
23849
23963
|
/* @__PURE__ */ jsxs("div", {
|
|
@@ -23946,13 +24060,17 @@ function EventDetailSummary({ summary: e }) {
|
|
|
23946
24060
|
})]
|
|
23947
24061
|
});
|
|
23948
24062
|
}
|
|
23949
|
-
function EventDetailContentHeader({ summary: e, priorityText: t,
|
|
24063
|
+
function EventDetailContentHeader({ summary: e, priorityText: t, highlightPriority: n = !1, children: r, className: i }) {
|
|
23950
24064
|
return /* @__PURE__ */ jsxs("div", {
|
|
23951
|
-
className: cn("flex flex-col",
|
|
23952
|
-
children: [
|
|
23953
|
-
className: "
|
|
23954
|
-
|
|
23955
|
-
|
|
24065
|
+
className: cn("flex flex-col", n && "relative", i),
|
|
24066
|
+
children: [
|
|
24067
|
+
n && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 h-full w-1 bg-tertiary-500-variant-2 z-10" }),
|
|
24068
|
+
t != null && /* @__PURE__ */ jsx(EventDetailPriority, { priorityText: t }),
|
|
24069
|
+
/* @__PURE__ */ jsxs("div", {
|
|
24070
|
+
className: "flex flex-col gap-4 p-4",
|
|
24071
|
+
children: [e != null && /* @__PURE__ */ jsx(EventDetailSummary, { summary: e }), r]
|
|
24072
|
+
})
|
|
24073
|
+
]
|
|
23956
24074
|
});
|
|
23957
24075
|
}
|
|
23958
24076
|
function EventDetailContentCalendar({ detail: { summary: e, body: t, priorityText: n, from: r, to: i, link: a, location: o }, className: s }) {
|
|
@@ -23995,6 +24113,7 @@ function EventDetailContentEmail({ detail: { summary: e, body: t, priorityText:
|
|
|
23995
24113
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
23996
24114
|
summary: e,
|
|
23997
24115
|
priorityText: n,
|
|
24116
|
+
highlightPriority: !!n,
|
|
23998
24117
|
className: s,
|
|
23999
24118
|
children: [/* @__PURE__ */ jsx(EventDetailContentEmailDetails, {
|
|
24000
24119
|
subject: r,
|
|
@@ -24336,10 +24455,11 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
|
|
|
24336
24455
|
]
|
|
24337
24456
|
})] });
|
|
24338
24457
|
}
|
|
24339
|
-
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related:
|
|
24458
|
+
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, issue: r, notification: i, project: a, task: o, dueDate: s, startDate: c, assignees: l, reporter: u, team: f, location: p, related: eo }, className: h }) {
|
|
24340
24459
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
24341
24460
|
summary: e,
|
|
24342
24461
|
priorityText: n,
|
|
24462
|
+
highlightPriority: !!n,
|
|
24343
24463
|
className: h,
|
|
24344
24464
|
children: [
|
|
24345
24465
|
/* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
|
|
@@ -24353,7 +24473,7 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
24353
24473
|
reporter: u,
|
|
24354
24474
|
team: f,
|
|
24355
24475
|
location: p,
|
|
24356
|
-
related:
|
|
24476
|
+
related: eo
|
|
24357
24477
|
}),
|
|
24358
24478
|
/* @__PURE__ */ jsx("h2", {
|
|
24359
24479
|
className: "px-4 text-sm font-bold text-neutral-900",
|
|
@@ -24367,10 +24487,10 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
24367
24487
|
});
|
|
24368
24488
|
}
|
|
24369
24489
|
function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, timestamp: a, isPriority: o, isOpen: s, isFirstEvent: c, isSingleEvent: l, className: u }) {
|
|
24370
|
-
return /* @__PURE__ */
|
|
24371
|
-
className: cn("flex h-14 w-full items-center bg-white px-4 py-2", u),
|
|
24490
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
24491
|
+
className: cn("flex h-14 w-full items-center bg-white px-4 py-2", o && "relative", u),
|
|
24372
24492
|
"data-priority": o,
|
|
24373
|
-
children: /* @__PURE__ */ jsxs("div", {
|
|
24493
|
+
children: [o && /* @__PURE__ */ jsx("div", { className: "absolute top-0 left-0 z-10 h-full w-1 bg-tertiary-500-variant-2" }), /* @__PURE__ */ jsxs("div", {
|
|
24374
24494
|
className: "flex w-full items-center gap-4",
|
|
24375
24495
|
children: [
|
|
24376
24496
|
c && /* @__PURE__ */ jsx(IconButton, {
|
|
@@ -24432,7 +24552,7 @@ function EventDetailHeader({ icon: e, subject: t, from: n, prefixTimestamp: r, t
|
|
|
24432
24552
|
})]
|
|
24433
24553
|
})
|
|
24434
24554
|
]
|
|
24435
|
-
})
|
|
24555
|
+
})]
|
|
24436
24556
|
});
|
|
24437
24557
|
}
|
|
24438
24558
|
function EventDetailSkeleton({ className: e }) {
|
|
@@ -24558,6 +24678,16 @@ function EventDetail({ events: e, expandedEventIndex: t }) {
|
|
|
24558
24678
|
}) })
|
|
24559
24679
|
});
|
|
24560
24680
|
}
|
|
24681
|
+
const EventEmptyState = ({ title: e, description: t }) => /* @__PURE__ */ jsxs("div", {
|
|
24682
|
+
className: "flex w-full flex-1 flex-col items-center justify-center gap-2 p-4",
|
|
24683
|
+
children: [/* @__PURE__ */ jsx("h3", {
|
|
24684
|
+
className: "text-sm leading-[1.3] font-medium text-neutral-900",
|
|
24685
|
+
children: e
|
|
24686
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
24687
|
+
className: "w-full text-center text-xs leading-[1.3] font-normal text-neutral-600",
|
|
24688
|
+
children: t
|
|
24689
|
+
})]
|
|
24690
|
+
});
|
|
24561
24691
|
function FilterBarSkeleton({ itemCount: e = 3, className: t }) {
|
|
24562
24692
|
return /* @__PURE__ */ jsx("div", {
|
|
24563
24693
|
className: cn("flex flex-wrap items-center gap-2", t),
|
|
@@ -24964,6 +25094,6 @@ function QtaloImage({ size: e = 40, className: t, ...n }) {
|
|
|
24964
25094
|
}) })]
|
|
24965
25095
|
});
|
|
24966
25096
|
}
|
|
24967
|
-
export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireIcon, GmailIcon, GoogleCalendarIcon, Icon, IconButton, IconCountButton, IconCountButtonSkeleton, InfoTooltip, Input, InsightIcon, IntegrationBar, IntegrationBarSkeleton, IntegrationItem, IntegrationItemSkeleton, IntegrationsCard, JiraIcon, LightIcon, LogoIcon, MinusIcon, MoreIcon, NormalDensityIcon, NotFireIcon, OutlookCalendarIcon, OutlookIcon, Pressable, QtaloImage, ReadIcon, RichContent, SearchIcon, SearchInput, Skeleton, SlackIcon, StatusBadge, StopPropagation, SummaryIcon, SystemIcon, TeamsIcon, Toaster, Tooltip, UnreadIcon, capitalize, cn, colors, formatDate, formatDateRange, formatTimestamp, generateCalendarDays, getDaysInMonth, getFirstDayOfMonth, getInitials, getMonthName, getWeekdays, isDateBefore, isDateInRange, isSameDay, isToday, normalizeContent, parseDate, pickColorFromPalette, stringHash, toMondayBased, toast, toastStore, useAccordion, useDropdown, useLongPress };
|
|
25097
|
+
export { AVATAR_COLOR, AVATAR_COLOR_KEYS, Accordion, AccordionContent, AccordionItem, AccordionTrigger, AccountIcon, AccountInfo, ActionMenu, ActionMenuItem, AddIcon, ArrowIcon, AsanaIcon, Avatar, Badge, BulkActions, BulkActionsSkeleton, Button, CalendarIcon, Card, CardContent, CardFooter, CardHeader, CardLayout, CardSidebar, CardTitle, CheckCircleEmptyIcon, CheckCircleIcon, Checkbox, CheckboxIcon, ClickUpIcon, CloseIcon, CompactDensityIcon, CopyIcon, DarkIcon, DatePicker, Divider, Dropdown, DropdownContext, DropdownMenu, DropdownMenuItem, EVENT_CARD_HEIGHT_SIZE, EventCard, EventCardSkeleton, EventDetail, EventDetailContentCalendar, EventDetailContentEmail, EventDetailContentHeader, EventDetailContentMessage, EventDetailContentTicket, EventDetailHeader, EventDetailPriority, EventDetailSkeleton, EventDetailSummary, EventEmptyState, ExternalLinkIcon, FilterBar, FilterBarSkeleton, FilterButton, FireIcon, GmailIcon, GoogleCalendarIcon, Icon, IconButton, IconCountButton, IconCountButtonSkeleton, InfoTooltip, Input, InsightIcon, IntegrationBar, IntegrationBarSkeleton, IntegrationItem, IntegrationItemSkeleton, IntegrationsCard, JiraIcon, LightIcon, LogoIcon, MinusIcon, MoreIcon, NormalDensityIcon, NotFireIcon, OutlookCalendarIcon, OutlookIcon, Pressable, QtaloImage, ReadIcon, RichContent, SearchIcon, SearchInput, Skeleton, SlackIcon, StatusBadge, StopPropagation, SummaryIcon, SystemIcon, TeamsIcon, Toaster, Tooltip, UnreadIcon, capitalize, cn, colors, formatDate, formatDateRange, formatTimestamp, generateCalendarDays, getDaysInMonth, getFirstDayOfMonth, getInitials, getMonthName, getWeekdays, isDateBefore, isDateInRange, isSameDay, isToday, normalizeContent, parseDate, pickColorFromPalette, stringHash, toMondayBased, toast, toastStore, useAccordion, useDropdown, useLongPress };
|
|
24968
25098
|
|
|
24969
25099
|
//# sourceMappingURL=index.js.map
|