@qtalo/qt-ui-library 0.1.24 → 0.1.26
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 +4 -4
- package/dist/index.js +210 -201
- package/dist/index.js.map +1 -1
- package/package.json +2 -1
package/dist/index.js
CHANGED
|
@@ -326,13 +326,13 @@ var html$1 = freeze(/* @__PURE__ */ "a.abbr.acronym.address.area.article.aside.a
|
|
|
326
326
|
function createDOMPurify() {
|
|
327
327
|
let e = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : getGlobal(), t = (e) => createDOMPurify(e);
|
|
328
328
|
if (t.version = "3.3.1", t.removed = [], !e || !e.document || e.document.nodeType !== NODE_TYPE.document || !e.Element) return t.isSupported = !1, t;
|
|
329
|
-
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e,
|
|
329
|
+
let { document: n } = e, r = n, i = r.currentScript, { DocumentFragment: a, HTMLTemplateElement: o, Node: s, Element: c, NodeFilter: l, NamedNodeMap: u = e.NamedNodeMap || e.MozNamedAttrMap, HTMLFormElement: f, DOMParser: p, trustedTypes: h } = e, g = c.prototype, O = lookupGetter(g, "cloneNode"), A = lookupGetter(g, "remove"), Zo = lookupGetter(g, "nextSibling"), Qo = lookupGetter(g, "childNodes"), $o = 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
|
|
335
|
-
t.isSupported = typeof entries == "function" && typeof
|
|
334
|
+
let R, B = "", { implementation: es, createNodeIterator: ts, createDocumentFragment: ns, getElementsByTagName: rs } = n, { importNode: is } = r, as = _createHooksMap();
|
|
335
|
+
t.isSupported = typeof entries == "function" && typeof $o == "function" && es && es.createHTMLDocument !== void 0;
|
|
336
336
|
let { MUSTACHE_EXPR: os, ERB_EXPR: ss, TMPLIT_EXPR: cs, DATA_ATTR: ls, ARIA_ATTR: us, IS_SCRIPT_OR_DATA: ds, ATTR_WHITESPACE: fs, CUSTOM_ELEMENT: ps } = EXPRESSIONS, { IS_ALLOWED_URI: ms } = EXPRESSIONS, V = null, hs = addToSet({}, [
|
|
337
337
|
...html$1,
|
|
338
338
|
...svg$1,
|
|
@@ -452,8 +452,8 @@ function createDOMPurify() {
|
|
|
452
452
|
]), V.table && (addToSet(V, ["tbody"]), delete vs.tbody), e.TRUSTED_TYPES_POLICY) {
|
|
453
453
|
if (typeof e.TRUSTED_TYPES_POLICY.createHTML != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createHTML\" hook.");
|
|
454
454
|
if (typeof e.TRUSTED_TYPES_POLICY.createScriptURL != "function") throw typeErrorCreate("TRUSTED_TYPES_POLICY configuration option must provide a \"createScriptURL\" hook.");
|
|
455
|
-
|
|
456
|
-
} else
|
|
455
|
+
R = e.TRUSTED_TYPES_POLICY, B = R.createHTML("");
|
|
456
|
+
} else R === void 0 && (R = _createTrustedTypesPolicy(h, i)), R !== null && typeof B == "string" && (B = R.createHTML(""));
|
|
457
457
|
freeze && freeze(e), nc = e;
|
|
458
458
|
}
|
|
459
459
|
}, oc = addToSet({}, [
|
|
@@ -461,7 +461,7 @@ function createDOMPurify() {
|
|
|
461
461
|
...svgFilters,
|
|
462
462
|
...svgDisallowed
|
|
463
463
|
]), sc = addToSet({}, [...mathMl$1, ...mathMlDisallowed]), cc = function(e) {
|
|
464
|
-
let t =
|
|
464
|
+
let t = $o(e);
|
|
465
465
|
(!t || !t.tagName) && (t = {
|
|
466
466
|
namespaceURI: qs,
|
|
467
467
|
tagName: "template"
|
|
@@ -471,9 +471,9 @@ function createDOMPurify() {
|
|
|
471
471
|
}, lc = function(e) {
|
|
472
472
|
arrayPush(t.removed, { element: e });
|
|
473
473
|
try {
|
|
474
|
-
|
|
474
|
+
$o(e).removeChild(e);
|
|
475
475
|
} catch {
|
|
476
|
-
|
|
476
|
+
A(e);
|
|
477
477
|
}
|
|
478
478
|
}, uc = function(e, n) {
|
|
479
479
|
try {
|
|
@@ -501,20 +501,20 @@ function createDOMPurify() {
|
|
|
501
501
|
r = t && t[0];
|
|
502
502
|
}
|
|
503
503
|
ec === "application/xhtml+xml" && qs === Ks && (e = "<html xmlns=\"http://www.w3.org/1999/xhtml\"><head></head><body>" + e + "</body></html>");
|
|
504
|
-
let i =
|
|
504
|
+
let i = R ? R.createHTML(e) : e;
|
|
505
505
|
if (qs === Ks) try {
|
|
506
506
|
t = new p().parseFromString(i, ec);
|
|
507
507
|
} catch {}
|
|
508
508
|
if (!t || !t.documentElement) {
|
|
509
|
-
t =
|
|
509
|
+
t = es.createDocument(qs, "template", null);
|
|
510
510
|
try {
|
|
511
|
-
t.documentElement.innerHTML = Js ?
|
|
511
|
+
t.documentElement.innerHTML = Js ? B : i;
|
|
512
512
|
} catch {}
|
|
513
513
|
}
|
|
514
514
|
let a = t.body || t.documentElement;
|
|
515
|
-
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), qs === Ks ?
|
|
515
|
+
return e && r && a.insertBefore(n.createTextNode(r), a.childNodes[0] || null), qs === Ks ? rs.call(t, Ds ? "html" : "body")[0] : Ds ? t.documentElement : a;
|
|
516
516
|
}, fc = function(e) {
|
|
517
|
-
return
|
|
517
|
+
return ts.call(e.ownerDocument || e, e, l.SHOW_ELEMENT | l.SHOW_COMMENT | l.SHOW_TEXT | l.SHOW_PROCESSING_INSTRUCTION | l.SHOW_CDATA_SECTION, null);
|
|
518
518
|
}, pc = function(e) {
|
|
519
519
|
return e instanceof f && (typeof e.nodeName != "string" || typeof e.textContent != "string" || typeof e.removeChild != "function" || !(e.attributes instanceof u) || typeof e.removeAttribute != "function" || typeof e.setAttribute != "function" || typeof e.namespaceURI != "string" || typeof e.insertBefore != "function" || typeof e.hasChildNodes != "function");
|
|
520
520
|
}, mc = function(e) {
|
|
@@ -527,21 +527,21 @@ function createDOMPurify() {
|
|
|
527
527
|
}
|
|
528
528
|
let gc = function(e) {
|
|
529
529
|
let n = null;
|
|
530
|
-
if (hc(
|
|
530
|
+
if (hc(as.beforeSanitizeElements, e, null), pc(e)) return lc(e), !0;
|
|
531
531
|
let r = Y(e.nodeName);
|
|
532
|
-
if (hc(
|
|
532
|
+
if (hc(as.uponSanitizeElement, e, {
|
|
533
533
|
tagName: r,
|
|
534
534
|
allowedTags: V
|
|
535
535
|
}), Es && e.hasChildNodes() && !mc(e.firstElementChild) && regExpTest(/<[/\w!]/g, e.innerHTML) && regExpTest(/<[/\w!]/g, e.textContent) || e.nodeType === NODE_TYPE.progressingInstruction || Es && e.nodeType === NODE_TYPE.comment && regExpTest(/<[/\w]/g, e.data)) return lc(e), !0;
|
|
536
536
|
if (!(bs.tagCheck instanceof Function && bs.tagCheck(r)) && (!V[r] || vs[r])) {
|
|
537
537
|
if (!vs[r] && vc(r) && (H.tagNameCheck instanceof RegExp && regExpTest(H.tagNameCheck, r) || H.tagNameCheck instanceof Function && H.tagNameCheck(r))) return !1;
|
|
538
538
|
if (Fs && !Rs[r]) {
|
|
539
|
-
let t =
|
|
539
|
+
let t = $o(e) || e.parentNode, n = Qo(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, Zo(e));
|
|
545
545
|
}
|
|
546
546
|
}
|
|
547
547
|
}
|
|
@@ -553,7 +553,7 @@ function createDOMPurify() {
|
|
|
553
553
|
cs
|
|
554
554
|
], (e) => {
|
|
555
555
|
n = stringReplace(n, e, " ");
|
|
556
|
-
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), hc(
|
|
556
|
+
}), e.textContent !== n && (arrayPush(t.removed, { element: e.cloneNode() }), e.textContent = n)), hc(as.afterSanitizeElements, e, null), !1);
|
|
557
557
|
}, _c = function(e, t, r) {
|
|
558
558
|
if (Ns && (t === "id" || t === "name") && (r in n || r in rc)) return !1;
|
|
559
559
|
if (!(Ss && !ys[t] && regExpTest(ls, t)) && !(xs && regExpTest(us, t)) && !(bs.attributeCheck instanceof Function && bs.attributeCheck(t, e))) {
|
|
@@ -565,7 +565,7 @@ function createDOMPurify() {
|
|
|
565
565
|
}, vc = function(e) {
|
|
566
566
|
return e !== "annotation-xml" && stringMatch(e, ps);
|
|
567
567
|
}, yc = function(e) {
|
|
568
|
-
hc(
|
|
568
|
+
hc(as.beforeSanitizeAttributes, e, null);
|
|
569
569
|
let { attributes: n } = e;
|
|
570
570
|
if (!n || pc(e)) return;
|
|
571
571
|
let r = {
|
|
@@ -577,7 +577,7 @@ function createDOMPurify() {
|
|
|
577
577
|
}, i = n.length;
|
|
578
578
|
for (; i--;) {
|
|
579
579
|
let { name: a, namespaceURI: o, value: s } = n[i], c = Y(a), l = s, u = a === "value" ? l : stringTrim(l);
|
|
580
|
-
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, hc(
|
|
580
|
+
if (r.attrName = c, r.attrValue = u, r.keepAttr = !0, r.forceKeepAttr = void 0, hc(as.uponSanitizeAttribute, e, r), u = r.attrValue, Ps && (c === "id" || c === "name") && (uc(a, e), u = "user-content-" + u), Es && regExpTest(/((--!?|])>)|<\/(style|title|textarea)/i, u)) {
|
|
581
581
|
uc(a, e);
|
|
582
582
|
continue;
|
|
583
583
|
}
|
|
@@ -606,12 +606,12 @@ function createDOMPurify() {
|
|
|
606
606
|
uc(a, e);
|
|
607
607
|
continue;
|
|
608
608
|
}
|
|
609
|
-
if (
|
|
609
|
+
if (R && typeof h == "object" && typeof h.getAttributeType == "function" && !o) switch (h.getAttributeType(f, c)) {
|
|
610
610
|
case "TrustedHTML":
|
|
611
|
-
u =
|
|
611
|
+
u = R.createHTML(u);
|
|
612
612
|
break;
|
|
613
613
|
case "TrustedScriptURL":
|
|
614
|
-
u =
|
|
614
|
+
u = R.createScriptURL(u);
|
|
615
615
|
break;
|
|
616
616
|
}
|
|
617
617
|
if (u !== l) try {
|
|
@@ -620,11 +620,11 @@ function createDOMPurify() {
|
|
|
620
620
|
uc(a, e);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
hc(
|
|
623
|
+
hc(as.afterSanitizeAttributes, e, null);
|
|
624
624
|
}, bc = function e(t) {
|
|
625
625
|
let n = null, r = fc(t);
|
|
626
|
-
for (hc(
|
|
627
|
-
hc(
|
|
626
|
+
for (hc(as.beforeSanitizeShadowDOM, t, null); n = r.nextNode();) hc(as.uponSanitizeShadowNode, n, null), gc(n), yc(n), n.content instanceof a && e(n.content);
|
|
627
|
+
hc(as.afterSanitizeShadowDOM, t, null);
|
|
628
628
|
};
|
|
629
629
|
return t.sanitize = function(e) {
|
|
630
630
|
let n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {}, i = null, o = null, c = null, l = null;
|
|
@@ -639,17 +639,17 @@ function createDOMPurify() {
|
|
|
639
639
|
}
|
|
640
640
|
} else if (e instanceof s) i = dc("<!---->"), o = i.ownerDocument.importNode(e, !0), o.nodeType === NODE_TYPE.element && o.nodeName === "BODY" || o.nodeName === "HTML" ? i = o : i.appendChild(o);
|
|
641
641
|
else {
|
|
642
|
-
if (!As && !Ts && !Ds && e.indexOf("<") === -1) return
|
|
643
|
-
if (i = dc(e), !i) return As ? null : Ms ?
|
|
642
|
+
if (!As && !Ts && !Ds && e.indexOf("<") === -1) return R && Ms ? R.createHTML(e) : e;
|
|
643
|
+
if (i = dc(e), !i) return As ? null : Ms ? B : "";
|
|
644
644
|
}
|
|
645
645
|
i && ks && lc(i.firstChild);
|
|
646
646
|
let u = fc(Is ? e : i);
|
|
647
647
|
for (; c = u.nextNode();) gc(c), yc(c), c.content instanceof a && bc(c.content);
|
|
648
648
|
if (Is) return e;
|
|
649
649
|
if (As) {
|
|
650
|
-
if (js) for (l =
|
|
650
|
+
if (js) for (l = ns.call(i.ownerDocument); i.firstChild;) l.appendChild(i.firstChild);
|
|
651
651
|
else l = i;
|
|
652
|
-
return (gs.shadowroot || gs.shadowrootmode) && (l =
|
|
652
|
+
return (gs.shadowroot || gs.shadowrootmode) && (l = is.call(r, l, !0)), l;
|
|
653
653
|
}
|
|
654
654
|
let f = Ds ? i.outerHTML : i.innerHTML;
|
|
655
655
|
return Ds && V["!doctype"] && i.ownerDocument && i.ownerDocument.doctype && i.ownerDocument.doctype.name && regExpTest(DOCTYPE_NAME, i.ownerDocument.doctype.name) && (f = "<!DOCTYPE " + i.ownerDocument.doctype.name + ">\n" + f), Ts && arrayForEach([
|
|
@@ -658,7 +658,7 @@ function createDOMPurify() {
|
|
|
658
658
|
cs
|
|
659
659
|
], (e) => {
|
|
660
660
|
f = stringReplace(f, e, " ");
|
|
661
|
-
}),
|
|
661
|
+
}), R && Ms ? R.createHTML(f) : f;
|
|
662
662
|
}, t.setConfig = function() {
|
|
663
663
|
ac(arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {}), Os = !0;
|
|
664
664
|
}, t.clearConfig = function() {
|
|
@@ -666,17 +666,17 @@ function createDOMPurify() {
|
|
|
666
666
|
}, t.isValidAttribute = function(e, t, n) {
|
|
667
667
|
return nc || ac({}), _c(Y(e), Y(t), n);
|
|
668
668
|
}, t.addHook = function(e, t) {
|
|
669
|
-
typeof t == "function" && arrayPush(
|
|
669
|
+
typeof t == "function" && arrayPush(as[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(as[e], t);
|
|
673
|
+
return n === -1 ? void 0 : arraySplice(as[e], n, 1)[0];
|
|
674
674
|
}
|
|
675
|
-
return arrayPop(
|
|
675
|
+
return arrayPop(as[e]);
|
|
676
676
|
}, t.removeHooks = function(e) {
|
|
677
|
-
|
|
677
|
+
as[e] = [];
|
|
678
678
|
}, t.removeAllHooks = function() {
|
|
679
|
-
|
|
679
|
+
as = _createHooksMap();
|
|
680
680
|
}, t;
|
|
681
681
|
}
|
|
682
682
|
var purify = createDOMPurify();
|
|
@@ -21328,11 +21328,11 @@ function Button({ className: e, children: t, ...n }) {
|
|
|
21328
21328
|
});
|
|
21329
21329
|
}
|
|
21330
21330
|
function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, indeterminateIcon: i, onChange: a, disabled: o, children: s, className: c }) {
|
|
21331
|
-
let u = useRef(null), [f, p] = useState(t ?? !1),
|
|
21331
|
+
let u = useRef(null), [f, p] = useState(t ?? !1), 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
21337
|
e === void 0 && p(n), a?.(n);
|
|
21338
21338
|
}
|
|
@@ -21344,17 +21344,17 @@ function Checkbox({ checked: e, defaultChecked: t, icon: n, indeterminate: r, in
|
|
|
21344
21344
|
type: "checkbox",
|
|
21345
21345
|
className: cn("p-0 absolute h-px w-px overflow-hidden whitespace-nowrap", "[clip-path:inset(50%)]", "border-0"),
|
|
21346
21346
|
disabled: o,
|
|
21347
|
-
onChange:
|
|
21347
|
+
onChange: 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,18 +21372,18 @@ function useDropdown() {
|
|
|
21372
21372
|
return e;
|
|
21373
21373
|
}
|
|
21374
21374
|
function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bottom", offsetX: i = 0, offsetY: a = 0, disabled: o = !1, openOnHover: c = !0, open: u, onOpenChange: p }) {
|
|
21375
|
-
let
|
|
21376
|
-
e !==
|
|
21375
|
+
let O = u !== void 0, [A, R] = useState(!1), B = O ? u : A, es = useCallback((e) => {
|
|
21376
|
+
e !== B && (O || R(e), p?.(e));
|
|
21377
21377
|
}, [
|
|
21378
|
-
|
|
21379
|
-
|
|
21378
|
+
B,
|
|
21379
|
+
O,
|
|
21380
21380
|
p
|
|
21381
|
-
]),
|
|
21382
|
-
if (!
|
|
21383
|
-
let e =
|
|
21381
|
+
]), ts = useRef(null), ns = useRef(null), rs = useRef(null), [is, as] = useState(null), os = useCallback(() => {
|
|
21382
|
+
if (!ts.current || !ns.current) return;
|
|
21383
|
+
let e = ts.current.getBoundingClientRect(), t = ns.current.getBoundingClientRect(), o = e.left;
|
|
21384
21384
|
n === "end" ? o = e.right - t.width : n === "center" && (o = e.left + (e.width - t.width) / 2), o += i;
|
|
21385
21385
|
let s;
|
|
21386
|
-
s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() =>
|
|
21386
|
+
s = r === "bottom" ? e.bottom + a : e.top - t.height + a, queueMicrotask(() => as({
|
|
21387
21387
|
top: s,
|
|
21388
21388
|
left: o
|
|
21389
21389
|
}));
|
|
@@ -21394,52 +21394,52 @@ function Dropdown({ trigger: e, children: t, align: n = "start", side: r = "bott
|
|
|
21394
21394
|
a
|
|
21395
21395
|
]);
|
|
21396
21396
|
useLayoutEffect(() => {
|
|
21397
|
-
|
|
21398
|
-
}, [
|
|
21399
|
-
if (!
|
|
21397
|
+
B && os();
|
|
21398
|
+
}, [B, os]), useEffect(() => {
|
|
21399
|
+
if (!B) return;
|
|
21400
21400
|
let e = () => os();
|
|
21401
21401
|
return window.addEventListener("resize", e), window.addEventListener("scroll", e, !0), () => {
|
|
21402
21402
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
21403
21403
|
};
|
|
21404
|
-
}, [
|
|
21404
|
+
}, [B, os]);
|
|
21405
21405
|
let ss = useCallback(() => {
|
|
21406
|
-
|
|
21407
|
-
}, [
|
|
21408
|
-
|
|
21409
|
-
|
|
21406
|
+
rs.current &&= (clearTimeout(rs.current), null), es(!0);
|
|
21407
|
+
}, [es]), cs = useCallback(() => {
|
|
21408
|
+
rs.current = window.setTimeout(() => {
|
|
21409
|
+
es(!1);
|
|
21410
21410
|
}, 120);
|
|
21411
|
-
}, [
|
|
21411
|
+
}, [es]);
|
|
21412
21412
|
return useEffect(() => {
|
|
21413
21413
|
function e(e) {
|
|
21414
21414
|
let t = e.target;
|
|
21415
|
-
|
|
21415
|
+
ts.current?.contains(t) || ns.current?.contains(t) || es(!1);
|
|
21416
21416
|
}
|
|
21417
21417
|
return document.addEventListener("mousedown", e), () => document.removeEventListener("mousedown", e);
|
|
21418
|
-
}, [
|
|
21419
|
-
|
|
21418
|
+
}, [es]), useEffect(() => () => {
|
|
21419
|
+
rs.current && clearTimeout(rs.current);
|
|
21420
21420
|
}, []), /* @__PURE__ */ jsxs(DropdownContext.Provider, {
|
|
21421
21421
|
value: {
|
|
21422
|
-
close: () =>
|
|
21422
|
+
close: () => es(!1),
|
|
21423
21423
|
open: ss
|
|
21424
21424
|
},
|
|
21425
21425
|
children: [/* @__PURE__ */ jsx("div", {
|
|
21426
|
-
ref:
|
|
21426
|
+
ref: ts,
|
|
21427
21427
|
className: "inline-flex",
|
|
21428
21428
|
onMouseEnter: c ? ss : void 0,
|
|
21429
21429
|
onMouseLeave: c ? cs : void 0,
|
|
21430
|
-
onClick: () =>
|
|
21430
|
+
onClick: () => es(!B),
|
|
21431
21431
|
"aria-haspopup": "menu",
|
|
21432
|
-
"aria-expanded":
|
|
21432
|
+
"aria-expanded": B,
|
|
21433
21433
|
children: e
|
|
21434
|
-
}),
|
|
21435
|
-
ref:
|
|
21434
|
+
}), B && !o && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21435
|
+
ref: ns,
|
|
21436
21436
|
onMouseEnter: c ? ss : void 0,
|
|
21437
21437
|
onMouseLeave: c ? cs : void 0,
|
|
21438
21438
|
style: {
|
|
21439
21439
|
position: "fixed",
|
|
21440
|
-
top:
|
|
21441
|
-
left:
|
|
21442
|
-
visibility:
|
|
21440
|
+
top: is?.top ?? 0,
|
|
21441
|
+
left: is?.left ?? 0,
|
|
21442
|
+
visibility: is ? "visible" : "hidden",
|
|
21443
21443
|
zIndex: 1e3
|
|
21444
21444
|
},
|
|
21445
21445
|
children: t
|
|
@@ -21452,7 +21452,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21452
21452
|
let t = e.target.value;
|
|
21453
21453
|
f || u(t), o?.(t);
|
|
21454
21454
|
}
|
|
21455
|
-
function
|
|
21455
|
+
function O(e) {
|
|
21456
21456
|
s?.(e);
|
|
21457
21457
|
}
|
|
21458
21458
|
return /* @__PURE__ */ jsx("input", {
|
|
@@ -21463,7 +21463,7 @@ function Input({ type: e = "text", value: t, defaultValue: n, disabled: r = !1,
|
|
|
21463
21463
|
"aria-disabled": r || void 0,
|
|
21464
21464
|
"aria-invalid": i || void 0,
|
|
21465
21465
|
onChange: h,
|
|
21466
|
-
onKeyDown:
|
|
21466
|
+
onKeyDown: O,
|
|
21467
21467
|
className: cn("bg-transparent outline-none", r && "pointer-events-none", c)
|
|
21468
21468
|
});
|
|
21469
21469
|
}
|
|
@@ -21501,17 +21501,17 @@ function getVerticalAlign(e, t, n) {
|
|
|
21501
21501
|
return n === "start" ? e.top : n === "end" ? e.bottom - t.height : e.top + e.height / 2 - t.height / 2;
|
|
21502
21502
|
}
|
|
21503
21503
|
function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120, className: i }) {
|
|
21504
|
-
let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p,
|
|
21504
|
+
let a = useRef(null), o = useRef(null), s = useRef(null), [c, u] = useState(!1), [p, O] = useState(null), R = () => {
|
|
21505
21505
|
s.current &&= (clearTimeout(s.current), null), s.current = window.setTimeout(() => {
|
|
21506
21506
|
u(!0);
|
|
21507
21507
|
}, r);
|
|
21508
|
-
},
|
|
21508
|
+
}, B = () => {
|
|
21509
21509
|
s.current &&= (clearTimeout(s.current), null), u(!1);
|
|
21510
21510
|
};
|
|
21511
21511
|
return useLayoutEffect(() => {
|
|
21512
21512
|
if (!c || !a.current || !o.current) return;
|
|
21513
21513
|
let e = a.current.getBoundingClientRect(), t = o.current.getBoundingClientRect(), [r, i] = n.split("-"), s = i ?? "center", l = 0, u = 0;
|
|
21514
|
-
r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)),
|
|
21514
|
+
r === "top" || r === "bottom" ? (l = r === "top" ? e.top - t.height - 4 : e.bottom + 4, u = getHorizontalAlign(e, t, s)) : (u = r === "left" ? e.left - t.width - 4 : e.right + 4, l = getVerticalAlign(e, t, s)), O((e) => e && e.top === l && e.left === u ? e : {
|
|
21515
21515
|
top: l,
|
|
21516
21516
|
left: u
|
|
21517
21517
|
});
|
|
@@ -21520,10 +21520,10 @@ function Tooltip({ children: e, content: t, position: n = "top", delay: r = 120,
|
|
|
21520
21520
|
}, []), /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
21521
21521
|
ref: a,
|
|
21522
21522
|
className: "inline-flex",
|
|
21523
|
-
onMouseEnter:
|
|
21524
|
-
onMouseLeave:
|
|
21525
|
-
onFocus:
|
|
21526
|
-
onBlur:
|
|
21523
|
+
onMouseEnter: R,
|
|
21524
|
+
onMouseLeave: B,
|
|
21525
|
+
onFocus: R,
|
|
21526
|
+
onBlur: B,
|
|
21527
21527
|
children: e
|
|
21528
21528
|
}), c && createPortal(/* @__PURE__ */ jsx("div", {
|
|
21529
21529
|
ref: o,
|
|
@@ -22986,10 +22986,8 @@ function findActiveStep(e, t, n) {
|
|
|
22986
22986
|
return null;
|
|
22987
22987
|
}
|
|
22988
22988
|
function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r = !0, children: i }) {
|
|
22989
|
-
let a = n ?? "onboarding_dismissed", [o, c] = useState(() => readDismissedFromStorage(a));
|
|
22990
|
-
|
|
22991
|
-
c(readDismissedFromStorage(a));
|
|
22992
|
-
}, [a]), useEffect(() => {
|
|
22989
|
+
let a = n ?? "onboarding_dismissed", [o, c] = useState(() => readDismissedFromStorage(a)), [u, f] = useState(a);
|
|
22990
|
+
a !== u && (f(a), c(readDismissedFromStorage(a))), useEffect(() => {
|
|
22993
22991
|
if (!(typeof window > "u")) try {
|
|
22994
22992
|
localStorage.setItem(a, JSON.stringify([...o]));
|
|
22995
22993
|
} catch {}
|
|
@@ -23000,41 +22998,41 @@ function OnboardingEngine({ steps: e, context: t, storageKey: n, isEnabled: r =
|
|
|
23000
22998
|
c((e) => e.size === r.size && [...e].every((e) => r.has(e)) ? e : r);
|
|
23001
22999
|
});
|
|
23002
23000
|
}, [e, a]);
|
|
23003
|
-
let
|
|
23001
|
+
let h = useMemo(() => r ? findActiveStep(e, o, t) : null, [
|
|
23004
23002
|
r,
|
|
23005
23003
|
e,
|
|
23006
23004
|
o,
|
|
23007
23005
|
t
|
|
23008
|
-
]),
|
|
23006
|
+
]), O = h?.step ?? null, Qo = h?.index ?? null, $o = useCallback((e) => {
|
|
23009
23007
|
c((t) => {
|
|
23010
23008
|
if (t.has(e)) return t;
|
|
23011
23009
|
let n = new Set(t);
|
|
23012
23010
|
return n.add(e), n;
|
|
23013
23011
|
});
|
|
23014
|
-
}, []),
|
|
23012
|
+
}, []), R = useCallback(() => {
|
|
23015
23013
|
c((n) => {
|
|
23016
23014
|
let r = findActiveStep(e, n, t);
|
|
23017
23015
|
if (r == null || n.has(r.step.id)) return n;
|
|
23018
23016
|
let i = new Set(n);
|
|
23019
23017
|
return i.add(r.step.id), i;
|
|
23020
23018
|
});
|
|
23021
|
-
}, [e, t]),
|
|
23019
|
+
}, [e, t]), B = useCallback(() => {
|
|
23022
23020
|
c(new Set(e.map((e) => e.id)));
|
|
23023
23021
|
}, [e]);
|
|
23024
23022
|
return /* @__PURE__ */ jsx(Fragment$1, { children: i({
|
|
23025
23023
|
context: t,
|
|
23026
|
-
currentStep:
|
|
23027
|
-
currentStepIndex:
|
|
23024
|
+
currentStep: O,
|
|
23025
|
+
currentStepIndex: Qo,
|
|
23028
23026
|
dismissedStepIds: o,
|
|
23029
23027
|
actions: useMemo(() => ({
|
|
23030
|
-
dismissCurrentStep:
|
|
23028
|
+
dismissCurrentStep: R,
|
|
23031
23029
|
dismissStep: $o,
|
|
23032
|
-
skipAll:
|
|
23033
|
-
close:
|
|
23030
|
+
skipAll: B,
|
|
23031
|
+
close: B
|
|
23034
23032
|
}), [
|
|
23035
|
-
|
|
23033
|
+
R,
|
|
23036
23034
|
$o,
|
|
23037
|
-
|
|
23035
|
+
B
|
|
23038
23036
|
])
|
|
23039
23037
|
}) });
|
|
23040
23038
|
}
|
|
@@ -23206,7 +23204,7 @@ function useToastTimers(e, t) {
|
|
|
23206
23204
|
isPaused: !0
|
|
23207
23205
|
});
|
|
23208
23206
|
}), a.current &&= (clearInterval(a.current), null);
|
|
23209
|
-
}, []),
|
|
23207
|
+
}, []), O = useCallback(() => {
|
|
23210
23208
|
o.current && (o.current = !1, i.current.forEach((t, n) => {
|
|
23211
23209
|
if (t.isPaused && t.remainingTime > 0) {
|
|
23212
23210
|
let r = e.find((e) => e.id === n);
|
|
@@ -23217,7 +23215,7 @@ function useToastTimers(e, t) {
|
|
|
23217
23215
|
e,
|
|
23218
23216
|
u,
|
|
23219
23217
|
f
|
|
23220
|
-
]),
|
|
23218
|
+
]), A = useCallback((e) => {
|
|
23221
23219
|
i.current.delete(e), r((t) => {
|
|
23222
23220
|
let n = new Map(t);
|
|
23223
23221
|
return n.delete(e), n;
|
|
@@ -23238,22 +23236,22 @@ function useToastTimers(e, t) {
|
|
|
23238
23236
|
}, []), {
|
|
23239
23237
|
remainingTimes: n,
|
|
23240
23238
|
pauseAll: p,
|
|
23241
|
-
resumeAll:
|
|
23242
|
-
cleanupTimer:
|
|
23239
|
+
resumeAll: O,
|
|
23240
|
+
cleanupTimer: A
|
|
23243
23241
|
};
|
|
23244
23242
|
}
|
|
23245
23243
|
function Toaster() {
|
|
23246
23244
|
let [e, t] = useState([]), [n, r] = useState([]), i = useRef(/* @__PURE__ */ new Set()), a = useRef(/* @__PURE__ */ new Map()), o = useRef([]), { remainingTimes: c, pauseAll: u, resumeAll: f, cleanupTimer: p } = useToastTimers(e, a);
|
|
23247
23245
|
useEffect(() => toastStore.subscribe(t), []);
|
|
23248
|
-
let
|
|
23246
|
+
let R = useSyncExternalStore(subscribeNoop$1, getClientSnapshot$1, getServerSnapshot$1), B = useCallback((e) => {
|
|
23249
23247
|
e.callbacks?.onOpen?.();
|
|
23250
|
-
}, []),
|
|
23248
|
+
}, []), es = useCallback((e, t) => {
|
|
23251
23249
|
t === "manual" ? e.callbacks?.onClose?.() : (t === "timeout" || t === "replaced") && e.callbacks?.onAutoClose?.(), e.callbacks?.onDismiss?.(t);
|
|
23252
23250
|
}, []);
|
|
23253
23251
|
useEffect(() => {
|
|
23254
23252
|
let t = new Set(e.map((e) => e.id)), n = new Map(e.map((e) => [e.id, e])), s = i.current;
|
|
23255
23253
|
o.current.filter((e) => !t.has(e.id) && e.animationState !== "exiting").forEach((e) => {
|
|
23256
|
-
|
|
23254
|
+
es(e, a.current.get(e.id) ?? toastStore.consumePendingDismissReason(e.id) ?? "timeout"), a.current.delete(e.id);
|
|
23257
23255
|
}), r((r) => {
|
|
23258
23256
|
let i = r.map((e) => {
|
|
23259
23257
|
let t = n.get(e.id);
|
|
@@ -23262,7 +23260,7 @@ function Toaster() {
|
|
|
23262
23260
|
content: t.content,
|
|
23263
23261
|
duration: t.duration
|
|
23264
23262
|
} : e;
|
|
23265
|
-
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (
|
|
23263
|
+
}).map((e) => markAsExiting(e, !t.has(e.id))).map(updateAnimationState), a = [...e.filter((e) => !s.has(e.id)).map((e) => (B(e), {
|
|
23266
23264
|
...e,
|
|
23267
23265
|
animationState: "entering"
|
|
23268
23266
|
})), ...i];
|
|
@@ -23270,20 +23268,20 @@ function Toaster() {
|
|
|
23270
23268
|
}), i.current = t;
|
|
23271
23269
|
}, [
|
|
23272
23270
|
e,
|
|
23273
|
-
|
|
23274
|
-
|
|
23271
|
+
B,
|
|
23272
|
+
es
|
|
23275
23273
|
]);
|
|
23276
|
-
let
|
|
23274
|
+
let ts = useCallback((e) => {
|
|
23277
23275
|
r((t) => {
|
|
23278
23276
|
let n = t.filter((t) => t.id !== e);
|
|
23279
23277
|
return o.current = n, n;
|
|
23280
23278
|
}), p(e), toastStore.cleanup(e);
|
|
23281
|
-
}, [p]),
|
|
23279
|
+
}, [p]), ns = useCallback((e) => {
|
|
23282
23280
|
a.current.set(e, "manual"), toastStore.remove(e);
|
|
23283
23281
|
}, []);
|
|
23284
|
-
if (!
|
|
23285
|
-
let
|
|
23286
|
-
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23282
|
+
if (!R) return null;
|
|
23283
|
+
let rs = groupByPosition(n);
|
|
23284
|
+
return createPortal(/* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(rs).map(([e, t]) => {
|
|
23287
23285
|
let n = t.filter((e) => e.singleSlot), r = t.filter((e) => !e.singleSlot), i = n.length > 0 ? /* @__PURE__ */ jsx("div", {
|
|
23288
23286
|
className: cn("isolate inline-grid max-w-[min(100vw,100%)] grid-cols-1 grid-rows-1", SINGLE_SLOT_PLACE[e]),
|
|
23289
23287
|
children: n.map((e, t) => /* @__PURE__ */ jsx("div", {
|
|
@@ -23292,8 +23290,8 @@ function Toaster() {
|
|
|
23292
23290
|
children: /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23293
23291
|
toast: e,
|
|
23294
23292
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23295
|
-
onExitComplete:
|
|
23296
|
-
onClose:
|
|
23293
|
+
onExitComplete: ts,
|
|
23294
|
+
onClose: ns,
|
|
23297
23295
|
onHoverStart: u,
|
|
23298
23296
|
onHoverEnd: f
|
|
23299
23297
|
})
|
|
@@ -23301,8 +23299,8 @@ function Toaster() {
|
|
|
23301
23299
|
}) : null, a = r.map((e) => /* @__PURE__ */ jsx(ToastWrapper, {
|
|
23302
23300
|
toast: e,
|
|
23303
23301
|
remainingTime: c.get(e.id) ?? e.duration,
|
|
23304
|
-
onExitComplete:
|
|
23305
|
-
onClose:
|
|
23302
|
+
onExitComplete: ts,
|
|
23303
|
+
onClose: ns,
|
|
23306
23304
|
onHoverStart: u,
|
|
23307
23305
|
onHoverEnd: f
|
|
23308
23306
|
}, e.id));
|
|
@@ -23517,10 +23515,10 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23517
23515
|
let s = e > 0, c = s && t === e, l = s && t > 0 && t < e, u = c ? `All (${e})` : l ? `${t}/${e} selected` : `Select all (${e})`, [f, p] = useState(i ?? "normal"), h = () => {
|
|
23518
23516
|
n(!c);
|
|
23519
23517
|
};
|
|
23520
|
-
function
|
|
23518
|
+
function O(e) {
|
|
23521
23519
|
p(e), a?.(e);
|
|
23522
23520
|
}
|
|
23523
|
-
let
|
|
23521
|
+
let $o = {
|
|
23524
23522
|
fire: [{
|
|
23525
23523
|
id: "fire",
|
|
23526
23524
|
tooltip: "Mark as fire",
|
|
@@ -23572,7 +23570,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23572
23570
|
}),
|
|
23573
23571
|
onClick: r.read.off
|
|
23574
23572
|
}]
|
|
23575
|
-
},
|
|
23573
|
+
}, R = [{
|
|
23576
23574
|
value: "normal",
|
|
23577
23575
|
tooltip: "Normal density",
|
|
23578
23576
|
icon: /* @__PURE__ */ jsx(NormalDensityIcon, { size: 20 })
|
|
@@ -23601,7 +23599,7 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23601
23599
|
}),
|
|
23602
23600
|
/* @__PURE__ */ jsx("div", {
|
|
23603
23601
|
className: "flex items-center divide-x divide-neutral-400-variant-1",
|
|
23604
|
-
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries(
|
|
23602
|
+
children: t > 0 && /* @__PURE__ */ jsx(Fragment$1, { children: Object.entries($o).map(([e, t]) => /* @__PURE__ */ jsx("div", {
|
|
23605
23603
|
className: "gap-2 px-1 flex items-center",
|
|
23606
23604
|
children: t.map((e) => /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23607
23605
|
content: e.tooltip,
|
|
@@ -23616,13 +23614,13 @@ function BulkActions({ totalItems: e = 0, selectedItems: t = 0, onSelectAll: n,
|
|
|
23616
23614
|
}),
|
|
23617
23615
|
/* @__PURE__ */ jsx("div", {
|
|
23618
23616
|
className: "gap-2 flex items-center",
|
|
23619
|
-
children:
|
|
23617
|
+
children: R.map(({ value: e, tooltip: t, icon: n }) => {
|
|
23620
23618
|
let r = f === e;
|
|
23621
23619
|
return /* @__PURE__ */ jsx(InfoTooltip, {
|
|
23622
23620
|
content: t,
|
|
23623
23621
|
children: /* @__PURE__ */ jsx(IconButton, {
|
|
23624
23622
|
className: cn("h-7 w-7 p-0 text-neutral-900", r && "bg-white-variant-4"),
|
|
23625
|
-
onClick: () =>
|
|
23623
|
+
onClick: () => O(e),
|
|
23626
23624
|
icon: n,
|
|
23627
23625
|
"aria-pressed": r
|
|
23628
23626
|
})
|
|
@@ -23873,20 +23871,20 @@ function ToggleControlPortal({ isPressed: e, isPortalHovered: t, portalPosition:
|
|
|
23873
23871
|
})
|
|
23874
23872
|
}), document.body);
|
|
23875
23873
|
}
|
|
23876
|
-
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...
|
|
23877
|
-
let
|
|
23874
|
+
function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary", orientation: i = "vertical", status: a = "active", alwaysShowCount: o = !1, showToggleControl: s = !1, pressed: c, defaultPressed: l = !1, onPressedChange: u, classNames: p, ...O }) {
|
|
23875
|
+
let A = iconCountButtonStyles({
|
|
23878
23876
|
variant: r,
|
|
23879
23877
|
orientation: i,
|
|
23880
23878
|
status: a
|
|
23881
|
-
}),
|
|
23879
|
+
}), $o = useRef(null), [R, B] = useState(!1), [es, ts] = useState(!1), [ns, rs] = useState(l), [is, as] = useState(null), os = c ?? ns, ss = s && (R || es || os), cs = typeof n == "number" && n > 0 && (o || a === "active");
|
|
23882
23880
|
function ls(e) {
|
|
23883
|
-
c === void 0 &&
|
|
23881
|
+
c === void 0 && rs(e), u?.(e);
|
|
23884
23882
|
}
|
|
23885
23883
|
return useLayoutEffect(() => {
|
|
23886
|
-
if (!ss ||
|
|
23884
|
+
if (!ss || !$o.current) return;
|
|
23887
23885
|
function e() {
|
|
23888
|
-
let e =
|
|
23889
|
-
e &&
|
|
23886
|
+
let e = $o.current?.getBoundingClientRect();
|
|
23887
|
+
e && as({
|
|
23890
23888
|
top: e.top - 8,
|
|
23891
23889
|
left: e.right - 12
|
|
23892
23890
|
});
|
|
@@ -23895,29 +23893,29 @@ function IconCountButton({ icon: e, label: t, count: n, variant: r = "primary",
|
|
|
23895
23893
|
window.removeEventListener("resize", e), window.removeEventListener("scroll", e, !0);
|
|
23896
23894
|
};
|
|
23897
23895
|
}, [ss]), /* @__PURE__ */ jsxs(Button, {
|
|
23898
|
-
...
|
|
23899
|
-
className: cn(
|
|
23900
|
-
onMouseEnter: () =>
|
|
23901
|
-
onMouseLeave: () =>
|
|
23896
|
+
...O,
|
|
23897
|
+
className: cn(A.root(), p?.root),
|
|
23898
|
+
onMouseEnter: () => B(!0),
|
|
23899
|
+
onMouseLeave: () => B(!1),
|
|
23902
23900
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
23903
23901
|
className: "relative",
|
|
23904
23902
|
children: [/* @__PURE__ */ jsx("div", {
|
|
23905
|
-
ref:
|
|
23906
|
-
className: cn(
|
|
23907
|
-
children: renderIcon(e,
|
|
23908
|
-
}), ss &&
|
|
23903
|
+
ref: $o,
|
|
23904
|
+
className: cn(A.bubble(), p?.bubble),
|
|
23905
|
+
children: renderIcon(e, A.icon())
|
|
23906
|
+
}), ss && is && typeof document < "u" && ToggleControlPortal({
|
|
23909
23907
|
isPressed: os,
|
|
23910
|
-
isPortalHovered:
|
|
23911
|
-
portalPosition:
|
|
23912
|
-
onMouseEnter: () =>
|
|
23913
|
-
onMouseLeave: () =>
|
|
23908
|
+
isPortalHovered: es,
|
|
23909
|
+
portalPosition: is,
|
|
23910
|
+
onMouseEnter: () => ts(!0),
|
|
23911
|
+
onMouseLeave: () => ts(!1),
|
|
23914
23912
|
onToggle: () => ls(!os)
|
|
23915
23913
|
})]
|
|
23916
23914
|
}), /* @__PURE__ */ jsxs("div", {
|
|
23917
|
-
className: cn(
|
|
23915
|
+
className: cn(A.label(), p?.label),
|
|
23918
23916
|
children: [/* @__PURE__ */ jsx("span", { children: t }), cs && /* @__PURE__ */ jsxs("span", {
|
|
23919
23917
|
"aria-label": `${n} items`,
|
|
23920
|
-
className: cn(
|
|
23918
|
+
className: cn(A.count(), p?.count),
|
|
23921
23919
|
children: [
|
|
23922
23920
|
"(",
|
|
23923
23921
|
formatCount(n),
|
|
@@ -23949,7 +23947,7 @@ function ActionMenu({ trigger: e, children: t, className: n, ...r }) {
|
|
|
23949
23947
|
});
|
|
23950
23948
|
}
|
|
23951
23949
|
function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelect: r, onRangeSelect: i }) {
|
|
23952
|
-
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [
|
|
23950
|
+
let { close: a } = useDropdown(), o = useMemo(() => /* @__PURE__ */ new Date(), []), [s, c] = useState(null), u = useRef(t), f = useRef(n), [O, A] = useState(() => {
|
|
23953
23951
|
let r = e === "single" ? t ?? o : n.startDate ?? n.endDate ?? o;
|
|
23954
23952
|
return {
|
|
23955
23953
|
year: r.getFullYear(),
|
|
@@ -23958,13 +23956,13 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23958
23956
|
});
|
|
23959
23957
|
useEffect(() => {
|
|
23960
23958
|
(e === "single" && t && (!u.current || t.getTime() !== u.current.getTime()) || e === "range" && (n.startDate?.getTime() !== f.current.startDate?.getTime() || n.endDate?.getTime() !== f.current.endDate?.getTime())) && queueMicrotask(() => {
|
|
23961
|
-
if (e === "single" && t)
|
|
23959
|
+
if (e === "single" && t) A({
|
|
23962
23960
|
year: t.getFullYear(),
|
|
23963
23961
|
month: t.getMonth()
|
|
23964
23962
|
});
|
|
23965
23963
|
else if (e === "range") {
|
|
23966
23964
|
let e = n.startDate ?? n.endDate;
|
|
23967
|
-
e &&
|
|
23965
|
+
e && A({
|
|
23968
23966
|
year: e.getFullYear(),
|
|
23969
23967
|
month: e.getMonth()
|
|
23970
23968
|
});
|
|
@@ -23975,10 +23973,10 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23975
23973
|
t,
|
|
23976
23974
|
n
|
|
23977
23975
|
]);
|
|
23978
|
-
let
|
|
23979
|
-
function
|
|
23976
|
+
let $o = useMemo(() => generateCalendarDays(O.year, O.month), [O.year, O.month]);
|
|
23977
|
+
function R(t) {
|
|
23980
23978
|
let o = t.getMonth(), s = t.getFullYear();
|
|
23981
|
-
if ((o !==
|
|
23979
|
+
if ((o !== O.month || s !== O.year) && A({
|
|
23982
23980
|
year: s,
|
|
23983
23981
|
month: o
|
|
23984
23982
|
}), e === "single") r(t), a();
|
|
@@ -23993,8 +23991,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
23993
23991
|
}), a());
|
|
23994
23992
|
}
|
|
23995
23993
|
}
|
|
23996
|
-
function
|
|
23997
|
-
|
|
23994
|
+
function B() {
|
|
23995
|
+
A((e) => e.month === 0 ? {
|
|
23998
23996
|
year: e.year - 1,
|
|
23999
23997
|
month: 11
|
|
24000
23998
|
} : {
|
|
@@ -24002,8 +24000,8 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24002
24000
|
month: e.month - 1
|
|
24003
24001
|
});
|
|
24004
24002
|
}
|
|
24005
|
-
function
|
|
24006
|
-
|
|
24003
|
+
function es() {
|
|
24004
|
+
A((e) => e.month === 11 ? {
|
|
24007
24005
|
year: e.year + 1,
|
|
24008
24006
|
month: 0
|
|
24009
24007
|
} : {
|
|
@@ -24011,7 +24009,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24011
24009
|
month: e.month + 1
|
|
24012
24010
|
});
|
|
24013
24011
|
}
|
|
24014
|
-
let
|
|
24012
|
+
let ts = getWeekdays();
|
|
24015
24013
|
return /* @__PURE__ */ jsxs("div", {
|
|
24016
24014
|
className: "mt-1 rounded-lg p-2 shadow-lg w-fit border border-neutral-400 bg-white",
|
|
24017
24015
|
children: [
|
|
@@ -24023,16 +24021,16 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24023
24021
|
direction: "left",
|
|
24024
24022
|
size: 20
|
|
24025
24023
|
}),
|
|
24026
|
-
onClick:
|
|
24024
|
+
onClick: B,
|
|
24027
24025
|
className: "hover:opacity-60",
|
|
24028
24026
|
"aria-label": "Previous month"
|
|
24029
24027
|
}),
|
|
24030
24028
|
/* @__PURE__ */ jsxs("div", {
|
|
24031
24029
|
className: "font-bold text-[10px] text-neutral-900",
|
|
24032
24030
|
children: [
|
|
24033
|
-
getMonthName(
|
|
24031
|
+
getMonthName(O.month),
|
|
24034
24032
|
" ",
|
|
24035
|
-
|
|
24033
|
+
O.year
|
|
24036
24034
|
]
|
|
24037
24035
|
}),
|
|
24038
24036
|
/* @__PURE__ */ jsx(IconButton, {
|
|
@@ -24040,7 +24038,7 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24040
24038
|
direction: "right",
|
|
24041
24039
|
size: 20
|
|
24042
24040
|
}),
|
|
24043
|
-
onClick:
|
|
24041
|
+
onClick: es,
|
|
24044
24042
|
className: "hover:opacity-60",
|
|
24045
24043
|
"aria-label": "Next month"
|
|
24046
24044
|
})
|
|
@@ -24048,20 +24046,20 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24048
24046
|
}),
|
|
24049
24047
|
/* @__PURE__ */ jsx("div", {
|
|
24050
24048
|
className: "mb-2 grid grid-cols-7",
|
|
24051
|
-
children:
|
|
24049
|
+
children: ts.map((e) => /* @__PURE__ */ jsx("div", {
|
|
24052
24050
|
className: "p-0.5 font-bold flex items-center justify-center text-[9px] text-neutral-900",
|
|
24053
24051
|
children: e
|
|
24054
24052
|
}, e))
|
|
24055
24053
|
}),
|
|
24056
24054
|
/* @__PURE__ */ jsx("div", {
|
|
24057
24055
|
className: "grid grid-cols-7",
|
|
24058
|
-
children:
|
|
24059
|
-
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f),
|
|
24060
|
-
e === "range" && u && !f && s && !isDateBefore(s, u) ? (
|
|
24061
|
-
let
|
|
24056
|
+
children: $o.map(({ day: r, date: i, isCurrentMonth: a }) => {
|
|
24057
|
+
let o = isToday(i), l = e === "single" && t && isSameDay(i, t), { startDate: u, endDate: f } = n, p = u && isSameDay(i, u), h = f && isSameDay(i, f), g = u, O = s;
|
|
24058
|
+
e === "range" && u && !f && s && !isDateBefore(s, u) ? (g = u, O = s) : (g = null, O = null);
|
|
24059
|
+
let A = e === "range" && (isDateInRange(i, u, f) || isDateInRange(i, g, O)), Qo = l || p || h;
|
|
24062
24060
|
return /* @__PURE__ */ jsx(Button, {
|
|
24063
24061
|
type: "button",
|
|
24064
|
-
onClick: () =>
|
|
24062
|
+
onClick: () => R(i),
|
|
24065
24063
|
onMouseEnter: () => {
|
|
24066
24064
|
e === "range" && u && !f && !isDateBefore(i, u) && c(i);
|
|
24067
24065
|
},
|
|
@@ -24070,9 +24068,9 @@ function CalendarPanel({ mode: e, selectedDate: t, selectedRange: n, onDateSelec
|
|
|
24070
24068
|
},
|
|
24071
24069
|
className: "p-0.5",
|
|
24072
24070
|
"aria-label": `Select ${formatDate(i)}`,
|
|
24073
|
-
"aria-selected":
|
|
24071
|
+
"aria-selected": Qo || void 0,
|
|
24074
24072
|
children: /* @__PURE__ */ jsx("div", {
|
|
24075
|
-
className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors",
|
|
24073
|
+
className: cn("rounded flex h-[26px] w-[26px] items-center justify-center text-[9px] transition-colors", Qo && "font-semibold bg-primary-500 text-white-variant-1 hover:bg-primary-500", A && !Qo && "font-normal bg-primary-500/20 text-neutral-900 hover:bg-primary-500/30", o && !Qo && !A && "font-bold border border-primary-500 bg-primary-500/15 hover:bg-primary-500 hover:text-white", !Qo && !A && (a ? "text-neutral-900 hover:bg-neutral-300" : "text-neutral-600 hover:bg-neutral-200")),
|
|
24076
24074
|
children: r
|
|
24077
24075
|
})
|
|
24078
24076
|
}, `${i.getFullYear()}-${i.getMonth()}-${r}`);
|
|
@@ -24137,11 +24135,11 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
24137
24135
|
function h(t) {
|
|
24138
24136
|
e === "single" && (u || s(t), r?.(t));
|
|
24139
24137
|
}
|
|
24140
|
-
function
|
|
24138
|
+
function O(t) {
|
|
24141
24139
|
e === "range" && (u || l(t), r?.(t));
|
|
24142
24140
|
}
|
|
24143
|
-
function
|
|
24144
|
-
e === "single" ? h(null) :
|
|
24141
|
+
function Qo() {
|
|
24142
|
+
e === "single" ? h(null) : O({
|
|
24145
24143
|
startDate: null,
|
|
24146
24144
|
endDate: null
|
|
24147
24145
|
});
|
|
@@ -24151,7 +24149,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
24151
24149
|
displayText: e === "single" ? formatDate(f) : formatDateRange(p.startDate, p.endDate),
|
|
24152
24150
|
disabled: i,
|
|
24153
24151
|
className: a,
|
|
24154
|
-
onClear:
|
|
24152
|
+
onClear: Qo
|
|
24155
24153
|
}),
|
|
24156
24154
|
disabled: i,
|
|
24157
24155
|
children: /* @__PURE__ */ jsx(CalendarPanel, {
|
|
@@ -24159,7 +24157,7 @@ function DatePicker({ mode: e = "single", value: t, defaultValue: n, onChange: r
|
|
|
24159
24157
|
selectedDate: f,
|
|
24160
24158
|
selectedRange: p,
|
|
24161
24159
|
onDateSelect: h,
|
|
24162
|
-
onRangeSelect:
|
|
24160
|
+
onRangeSelect: O
|
|
24163
24161
|
})
|
|
24164
24162
|
}) });
|
|
24165
24163
|
}
|
|
@@ -24365,18 +24363,18 @@ function EventActionsList({ actions: e, className: t }) {
|
|
|
24365
24363
|
}) })
|
|
24366
24364
|
});
|
|
24367
24365
|
}
|
|
24368
|
-
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions:
|
|
24366
|
+
function EventCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, timestampTooltip: o, workspace: s, read: c = !1, selected: l = !1, onSelect: u, checked: f = !1, onCheckedChange: p, statusBadges: h = {}, actions: g = {}, density: O = "normal", className: A, style: $o, isPriority: R, isDone: B }) {
|
|
24369
24367
|
return /* @__PURE__ */ jsx(Card, {
|
|
24370
24368
|
as: Pressable,
|
|
24371
24369
|
onPress: u,
|
|
24372
24370
|
className: cn(eventCardStyles({
|
|
24373
|
-
tone:
|
|
24371
|
+
tone: R ? "priority" : B ? "done" : "default",
|
|
24374
24372
|
state: l ? "selected" : c ? "read" : "unread",
|
|
24375
|
-
density:
|
|
24376
|
-
}),
|
|
24377
|
-
style:
|
|
24373
|
+
density: O
|
|
24374
|
+
}), A),
|
|
24375
|
+
style: $o,
|
|
24378
24376
|
"data-service": t,
|
|
24379
|
-
children:
|
|
24377
|
+
children: O === "normal" ? /* @__PURE__ */ jsxs(CardLayout, {
|
|
24380
24378
|
className: "gap-x-2 gap-y-1",
|
|
24381
24379
|
children: [
|
|
24382
24380
|
/* @__PURE__ */ jsx(CardSidebar, { children: /* @__PURE__ */ jsx(EventCheckbox, {
|
|
@@ -24412,7 +24410,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24412
24410
|
/* @__PURE__ */ jsxs(CardFooter, {
|
|
24413
24411
|
className: "mt-3 gap-1 grid grid-cols-[minmax(0,1fr)_auto] items-center",
|
|
24414
24412
|
children: [/* @__PURE__ */ jsx(EventStatusesList, { statusBadges: h }), /* @__PURE__ */ jsx(EventActionsList, {
|
|
24415
|
-
actions:
|
|
24413
|
+
actions: g,
|
|
24416
24414
|
className: "col-start-2 justify-self-end"
|
|
24417
24415
|
})]
|
|
24418
24416
|
})
|
|
@@ -24431,7 +24429,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24431
24429
|
e,
|
|
24432
24430
|
/* @__PURE__ */ jsx(EventStatusesList, {
|
|
24433
24431
|
statusBadges: h,
|
|
24434
|
-
density:
|
|
24432
|
+
density: O
|
|
24435
24433
|
}),
|
|
24436
24434
|
/* @__PURE__ */ jsxs("div", {
|
|
24437
24435
|
className: cn("min-w-0 gap-2 text-sm font-bold flex items-center whitespace-nowrap text-neutral-900", c && "font-medium"),
|
|
@@ -24451,7 +24449,7 @@ function EventCard({ icon: e, service: t, sender: n, title: r, content: i, times
|
|
|
24451
24449
|
]
|
|
24452
24450
|
}),
|
|
24453
24451
|
/* @__PURE__ */ jsx("div", { className: "flex-1" }),
|
|
24454
|
-
/* @__PURE__ */ jsx(EventActionsList, { actions:
|
|
24452
|
+
/* @__PURE__ */ jsx(EventActionsList, { actions: g }),
|
|
24455
24453
|
/* @__PURE__ */ jsx(InfoTooltip, {
|
|
24456
24454
|
content: o,
|
|
24457
24455
|
children: /* @__PURE__ */ jsx("span", {
|
|
@@ -24618,7 +24616,8 @@ var eventSummaryCardStyles = tv({
|
|
|
24618
24616
|
variants: {
|
|
24619
24617
|
tone: {
|
|
24620
24618
|
default: "hover:bg-primary-light",
|
|
24621
|
-
priority: "hover:bg-tertiary-500-variant-4"
|
|
24619
|
+
priority: "hover:bg-tertiary-500-variant-4",
|
|
24620
|
+
insight: "hover:bg-primary-light"
|
|
24622
24621
|
},
|
|
24623
24622
|
state: {
|
|
24624
24623
|
normal: "",
|
|
@@ -24634,7 +24633,7 @@ var eventSummaryCardStyles = tv({
|
|
|
24634
24633
|
{
|
|
24635
24634
|
tone: "default",
|
|
24636
24635
|
state: "selected",
|
|
24637
|
-
class: "border-
|
|
24636
|
+
class: "border-neutral-600 bg-primary-light"
|
|
24638
24637
|
},
|
|
24639
24638
|
{
|
|
24640
24639
|
tone: "priority",
|
|
@@ -24645,6 +24644,16 @@ var eventSummaryCardStyles = tv({
|
|
|
24645
24644
|
tone: "priority",
|
|
24646
24645
|
state: "selected",
|
|
24647
24646
|
class: "border-tertiary-500-variant-2 bg-tertiary-500-variant-4"
|
|
24647
|
+
},
|
|
24648
|
+
{
|
|
24649
|
+
tone: "insight",
|
|
24650
|
+
state: "normal",
|
|
24651
|
+
class: "border-primary-500/30"
|
|
24652
|
+
},
|
|
24653
|
+
{
|
|
24654
|
+
tone: "insight",
|
|
24655
|
+
state: "selected",
|
|
24656
|
+
class: "border-primary-500 bg-primary-light"
|
|
24648
24657
|
}
|
|
24649
24658
|
]
|
|
24650
24659
|
});
|
|
@@ -24685,11 +24694,11 @@ function EventSummaryFireButton({ active: e, onClick: t }) {
|
|
|
24685
24694
|
}) });
|
|
24686
24695
|
}
|
|
24687
24696
|
function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i, timestamp: a, workspace: o, selected: s = !1, onSelect: c, actions: l, className: u }) {
|
|
24688
|
-
let { fire: f, insight: p, link: h } = l,
|
|
24697
|
+
let { fire: f, insight: p, link: h } = l, g = p?.label ?? null;
|
|
24689
24698
|
return /* @__PURE__ */ jsxs(Pressable, {
|
|
24690
24699
|
onPress: c,
|
|
24691
24700
|
className: cn(eventSummaryCardStyles({
|
|
24692
|
-
tone: f.active ? "priority" : "default",
|
|
24701
|
+
tone: f.active ? "priority" : insightLabelVisible(g) ? "insight" : "default",
|
|
24693
24702
|
state: s ? "selected" : "normal"
|
|
24694
24703
|
}), EVENT_SUMMARY_CARD_HEIGHT_SIZE.style, u),
|
|
24695
24704
|
"data-service": t,
|
|
@@ -24713,8 +24722,8 @@ function EventSummaryCard({ icon: e, service: t, sender: n, title: r, content: i
|
|
|
24713
24722
|
className: "text-xs leading-tight font-semibold tracking-wide flex-1 text-right whitespace-nowrap text-neutral-800",
|
|
24714
24723
|
children: a
|
|
24715
24724
|
}),
|
|
24716
|
-
insightLabelVisible(
|
|
24717
|
-
/* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
24725
|
+
insightLabelVisible(g) && /* @__PURE__ */ jsx(EventSummaryInsightChip, { label: g }),
|
|
24726
|
+
f.onClick && /* @__PURE__ */ jsx(EventSummaryFireButton, {
|
|
24718
24727
|
active: f.active,
|
|
24719
24728
|
onClick: f.onClick
|
|
24720
24729
|
})
|
|
@@ -24972,7 +24981,7 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
24972
24981
|
useEffect(() => {
|
|
24973
24982
|
e.length > 0 && !f.current && (f.current = !0, u.current?.scrollIntoView({ behavior: "smooth" }));
|
|
24974
24983
|
}, [e]);
|
|
24975
|
-
let p = o,
|
|
24984
|
+
let p = o, g = useCallback((t) => {
|
|
24976
24985
|
if (!c.current) return;
|
|
24977
24986
|
let n = Array.from(c.current.querySelectorAll("[data-group-id][class*=\"scroll-mt\"]")).filter((t) => {
|
|
24978
24987
|
let n = t.getAttribute("data-group-id");
|
|
@@ -24998,10 +25007,10 @@ function EventDetailContentMessage({ detail: { groups: e, summary: t, priorityTe
|
|
|
24998
25007
|
children: [e.map((e) => {
|
|
24999
25008
|
let t = e.isPriority ? p-- : 0, n = t ? () => {
|
|
25000
25009
|
let e = t + 1;
|
|
25001
|
-
e <= o &&
|
|
25010
|
+
e <= o && g(e);
|
|
25002
25011
|
} : void 0, r = t ? () => {
|
|
25003
25012
|
let e = t - 1;
|
|
25004
|
-
e >= 1 &&
|
|
25013
|
+
e >= 1 && g(e);
|
|
25005
25014
|
} : void 0;
|
|
25006
25015
|
return /* @__PURE__ */ jsx(MessageGroup, {
|
|
25007
25016
|
group: {
|
|
@@ -25071,13 +25080,13 @@ function EventDetailContentTicketDetails({ issue: e, notification: t, project: n
|
|
|
25071
25080
|
]
|
|
25072
25081
|
})] });
|
|
25073
25082
|
}
|
|
25074
|
-
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location:
|
|
25083
|
+
function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText: n, followUpTitle: r, followUpSubtitle: i, issue: a, notification: o, project: s, task: c, dueDate: l, startDate: u, assignees: f, reporter: p, team: h, location: g, related: O }, className: A }) {
|
|
25075
25084
|
return /* @__PURE__ */ jsxs(EventDetailContentHeader, {
|
|
25076
25085
|
summary: e,
|
|
25077
25086
|
priorityText: n,
|
|
25078
25087
|
followUpTitle: r,
|
|
25079
25088
|
followUpSubtitle: i,
|
|
25080
|
-
className:
|
|
25089
|
+
className: A,
|
|
25081
25090
|
children: [
|
|
25082
25091
|
/* @__PURE__ */ jsx(EventDetailContentTicketDetails, {
|
|
25083
25092
|
issue: a,
|
|
@@ -25089,8 +25098,8 @@ function EventDetailContentTicket({ detail: { summary: e, body: t, priorityText:
|
|
|
25089
25098
|
assignees: f,
|
|
25090
25099
|
reporter: p,
|
|
25091
25100
|
team: h,
|
|
25092
|
-
location:
|
|
25093
|
-
related:
|
|
25101
|
+
location: g,
|
|
25102
|
+
related: O
|
|
25094
25103
|
}),
|
|
25095
25104
|
/* @__PURE__ */ jsx("h2", {
|
|
25096
25105
|
className: "px-4 text-sm font-bold text-neutral-900",
|
|
@@ -25608,16 +25617,16 @@ function OnboardingCard({ stepLabel: e, title: t, description: n, titleAccessory
|
|
|
25608
25617
|
children: [i, a]
|
|
25609
25618
|
})
|
|
25610
25619
|
]
|
|
25611
|
-
}),
|
|
25620
|
+
}), g = wrapArrow(/* @__PURE__ */ jsx(OnboardingCardArrow, {
|
|
25612
25621
|
layout: o,
|
|
25613
25622
|
placement: s
|
|
25614
|
-
}), c, l),
|
|
25623
|
+
}), c, l), O = s === "before" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [g, h] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [h, g] });
|
|
25615
25624
|
return o === "horizontal" ? /* @__PURE__ */ jsx("div", {
|
|
25616
25625
|
className: cn("flex items-center", u),
|
|
25617
|
-
children:
|
|
25626
|
+
children: O
|
|
25618
25627
|
}) : /* @__PURE__ */ jsx("div", {
|
|
25619
25628
|
className: cn("flex flex-col items-center", u),
|
|
25620
|
-
children:
|
|
25629
|
+
children: O
|
|
25621
25630
|
});
|
|
25622
25631
|
}
|
|
25623
25632
|
var subscribeNoop = () => () => {}, getClientSnapshot = () => !0, getServerSnapshot = () => !1, PRIMARY_BTN = "rounded-lg bg-white px-4 py-1.5 text-xs font-semibold text-primary-500 transition-opacity hover:opacity-90", GHOST_BTN = "text-xs font-semibold text-white/70 transition-colors hover:text-white";
|
|
@@ -25665,7 +25674,7 @@ function OnboardingPortal({ currentStep: e, currentStepIndex: t, actions: n, ste
|
|
|
25665
25674
|
let p = e.layout === "vertical" && o.mode === "vertical" ? {
|
|
25666
25675
|
marginLeft: o.arrowMarginLeft,
|
|
25667
25676
|
...e.arrowWrapperStyle
|
|
25668
|
-
} : e.arrowWrapperStyle,
|
|
25677
|
+
} : e.arrowWrapperStyle, A = /* @__PURE__ */ jsx(OnboardingCard, {
|
|
25669
25678
|
stepLabel: e.stepLabel ?? (t == null ? void 0 : `${t + 1} / ${r.length}`),
|
|
25670
25679
|
title: e.title,
|
|
25671
25680
|
description: e.description,
|
|
@@ -25704,7 +25713,7 @@ function OnboardingPortal({ currentStep: e, currentStepIndex: t, actions: n, ste
|
|
|
25704
25713
|
left: o.left
|
|
25705
25714
|
}
|
|
25706
25715
|
},
|
|
25707
|
-
children:
|
|
25716
|
+
children: A
|
|
25708
25717
|
}), document.body);
|
|
25709
25718
|
}
|
|
25710
25719
|
function Onboarding({ steps: e, context: t, storageKey: n, onFinish: r, isEnabled: i = !0 }) {
|
|
@@ -25725,7 +25734,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25725
25734
|
function h(e) {
|
|
25726
25735
|
u || l(e), r?.(e);
|
|
25727
25736
|
}
|
|
25728
|
-
function
|
|
25737
|
+
function O() {
|
|
25729
25738
|
u || l(""), r?.(""), a?.();
|
|
25730
25739
|
}
|
|
25731
25740
|
return /* @__PURE__ */ jsxs("fieldset", {
|
|
@@ -25751,7 +25760,7 @@ function SearchInput({ value: e, defaultValue: t, placeholder: n = "Search...",
|
|
|
25751
25760
|
size: 16,
|
|
25752
25761
|
className: "text-neutral-700"
|
|
25753
25762
|
}),
|
|
25754
|
-
onClick:
|
|
25763
|
+
onClick: O,
|
|
25755
25764
|
"aria-label": "Clear search",
|
|
25756
25765
|
className: "rounded p-0 transition-opacity hover:opacity-70"
|
|
25757
25766
|
})
|