@moondreamsdev/dreamer-ui 1.7.10-test.174 → 1.7.10-test.175
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/{Toast-BdU3VnI4.js → Toast-BlFyNHqO.js} +51 -43
- package/dist/Toast-BlFyNHqO.js.map +1 -0
- package/dist/Toast-CaIkPnyS.cjs +2 -0
- package/dist/Toast-CaIkPnyS.cjs.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +3 -3
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +1 -1
- package/package.json +1 -1
- package/dist/Toast-BCWqlqVp.cjs +0 -2
- package/dist/Toast-BCWqlqVp.cjs.map +0 -1
- package/dist/Toast-BdU3VnI4.js.map +0 -1
- package/dist/src/components/tooltip/hooks.d.ts +0 -31
|
@@ -316,6 +316,14 @@ l(null);
|
|
|
316
316
|
l(null);
|
|
317
317
|
l(void 0);
|
|
318
318
|
l(void 0);
|
|
319
|
+
l(null);
|
|
320
|
+
l(null);
|
|
321
|
+
l(void 0);
|
|
322
|
+
l(void 0);
|
|
323
|
+
l(null);
|
|
324
|
+
l(null);
|
|
325
|
+
l(void 0);
|
|
326
|
+
l(void 0);
|
|
319
327
|
function J() {
|
|
320
328
|
const [n, u] = x(0);
|
|
321
329
|
return p(() => {
|
|
@@ -366,8 +374,8 @@ function Y({
|
|
|
366
374
|
size: u,
|
|
367
375
|
rounded: i = k.rounded,
|
|
368
376
|
loading: e,
|
|
369
|
-
className:
|
|
370
|
-
...
|
|
377
|
+
className: r,
|
|
378
|
+
...o
|
|
371
379
|
}) {
|
|
372
380
|
let a;
|
|
373
381
|
n === "link" && !u ? a = "fitted" : a = u || k.size;
|
|
@@ -377,22 +385,22 @@ function Y({
|
|
|
377
385
|
U[a],
|
|
378
386
|
W[i],
|
|
379
387
|
e && "relative pointer-events-none",
|
|
380
|
-
|
|
388
|
+
r
|
|
381
389
|
);
|
|
382
|
-
if (
|
|
390
|
+
if (o.href && !o.disabled)
|
|
383
391
|
return /* @__PURE__ */ t(
|
|
384
392
|
"a",
|
|
385
393
|
{
|
|
386
|
-
...
|
|
387
|
-
rel:
|
|
388
|
-
"aria-label":
|
|
389
|
-
"aria-description":
|
|
390
|
-
href:
|
|
394
|
+
...o,
|
|
395
|
+
rel: o.rel ? o.rel : o.target === "_blank" ? "noopener noreferrer" : void 0,
|
|
396
|
+
"aria-label": o["aria-label"],
|
|
397
|
+
"aria-description": o["aria-description"],
|
|
398
|
+
href: o.href,
|
|
391
399
|
className: s,
|
|
392
|
-
children:
|
|
400
|
+
children: o.children
|
|
393
401
|
}
|
|
394
402
|
);
|
|
395
|
-
const d =
|
|
403
|
+
const d = o, c = () => d.children ? typeof d.children == "string" || typeof d.children == "number" || typeof d.children == "boolean" ? /* @__PURE__ */ t("span", { className: y(e && "invisible"), children: d.children }) : g.Children.map(d.children, (v, m) => {
|
|
396
404
|
if (g.isValidElement(v)) {
|
|
397
405
|
const f = v.props;
|
|
398
406
|
return g.cloneElement(v, {
|
|
@@ -420,9 +428,9 @@ function Y({
|
|
|
420
428
|
);
|
|
421
429
|
}
|
|
422
430
|
function R(n) {
|
|
423
|
-
const [u, i] = x(!1), [e,
|
|
431
|
+
const [u, i] = x(!1), [e, r] = x(!1);
|
|
424
432
|
return p(() => {
|
|
425
|
-
n ? (
|
|
433
|
+
n ? (r(!0), setTimeout(() => i(!0), 10)) : (i(!1), setTimeout(() => r(!1), 150));
|
|
426
434
|
}, [n]), { show: u, shouldRender: e };
|
|
427
435
|
}
|
|
428
436
|
function ll(n, u) {
|
|
@@ -437,14 +445,14 @@ function ll(n, u) {
|
|
|
437
445
|
}
|
|
438
446
|
function nl(n, u) {
|
|
439
447
|
const i = K(null), e = j(() => {
|
|
440
|
-
const
|
|
441
|
-
if (!
|
|
442
|
-
const
|
|
443
|
-
if (
|
|
444
|
-
|
|
448
|
+
const r = document.getElementById(n);
|
|
449
|
+
if (!r) return;
|
|
450
|
+
const o = r.querySelectorAll('[data-modal-action="true"]');
|
|
451
|
+
if (o.length > 0) {
|
|
452
|
+
o[0].focus();
|
|
445
453
|
return;
|
|
446
454
|
}
|
|
447
|
-
const a =
|
|
455
|
+
const a = r.querySelectorAll(
|
|
448
456
|
'button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])'
|
|
449
457
|
);
|
|
450
458
|
if (a.length > 0) {
|
|
@@ -456,7 +464,7 @@ function nl(n, u) {
|
|
|
456
464
|
a[0].focus();
|
|
457
465
|
return;
|
|
458
466
|
}
|
|
459
|
-
|
|
467
|
+
r.focus();
|
|
460
468
|
}, [n]);
|
|
461
469
|
p(() => (u && (i.current = document.activeElement, e()), () => {
|
|
462
470
|
document.body.style.overflow = "auto", i.current instanceof HTMLElement && i.current.focus();
|
|
@@ -467,8 +475,8 @@ function el({
|
|
|
467
475
|
isOpen: u,
|
|
468
476
|
onClose: i,
|
|
469
477
|
title: e,
|
|
470
|
-
children:
|
|
471
|
-
contentOnly:
|
|
478
|
+
children: r,
|
|
479
|
+
contentOnly: o = !1,
|
|
472
480
|
className: a,
|
|
473
481
|
overlayClassName: s,
|
|
474
482
|
containerClassName: d,
|
|
@@ -503,8 +511,8 @@ function el({
|
|
|
503
511
|
}
|
|
504
512
|
}
|
|
505
513
|
),
|
|
506
|
-
|
|
507
|
-
!
|
|
514
|
+
o && /* @__PURE__ */ t("div", { className: h("relative w-fit", a), children: r }),
|
|
515
|
+
!o && /* @__PURE__ */ b(
|
|
508
516
|
"div",
|
|
509
517
|
{
|
|
510
518
|
id: E,
|
|
@@ -526,7 +534,7 @@ function el({
|
|
|
526
534
|
}
|
|
527
535
|
),
|
|
528
536
|
I(),
|
|
529
|
-
|
|
537
|
+
r,
|
|
530
538
|
B()
|
|
531
539
|
]
|
|
532
540
|
}
|
|
@@ -542,8 +550,8 @@ function sl({
|
|
|
542
550
|
message: u,
|
|
543
551
|
cancelText: i,
|
|
544
552
|
confirmText: e,
|
|
545
|
-
onConfirm:
|
|
546
|
-
onClose:
|
|
553
|
+
onConfirm: r,
|
|
554
|
+
onClose: o,
|
|
547
555
|
destructive: a = !1,
|
|
548
556
|
title: s,
|
|
549
557
|
...d
|
|
@@ -562,25 +570,25 @@ function sl({
|
|
|
562
570
|
{
|
|
563
571
|
label: c.cancel,
|
|
564
572
|
variant: "secondary",
|
|
565
|
-
onClick:
|
|
573
|
+
onClick: o
|
|
566
574
|
}
|
|
567
575
|
] : [],
|
|
568
576
|
{
|
|
569
577
|
label: c.confirm,
|
|
570
578
|
variant: a ? "destructive" : "primary",
|
|
571
579
|
onClick: () => {
|
|
572
|
-
|
|
580
|
+
r == null || r(), o();
|
|
573
581
|
}
|
|
574
582
|
}
|
|
575
583
|
],
|
|
576
|
-
[c, a,
|
|
584
|
+
[c, a, r, o]
|
|
577
585
|
);
|
|
578
586
|
return /* @__PURE__ */ t(
|
|
579
587
|
el,
|
|
580
588
|
{
|
|
581
589
|
...d,
|
|
582
590
|
title: s || c.defaultTitle,
|
|
583
|
-
onClose:
|
|
591
|
+
onClose: o,
|
|
584
592
|
actions: v,
|
|
585
593
|
disableCloseOnOverlayClick: n === "confirm",
|
|
586
594
|
hideCloseButton: n === "confirm",
|
|
@@ -617,8 +625,8 @@ function ml({
|
|
|
617
625
|
title: u,
|
|
618
626
|
description: i,
|
|
619
627
|
type: e = "info",
|
|
620
|
-
action:
|
|
621
|
-
duration:
|
|
628
|
+
action: r,
|
|
629
|
+
duration: o = 5e3,
|
|
622
630
|
onRemove: a,
|
|
623
631
|
customTypes: s,
|
|
624
632
|
customComponent: d
|
|
@@ -629,13 +637,13 @@ function ml({
|
|
|
629
637
|
}, 150);
|
|
630
638
|
}, [n, a]);
|
|
631
639
|
if (p(() => {
|
|
632
|
-
if (
|
|
640
|
+
if (o > 0) {
|
|
633
641
|
const w = setTimeout(() => {
|
|
634
642
|
m();
|
|
635
|
-
},
|
|
643
|
+
}, o);
|
|
636
644
|
return () => clearTimeout(w);
|
|
637
645
|
}
|
|
638
|
-
}, [
|
|
646
|
+
}, [o, n, a, m]), d)
|
|
639
647
|
return /* @__PURE__ */ t(
|
|
640
648
|
d,
|
|
641
649
|
{
|
|
@@ -643,8 +651,8 @@ function ml({
|
|
|
643
651
|
title: u,
|
|
644
652
|
description: i,
|
|
645
653
|
type: e,
|
|
646
|
-
action:
|
|
647
|
-
duration:
|
|
654
|
+
action: r,
|
|
655
|
+
duration: o,
|
|
648
656
|
onRemove: a
|
|
649
657
|
}
|
|
650
658
|
);
|
|
@@ -656,7 +664,7 @@ function ml({
|
|
|
656
664
|
"aria-live": e === "error" ? void 0 : "polite",
|
|
657
665
|
className: X(
|
|
658
666
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all duration-150 ease-in-out",
|
|
659
|
-
|
|
667
|
+
r && "pb-3",
|
|
660
668
|
f.className,
|
|
661
669
|
c ? "opacity-0 translate-x-full" : "opacity-100 translate-x-0"
|
|
662
670
|
),
|
|
@@ -665,12 +673,12 @@ function ml({
|
|
|
665
673
|
/* @__PURE__ */ b("div", { className: "flex-grow min-w-0", children: [
|
|
666
674
|
/* @__PURE__ */ t("div", { className: "font-medium text-sm leading-5", children: u }),
|
|
667
675
|
i && /* @__PURE__ */ t("div", { className: "mt-1 text-sm opacity-90 leading-5", children: i }),
|
|
668
|
-
|
|
676
|
+
r && /* @__PURE__ */ t("div", { className: "mt-1.5", children: /* @__PURE__ */ t(
|
|
669
677
|
"button",
|
|
670
678
|
{
|
|
671
|
-
onClick:
|
|
679
|
+
onClick: r.onClick,
|
|
672
680
|
className: "text-sm font-medium underline hover:no-underline focus:outline-none focus:ring-1 focus:ring-current rounded px-1 py-0.5 hover:cursor-pointer",
|
|
673
|
-
children:
|
|
681
|
+
children: r.label
|
|
674
682
|
}
|
|
675
683
|
) })
|
|
676
684
|
] }),
|
|
@@ -695,4 +703,4 @@ export {
|
|
|
695
703
|
y as n,
|
|
696
704
|
cl as u
|
|
697
705
|
};
|
|
698
|
-
//# sourceMappingURL=Toast-
|
|
706
|
+
//# sourceMappingURL=Toast-BlFyNHqO.js.map
|