@moontra/moonui 2.2.5 → 2.2.6
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.js +19 -17
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +19 -17
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/date-picker.tsx +3 -3
- package/src/components/ui/simple-editor.tsx +16 -14
package/dist/index.mjs
CHANGED
|
@@ -8492,7 +8492,7 @@ function DatePicker({
|
|
|
8492
8492
|
/* @__PURE__ */ jsx(
|
|
8493
8493
|
PopoverContent,
|
|
8494
8494
|
{
|
|
8495
|
-
className: "w-[360px] p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm z-[
|
|
8495
|
+
className: "w-[360px] p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]",
|
|
8496
8496
|
align: "start",
|
|
8497
8497
|
sideOffset: 12,
|
|
8498
8498
|
children: /* @__PURE__ */ jsxs(
|
|
@@ -8583,7 +8583,7 @@ function DateRangePicker({
|
|
|
8583
8583
|
]
|
|
8584
8584
|
}
|
|
8585
8585
|
) }),
|
|
8586
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm z-[
|
|
8586
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm !z-[9999]", align: "start", sideOffset: 12, children: /* @__PURE__ */ jsx(
|
|
8587
8587
|
Calendar,
|
|
8588
8588
|
{
|
|
8589
8589
|
mode: "range",
|
|
@@ -8741,7 +8741,7 @@ function MonthPicker({
|
|
|
8741
8741
|
]
|
|
8742
8742
|
}
|
|
8743
8743
|
) }),
|
|
8744
|
-
/* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background z-[
|
|
8744
|
+
/* @__PURE__ */ jsx(PopoverContent, { className: "w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background !z-[9999]", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "p-3", children: [
|
|
8745
8745
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
8746
8746
|
/* @__PURE__ */ jsx(
|
|
8747
8747
|
Button,
|
|
@@ -11631,7 +11631,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11631
11631
|
}
|
|
11632
11632
|
}, [executeCommand, updateContent]);
|
|
11633
11633
|
t__default.useEffect(() => {
|
|
11634
|
-
if (editorRef.current && content !== editorRef.current.innerHTML) {
|
|
11634
|
+
if (editorRef.current && content && content !== editorRef.current.innerHTML) {
|
|
11635
11635
|
editorRef.current.innerHTML = content;
|
|
11636
11636
|
}
|
|
11637
11637
|
}, [content]);
|
|
@@ -11644,7 +11644,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11644
11644
|
const toolbar = showToolbar && /* @__PURE__ */ jsx(TooltipProvider, { children: /* @__PURE__ */ jsxs(
|
|
11645
11645
|
motion.div,
|
|
11646
11646
|
{
|
|
11647
|
-
className: "flex items-center gap-1 p-2 border-b bg-
|
|
11647
|
+
className: "flex items-center gap-1 p-2 border-b bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm",
|
|
11648
11648
|
initial: { opacity: 0, y: -10 },
|
|
11649
11649
|
animate: { opacity: 1, y: 0 },
|
|
11650
11650
|
children: [
|
|
@@ -11691,7 +11691,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11691
11691
|
}
|
|
11692
11692
|
)
|
|
11693
11693
|
] }),
|
|
11694
|
-
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6" }),
|
|
11694
|
+
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6 bg-gray-300 dark:bg-zinc-600" }),
|
|
11695
11695
|
/* @__PURE__ */ jsxs(
|
|
11696
11696
|
Select,
|
|
11697
11697
|
{
|
|
@@ -11723,7 +11723,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11723
11723
|
]
|
|
11724
11724
|
}
|
|
11725
11725
|
),
|
|
11726
|
-
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6" }),
|
|
11726
|
+
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6 bg-gray-300 dark:bg-zinc-600" }),
|
|
11727
11727
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
11728
11728
|
/* @__PURE__ */ jsx(
|
|
11729
11729
|
ToolbarButton,
|
|
@@ -11766,7 +11766,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11766
11766
|
}
|
|
11767
11767
|
)
|
|
11768
11768
|
] }),
|
|
11769
|
-
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6" }),
|
|
11769
|
+
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6 bg-gray-300 dark:bg-zinc-600" }),
|
|
11770
11770
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
11771
11771
|
/* @__PURE__ */ jsx(
|
|
11772
11772
|
ToolbarButton,
|
|
@@ -11809,7 +11809,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11809
11809
|
}
|
|
11810
11810
|
)
|
|
11811
11811
|
] }),
|
|
11812
|
-
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6" }),
|
|
11812
|
+
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6 bg-gray-300 dark:bg-zinc-600" }),
|
|
11813
11813
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
11814
11814
|
/* @__PURE__ */ jsx(
|
|
11815
11815
|
ToolbarButton,
|
|
@@ -11830,7 +11830,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11830
11830
|
}
|
|
11831
11831
|
)
|
|
11832
11832
|
] }),
|
|
11833
|
-
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6" }),
|
|
11833
|
+
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6 bg-gray-300 dark:bg-zinc-600" }),
|
|
11834
11834
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
11835
11835
|
/* @__PURE__ */ jsx(
|
|
11836
11836
|
ToolbarButton,
|
|
@@ -11851,7 +11851,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11851
11851
|
}
|
|
11852
11852
|
)
|
|
11853
11853
|
] }),
|
|
11854
|
-
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6" }),
|
|
11854
|
+
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6 bg-gray-300 dark:bg-zinc-600" }),
|
|
11855
11855
|
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
11856
11856
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
11857
11857
|
Button,
|
|
@@ -11866,7 +11866,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11866
11866
|
) }),
|
|
11867
11867
|
/* @__PURE__ */ jsx(PopoverContent, { className: "w-auto p-0", children: /* @__PURE__ */ jsx(ColorPicker2, { onColorSelect: setTextColor }) })
|
|
11868
11868
|
] }),
|
|
11869
|
-
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6" }),
|
|
11869
|
+
/* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6 bg-gray-300 dark:bg-zinc-600" }),
|
|
11870
11870
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
11871
11871
|
/* @__PURE__ */ jsx(
|
|
11872
11872
|
ToolbarButton,
|
|
@@ -11889,7 +11889,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11889
11889
|
] })
|
|
11890
11890
|
] }),
|
|
11891
11891
|
showPreview && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11892
|
-
!isPreview && /* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6" }),
|
|
11892
|
+
!isPreview && /* @__PURE__ */ jsx(Separator3, { orientation: "vertical", className: "h-6 bg-gray-300 dark:bg-zinc-600" }),
|
|
11893
11893
|
/* @__PURE__ */ jsx(
|
|
11894
11894
|
ToolbarButton,
|
|
11895
11895
|
{
|
|
@@ -11916,7 +11916,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11916
11916
|
{
|
|
11917
11917
|
ref,
|
|
11918
11918
|
className: cn(
|
|
11919
|
-
"border rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring",
|
|
11919
|
+
"border border-gray-200 dark:border-zinc-700 rounded-lg overflow-hidden focus-within:ring-2 focus-within:ring-ring focus-within:border-transparent",
|
|
11920
11920
|
disabled && "opacity-50 cursor-not-allowed",
|
|
11921
11921
|
className
|
|
11922
11922
|
),
|
|
@@ -11929,7 +11929,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11929
11929
|
{
|
|
11930
11930
|
initial: { opacity: 0 },
|
|
11931
11931
|
animate: { opacity: 1 },
|
|
11932
|
-
className: "
|
|
11932
|
+
className: "bg-slate-50 dark:bg-zinc-900/95",
|
|
11933
11933
|
style: { minHeight, maxHeight, overflow: "auto" },
|
|
11934
11934
|
children: /* @__PURE__ */ jsx(
|
|
11935
11935
|
"textarea",
|
|
@@ -11937,7 +11937,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11937
11937
|
ref: sourceRef,
|
|
11938
11938
|
value: sourceContent,
|
|
11939
11939
|
onChange: (e) => setSourceContent(e.target.value),
|
|
11940
|
-
className: "w-full h-full bg-
|
|
11940
|
+
className: "w-full h-full bg-transparent p-4 font-mono text-sm text-gray-900 dark:text-gray-100 resize-none focus:outline-none",
|
|
11941
11941
|
style: { minHeight: minHeight - 32 },
|
|
11942
11942
|
disabled,
|
|
11943
11943
|
placeholder: "HTML source code..."
|
|
@@ -11952,6 +11952,8 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11952
11952
|
suppressContentEditableWarning: true,
|
|
11953
11953
|
className: cn(
|
|
11954
11954
|
"p-4 outline-none prose prose-sm dark:prose-invert max-w-none overflow-y-auto",
|
|
11955
|
+
"bg-slate-50 dark:bg-zinc-900/95",
|
|
11956
|
+
"text-gray-900 dark:text-gray-100",
|
|
11955
11957
|
"focus:ring-0",
|
|
11956
11958
|
"[&_h1]:text-3xl [&_h1]:font-bold [&_h1]:mb-4",
|
|
11957
11959
|
"[&_h2]:text-2xl [&_h2]:font-bold [&_h2]:mb-3",
|
|
@@ -11982,7 +11984,7 @@ var SimpleEditor = t__default.forwardRef(
|
|
|
11982
11984
|
}
|
|
11983
11985
|
)
|
|
11984
11986
|
] }),
|
|
11985
|
-
/* @__PURE__ */ jsx("div", { className: "px-4 py-2 border-t bg-
|
|
11987
|
+
/* @__PURE__ */ jsx("div", { className: "px-4 py-2 border-t bg-gray-50/50 dark:bg-zinc-800/50 backdrop-blur-sm text-xs text-gray-600 dark:text-gray-400", children: /* @__PURE__ */ jsx(CharacterCount, { content }) })
|
|
11986
11988
|
]
|
|
11987
11989
|
}
|
|
11988
11990
|
);
|