@moondreamsdev/dreamer-ui 1.7.19-test.44 → 1.7.19-test.45
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-VreG6HWr.js → Toast-ByeEWFPr.js} +38 -33
- package/dist/Toast-ByeEWFPr.js.map +1 -0
- package/dist/{Toast-B3rvYjWD.cjs → Toast-CUGkCWOU.cjs} +2 -2
- package/dist/Toast-CUGkCWOU.cjs.map +1 -0
- package/dist/components.cjs.js +2 -2
- package/dist/components.cjs.js.map +1 -1
- package/dist/components.esm.js +108 -107
- package/dist/components.esm.js.map +1 -1
- package/dist/providers.cjs.js +1 -1
- package/dist/providers.esm.js +1 -1
- package/dist/src/components/accordion/AccordionItem.d.ts +1 -0
- package/dist/src/components/calendar/hooks.d.ts +2 -2
- package/dist/src/components/calendar/variants.d.ts +2 -2
- package/dist/src/components/card/Card.d.ts +1 -0
- package/dist/src/components/carousel/hooks.d.ts +1 -0
- package/dist/src/components/clickable/Clickable.d.ts +1 -0
- package/dist/src/components/code-block/CodeBlock.d.ts +1 -0
- package/dist/src/components/code-block/hooks.d.ts +1 -0
- package/dist/src/components/dropdown-menu/DropdownContext.d.ts +1 -0
- package/dist/src/components/dropdown-menu/DropdownMenuOption.d.ts +1 -0
- package/dist/src/components/dropdown-menu/factories.d.ts +1 -1
- package/dist/src/components/dropdown-menu/types.d.ts +1 -0
- package/dist/src/components/form/factories.d.ts +6 -6
- package/dist/src/components/popover/hooks.d.ts +1 -0
- package/dist/src/components/radiogroup/RadioGroupItem.d.ts +1 -0
- package/dist/src/components/scroll-area/hooks.d.ts +1 -0
- package/dist/src/components/tabs/TabsContent.d.ts +1 -0
- package/dist/src/components/tabs/TabsContext.d.ts +1 -0
- package/dist/src/components/tabs/TabsList.d.ts +1 -0
- package/dist/src/components/tabs/TabsTrigger.d.ts +1 -0
- package/dist/src/hooks/useActionModal.d.ts +1 -0
- package/dist/src/hooks/useTheme.d.ts +1 -0
- package/dist/src/hooks/useToast.d.ts +1 -0
- package/package.json +1 -1
- package/dist/Toast-B3rvYjWD.cjs.map +0 -1
- package/dist/Toast-VreG6HWr.js.map +0 -1
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { jsx as o, Fragment as q, jsxs as b } from "react/jsx-runtime";
|
|
2
|
-
import g, { createContext as l, useId as
|
|
3
|
-
import { createPortal as
|
|
4
|
-
import { X as
|
|
5
|
-
import { j as
|
|
2
|
+
import g, { createContext as l, useId as X, useState as x, useEffect as p, useRef as F, useCallback as j, useMemo as z, useContext as A } from "react";
|
|
3
|
+
import { createPortal as H } from "react-dom";
|
|
4
|
+
import { X as V, C as K, E as P, I as Z } from "./X-CIoyLewf.js";
|
|
5
|
+
import { j as _ } from "./join-BmgR_f4v.js";
|
|
6
6
|
function y(...n) {
|
|
7
7
|
return n.filter((i) => typeof i == "string" && i).join(" ").trim() || void 0;
|
|
8
8
|
}
|
|
9
|
-
function
|
|
9
|
+
function G({ size: n = 15, color: i = "currentColor", className: u = "inline", ...e }) {
|
|
10
10
|
return /* @__PURE__ */ o(
|
|
11
11
|
"svg",
|
|
12
12
|
{
|
|
@@ -566,7 +566,12 @@ l(null);
|
|
|
566
566
|
l(void 0);
|
|
567
567
|
l(void 0);
|
|
568
568
|
l(void 0);
|
|
569
|
-
|
|
569
|
+
l(null);
|
|
570
|
+
l(null);
|
|
571
|
+
l(void 0);
|
|
572
|
+
l(void 0);
|
|
573
|
+
l(void 0);
|
|
574
|
+
function J() {
|
|
570
575
|
const [n, i] = x(0);
|
|
571
576
|
return p(() => {
|
|
572
577
|
const u = setInterval(() => {
|
|
@@ -584,7 +589,7 @@ function Y() {
|
|
|
584
589
|
u
|
|
585
590
|
)) });
|
|
586
591
|
}
|
|
587
|
-
const
|
|
592
|
+
const Q = {
|
|
588
593
|
base: "focus:outline-current",
|
|
589
594
|
primary: "bg-primary text-primary-foreground hover:bg-primary/80 focus:outline-primary outline-offset-2 disabled:bg-muted disabled:text-muted-foreground",
|
|
590
595
|
secondary: "bg-secondary text-secondary-foreground hover:bg-secondary/80 focus:outline-secondary outline-offset-2 disabled:bg-muted/80 disabled:text-muted-foreground/80",
|
|
@@ -592,7 +597,7 @@ const _ = {
|
|
|
592
597
|
outline: "border border-primary text-primary hover:border-primary/80 hover:text-primary/80 focus:outline-primary outline-offset-2 disabled:border-muted-foreground disabled:text-muted-foreground",
|
|
593
598
|
link: "underline-offset-4 hover:underline disabled:underline disabled:text-muted-foreground focus:outline-current",
|
|
594
599
|
destructive: "bg-destructive text-destructive-foreground hover:bg-destructive/80 focus:outline-destructive outline-offset-2 disabled:bg-muted disabled:text-muted-foreground"
|
|
595
|
-
},
|
|
600
|
+
}, U = {
|
|
596
601
|
stripped: "",
|
|
597
602
|
fitted: "size-fit leading-0",
|
|
598
603
|
sm: "px-2 py-1 text-sm",
|
|
@@ -600,7 +605,7 @@ const _ = {
|
|
|
600
605
|
lg: "px-6 py-3 text-lg",
|
|
601
606
|
icon: "p-1 w-fit aspect-square",
|
|
602
607
|
full: "p-2 w-full"
|
|
603
|
-
},
|
|
608
|
+
}, W = {
|
|
604
609
|
none: "rounded-none",
|
|
605
610
|
sm: "rounded-sm",
|
|
606
611
|
md: "rounded-md",
|
|
@@ -611,7 +616,7 @@ const _ = {
|
|
|
611
616
|
size: "md",
|
|
612
617
|
rounded: "md"
|
|
613
618
|
};
|
|
614
|
-
function
|
|
619
|
+
function Y({
|
|
615
620
|
variant: n = k.variant,
|
|
616
621
|
size: i,
|
|
617
622
|
rounded: u = k.rounded,
|
|
@@ -623,9 +628,9 @@ function W({
|
|
|
623
628
|
n === "link" && !i ? a = "fitted" : a = i || k.size;
|
|
624
629
|
const s = y(
|
|
625
630
|
"appearance-none not-disabled:hover:cursor-pointer outline outline-transparent disabled:opacity-50 disabled:cursor-not-allowed transition-all",
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
631
|
+
Q[n],
|
|
632
|
+
U[a],
|
|
633
|
+
W[u],
|
|
629
634
|
e && "relative pointer-events-none",
|
|
630
635
|
t
|
|
631
636
|
);
|
|
@@ -663,7 +668,7 @@ function W({
|
|
|
663
668
|
type: r.type ?? "button",
|
|
664
669
|
className: s,
|
|
665
670
|
children: [
|
|
666
|
-
e && /* @__PURE__ */ o(
|
|
671
|
+
e && /* @__PURE__ */ o(J, {}),
|
|
667
672
|
v()
|
|
668
673
|
]
|
|
669
674
|
}
|
|
@@ -686,7 +691,7 @@ function ll(n, i) {
|
|
|
686
691
|
}, [n, i]);
|
|
687
692
|
}
|
|
688
693
|
function nl(n, i) {
|
|
689
|
-
const u = F(null), e =
|
|
694
|
+
const u = F(null), e = j(() => {
|
|
690
695
|
const t = document.getElementById(n);
|
|
691
696
|
if (!t) return;
|
|
692
697
|
const d = t.querySelectorAll('[data-modal-action="true"]');
|
|
@@ -728,13 +733,13 @@ function el({
|
|
|
728
733
|
ariaLabelledBy: m,
|
|
729
734
|
ariaDescribedBy: w
|
|
730
735
|
}) {
|
|
731
|
-
const C =
|
|
736
|
+
const C = X(), E = n || `modal-${C}`, L = n ? `${n}-title` : `modal-title-${C}`, { show: M, shouldRender: N } = R(i);
|
|
732
737
|
if (nl(E, N), ll(N, u), !N) return null;
|
|
733
|
-
const
|
|
734
|
-
const { label: S, ...$ } =
|
|
735
|
-
return /* @__PURE__ */ o(
|
|
738
|
+
const B = () => e ? g.isValidElement(e) ? /* @__PURE__ */ o("div", { className: "mb-4", children: e }) : /* @__PURE__ */ o("h2", { className: "mb-4 text-xl font-semibold", id: L, children: e }) : null, I = () => c.length === 0 ? null : /* @__PURE__ */ o("div", { className: "mt-6 not-sm:grid gap-y-2 sm:flex sm:justify-start sm:flex-row-reverse sm:gap-x-3", children: c.map((O, D) => {
|
|
739
|
+
const { label: S, ...$ } = O;
|
|
740
|
+
return /* @__PURE__ */ o(Y, { ...$, "data-modal-action": "true", children: S }, D);
|
|
736
741
|
}) });
|
|
737
|
-
return /* @__PURE__ */ o(q, { children:
|
|
742
|
+
return /* @__PURE__ */ o(q, { children: H(
|
|
738
743
|
/* @__PURE__ */ o(
|
|
739
744
|
"div",
|
|
740
745
|
{
|
|
@@ -761,7 +766,7 @@ function el({
|
|
|
761
766
|
tabIndex: -1,
|
|
762
767
|
className: h(
|
|
763
768
|
"relative w-full max-w-xl transform rounded-lg shadow-xl bg-popover text-popover-foreground transition-all p-6 focus:ring ease-in",
|
|
764
|
-
|
|
769
|
+
M ? "opacity-100 scale-100" : "opacity-0 scale-90",
|
|
765
770
|
a
|
|
766
771
|
),
|
|
767
772
|
children: [
|
|
@@ -772,12 +777,12 @@ function el({
|
|
|
772
777
|
onClick: u,
|
|
773
778
|
"data-modal-close-button": "true",
|
|
774
779
|
className: "rounded-md p-0.5 top-2.5 right-2.5 absolute opacity-80 hover:opacity-100 transition-opacity focus:outline-none focus:ring-2 focus:ring-gray-500 leading-0",
|
|
775
|
-
children: /* @__PURE__ */ o(
|
|
780
|
+
children: /* @__PURE__ */ o(G, { size: 18 })
|
|
776
781
|
}
|
|
777
782
|
),
|
|
778
|
-
|
|
783
|
+
B(),
|
|
779
784
|
t,
|
|
780
|
-
|
|
785
|
+
I()
|
|
781
786
|
]
|
|
782
787
|
}
|
|
783
788
|
)
|
|
@@ -839,27 +844,27 @@ function sl({
|
|
|
839
844
|
);
|
|
840
845
|
}
|
|
841
846
|
const ol = l(null), vl = () => {
|
|
842
|
-
const n =
|
|
847
|
+
const n = A(ol);
|
|
843
848
|
if (!n)
|
|
844
849
|
throw new Error("DropdownMenu components must be used within a DropdownMenu component");
|
|
845
850
|
return n;
|
|
846
851
|
}, il = l(null), cl = () => {
|
|
847
|
-
const n =
|
|
852
|
+
const n = A(il);
|
|
848
853
|
if (!n)
|
|
849
854
|
throw new Error("Tabs components must be used within a Tabs component");
|
|
850
855
|
return n;
|
|
851
856
|
}, T = {
|
|
852
857
|
info: {
|
|
853
858
|
className: "bg-blue-50 border-blue-200 text-blue-900 dark:bg-blue-800 dark:border-blue-950 dark:text-blue-100",
|
|
854
|
-
icon: /* @__PURE__ */ o(
|
|
859
|
+
icon: /* @__PURE__ */ o(Z, { size: 20 })
|
|
855
860
|
},
|
|
856
861
|
warning: {
|
|
857
862
|
className: "bg-yellow-50 border-yellow-200 text-yellow-900 dark:bg-yellow-800 dark:border-yellow-950 dark:text-yellow-100",
|
|
858
|
-
icon: /* @__PURE__ */ o(
|
|
863
|
+
icon: /* @__PURE__ */ o(P, { size: 20 })
|
|
859
864
|
},
|
|
860
865
|
error: {
|
|
861
866
|
className: "bg-red-50 border-red-200 text-red-900 dark:bg-red-800 dark:border-red-950 dark:text-red-100",
|
|
862
|
-
icon: /* @__PURE__ */ o(
|
|
867
|
+
icon: /* @__PURE__ */ o(K, { size: 20 })
|
|
863
868
|
}
|
|
864
869
|
};
|
|
865
870
|
function fl({
|
|
@@ -873,7 +878,7 @@ function fl({
|
|
|
873
878
|
customTypes: s,
|
|
874
879
|
customComponent: r
|
|
875
880
|
}) {
|
|
876
|
-
const [v, c] = x(!1), f =
|
|
881
|
+
const [v, c] = x(!1), f = j(() => {
|
|
877
882
|
c(!0), setTimeout(() => {
|
|
878
883
|
a == null || a(n);
|
|
879
884
|
}, 150);
|
|
@@ -904,7 +909,7 @@ function fl({
|
|
|
904
909
|
{
|
|
905
910
|
role: e === "error" ? "alert" : "status",
|
|
906
911
|
"aria-live": e === "error" ? void 0 : "polite",
|
|
907
|
-
className:
|
|
912
|
+
className: _(
|
|
908
913
|
"relative flex items-start p-4 rounded-lg border shadow-lg transition-all ease-in-out",
|
|
909
914
|
t && "pb-3",
|
|
910
915
|
m.className,
|
|
@@ -929,7 +934,7 @@ function fl({
|
|
|
929
934
|
{
|
|
930
935
|
onClick: f,
|
|
931
936
|
className: "flex-shrink-0 ml-3 p-1 rounded-md hover:bg-black/10 dark:hover:bg-white/10 focus:outline-none focus:ring-1 focus:ring-current leading-0",
|
|
932
|
-
children: /* @__PURE__ */ o(
|
|
937
|
+
children: /* @__PURE__ */ o(V, { size: 16 })
|
|
933
938
|
}
|
|
934
939
|
)
|
|
935
940
|
]
|
|
@@ -945,4 +950,4 @@ export {
|
|
|
945
950
|
y as n,
|
|
946
951
|
vl as u
|
|
947
952
|
};
|
|
948
|
-
//# sourceMappingURL=Toast-
|
|
953
|
+
//# sourceMappingURL=Toast-ByeEWFPr.js.map
|