@moontra/moonui-pro 2.1.3 → 2.2.0
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.d.ts +61 -1
- package/dist/index.mjs +570 -103
- package/package.json +1 -1
- package/src/components/file-upload/index.tsx +9 -6
- package/src/components/index.ts +7 -1
- package/src/components/ui/button.tsx +15 -11
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React16 from 'react';
|
|
2
2
|
import React16__default, { useState, useRef, useCallback, forwardRef, createContext, useContext, useMemo, useEffect, useDebugValue, Component, useLayoutEffect } from 'react';
|
|
3
3
|
import { motion, AnimatePresence, useMotionValue, useSpring, useTransform, animate } from 'framer-motion';
|
|
4
|
-
import { Loader2, Lock, Sparkles, Plus, ChevronDown, ChevronUp, Check, X, ChevronRight, Circle, Minus, Calendar, ChevronLeft, Edit, Trash2, Clock, MapPin, User, MoreHorizontal, GripVertical, MessageCircle, Paperclip, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, Code as Code$1, Type, Heading1, Heading2, Heading3, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, CheckSquare, Quote, Palette, Highlighter, Link2, Image as Image$1, Table as Table$1, Settings, Undo, Redo, Eye, RefreshCw, Wand2, Maximize, FileText, Languages, TrendingUp, TrendingDown, Download, Maximize2, Activity, Star, ExternalLink, BarChart3, Users, DollarSign, Copy, RotateCcw, Github, GitFork, Server, EyeOff, ZoomOut, ZoomIn, RotateCw, Zap, Monitor, Timer, AlertTriangle, Cpu, MemoryStick, HardDrive, Network, CheckCircle,
|
|
4
|
+
import { Loader2, Lock, Sparkles, Plus, ChevronDown, ChevronUp, Check, X, ChevronRight, Circle, Minus, Calendar, ChevronLeft, Edit, Trash2, Clock, MapPin, User, MoreHorizontal, GripVertical, MessageCircle, Paperclip, Bold as Bold$1, Italic as Italic$1, Underline as Underline$1, Strikethrough, Code as Code$1, Type, Heading1, Heading2, Heading3, AlignLeft, AlignCenter, AlignRight, AlignJustify, List, ListOrdered, CheckSquare, Quote, Palette, Highlighter, Link2, Image as Image$1, Table as Table$1, Settings, Undo, Redo, Eye, RefreshCw, Wand2, Maximize, FileText, Languages, TrendingUp, TrendingDown, Download, Maximize2, Activity, Star, Upload, CheckCircle2, AlertCircle, Search, Filter, ArrowUp, ArrowDown, ArrowUpDown, ChevronsLeft, ChevronsRight, ExternalLink, BarChart3, Users, DollarSign, Copy, RotateCcw, Github, GitFork, Server, EyeOff, ZoomOut, ZoomIn, RotateCw, Zap, Monitor, Timer, AlertTriangle, Cpu, MemoryStick, HardDrive, Network, CheckCircle, Video, Music, Archive, File, XCircle, ArrowDownRight, ArrowUpRight } from 'lucide-react';
|
|
5
5
|
import { clsx } from 'clsx';
|
|
6
6
|
import { twMerge } from 'tailwind-merge';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
@@ -25,6 +25,7 @@ import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
|
25
25
|
import * as SwitchPrimitives from '@radix-ui/react-switch';
|
|
26
26
|
import { createSlot } from '@radix-ui/react-slot';
|
|
27
27
|
import * as TabsPrimitive from '@radix-ui/react-tabs';
|
|
28
|
+
import { useReactTable, getCoreRowModel, getPaginationRowModel, getSortedRowModel, getFilteredRowModel, flexRender } from '@tanstack/react-table';
|
|
28
29
|
|
|
29
30
|
/**
|
|
30
31
|
* @moontra/moonui-pro v2.0.9
|
|
@@ -1981,7 +1982,7 @@ var CardFooter = React16.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
1981
1982
|
}
|
|
1982
1983
|
));
|
|
1983
1984
|
CardFooter.displayName = "CardFooter";
|
|
1984
|
-
var
|
|
1985
|
+
var moonUIButtonProVariants = cva(
|
|
1985
1986
|
[
|
|
1986
1987
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap",
|
|
1987
1988
|
"font-medium relative",
|
|
@@ -2130,7 +2131,7 @@ var buttonVariants = cva(
|
|
|
2130
2131
|
}
|
|
2131
2132
|
}
|
|
2132
2133
|
);
|
|
2133
|
-
var
|
|
2134
|
+
var MoonUIButtonPro = React16.forwardRef(
|
|
2134
2135
|
({
|
|
2135
2136
|
className,
|
|
2136
2137
|
variant,
|
|
@@ -2149,7 +2150,7 @@ var Button = React16.forwardRef(
|
|
|
2149
2150
|
return /* @__PURE__ */ jsxs(
|
|
2150
2151
|
Comp,
|
|
2151
2152
|
{
|
|
2152
|
-
className: cn(
|
|
2153
|
+
className: cn(moonUIButtonProVariants({ variant, size, rounded, fullWidth, className })),
|
|
2153
2154
|
ref,
|
|
2154
2155
|
disabled: disabled || loading,
|
|
2155
2156
|
"data-loading": loading ? "" : void 0,
|
|
@@ -2164,7 +2165,7 @@ var Button = React16.forwardRef(
|
|
|
2164
2165
|
);
|
|
2165
2166
|
}
|
|
2166
2167
|
);
|
|
2167
|
-
|
|
2168
|
+
MoonUIButtonPro.displayName = "MoonUIButtonPro";
|
|
2168
2169
|
|
|
2169
2170
|
// src/hooks/use-subscription.ts
|
|
2170
2171
|
function useSubscription() {
|
|
@@ -2330,7 +2331,7 @@ var AnimatedButton = React16__default.forwardRef(
|
|
|
2330
2331
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2331
2332
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
2332
2333
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Animated Button is available exclusively to MoonUI Pro subscribers." }),
|
|
2333
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
2334
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
2334
2335
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
2335
2336
|
"Upgrade to Pro"
|
|
2336
2337
|
] }) })
|
|
@@ -2365,7 +2366,7 @@ var ErrorBoundaryInternal = class extends Component {
|
|
|
2365
2366
|
/* @__PURE__ */ jsx(CardDescription, { children: "An error occurred while rendering this component" })
|
|
2366
2367
|
] }),
|
|
2367
2368
|
/* @__PURE__ */ jsx(CardContent, { className: "text-center", children: /* @__PURE__ */ jsxs(
|
|
2368
|
-
|
|
2369
|
+
MoonUIButtonPro,
|
|
2369
2370
|
{
|
|
2370
2371
|
onClick: () => this.setState({ hasError: false, error: void 0 }),
|
|
2371
2372
|
className: "mt-4",
|
|
@@ -2388,7 +2389,7 @@ function ErrorBoundaryWrapper(props) {
|
|
|
2388
2389
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2389
2390
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
2390
2391
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Error Boundary is available exclusively to MoonUI Pro subscribers." }),
|
|
2391
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
2392
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
2392
2393
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
2393
2394
|
"Upgrade to Pro"
|
|
2394
2395
|
] }) })
|
|
@@ -2538,7 +2539,7 @@ var FloatingActionButton = React16__default.forwardRef(
|
|
|
2538
2539
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2539
2540
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
2540
2541
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Floating Action Button is available exclusively to MoonUI Pro subscribers." }),
|
|
2541
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
2542
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
2542
2543
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
2543
2544
|
"Upgrade to Pro"
|
|
2544
2545
|
] }) })
|
|
@@ -2662,7 +2663,7 @@ var HoverCard3D = React16__default.forwardRef(
|
|
|
2662
2663
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2663
2664
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
2664
2665
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "3D Hover Card is available exclusively to MoonUI Pro subscribers." }),
|
|
2665
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
2666
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
2666
2667
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
2667
2668
|
"Upgrade to Pro"
|
|
2668
2669
|
] }) })
|
|
@@ -2784,7 +2785,7 @@ var MagneticButton = React16__default.forwardRef(
|
|
|
2784
2785
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2785
2786
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
2786
2787
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Magnetic Button is available exclusively to MoonUI Pro subscribers." }),
|
|
2787
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
2788
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
2788
2789
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
2789
2790
|
"Upgrade to Pro"
|
|
2790
2791
|
] }) })
|
|
@@ -2905,7 +2906,7 @@ var PinchZoom = React16__default.forwardRef(
|
|
|
2905
2906
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
2906
2907
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
2907
2908
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Pinch Zoom is available exclusively to MoonUI Pro subscribers." }),
|
|
2908
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
2909
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
2909
2910
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
2910
2911
|
"Upgrade to Pro"
|
|
2911
2912
|
] }) })
|
|
@@ -3054,7 +3055,7 @@ var SpotlightCard = React16__default.forwardRef(
|
|
|
3054
3055
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
3055
3056
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
3056
3057
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Spotlight Card is available exclusively to MoonUI Pro subscribers." }),
|
|
3057
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
3058
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
3058
3059
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
3059
3060
|
"Upgrade to Pro"
|
|
3060
3061
|
] }) })
|
|
@@ -4074,7 +4075,7 @@ function EventDialog({
|
|
|
4074
4075
|
] }),
|
|
4075
4076
|
/* @__PURE__ */ jsxs(DialogFooter, { className: "gap-2", children: [
|
|
4076
4077
|
mode === "edit" && onDelete && /* @__PURE__ */ jsx(
|
|
4077
|
-
|
|
4078
|
+
MoonUIButtonPro,
|
|
4078
4079
|
{
|
|
4079
4080
|
type: "button",
|
|
4080
4081
|
variant: "destructive",
|
|
@@ -4084,7 +4085,7 @@ function EventDialog({
|
|
|
4084
4085
|
}
|
|
4085
4086
|
),
|
|
4086
4087
|
/* @__PURE__ */ jsx(
|
|
4087
|
-
|
|
4088
|
+
MoonUIButtonPro,
|
|
4088
4089
|
{
|
|
4089
4090
|
type: "button",
|
|
4090
4091
|
variant: "outline",
|
|
@@ -4093,7 +4094,7 @@ function EventDialog({
|
|
|
4093
4094
|
children: "Cancel"
|
|
4094
4095
|
}
|
|
4095
4096
|
),
|
|
4096
|
-
/* @__PURE__ */ jsx(
|
|
4097
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { type: "submit", disabled: isSubmitting, children: isSubmitting ? mode === "create" ? "Creating..." : "Saving..." : mode === "create" ? "Create Event" : "Save Changes" })
|
|
4097
4098
|
] })
|
|
4098
4099
|
] })
|
|
4099
4100
|
] }) });
|
|
@@ -4141,7 +4142,7 @@ function Calendar2({
|
|
|
4141
4142
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
4142
4143
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
|
|
4143
4144
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Calendar is available exclusively to MoonUI Pro subscribers." }),
|
|
4144
|
-
/* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
4145
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
4145
4146
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
4146
4147
|
"Upgrade to Pro"
|
|
4147
4148
|
] }) }) })
|
|
@@ -4299,9 +4300,9 @@ function Calendar2({
|
|
|
4299
4300
|
] })
|
|
4300
4301
|
] }),
|
|
4301
4302
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2", children: [
|
|
4302
|
-
/* @__PURE__ */ jsx(
|
|
4303
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "outline", size: "sm", onClick: goToToday, children: "Today" }),
|
|
4303
4304
|
/* @__PURE__ */ jsx(
|
|
4304
|
-
|
|
4305
|
+
MoonUIButtonPro,
|
|
4305
4306
|
{
|
|
4306
4307
|
variant: "outline",
|
|
4307
4308
|
size: "sm",
|
|
@@ -4311,7 +4312,7 @@ function Calendar2({
|
|
|
4311
4312
|
}
|
|
4312
4313
|
),
|
|
4313
4314
|
/* @__PURE__ */ jsx(
|
|
4314
|
-
|
|
4315
|
+
MoonUIButtonPro,
|
|
4315
4316
|
{
|
|
4316
4317
|
variant: "outline",
|
|
4317
4318
|
size: "sm",
|
|
@@ -4373,7 +4374,7 @@ function Calendar2({
|
|
|
4373
4374
|
/* @__PURE__ */ jsx("span", { className: "truncate flex-1", children: event.title }),
|
|
4374
4375
|
showEventDetails && /* @__PURE__ */ jsxs("div", { className: "hidden group-hover:flex items-center gap-1 ml-1", children: [
|
|
4375
4376
|
/* @__PURE__ */ jsx(
|
|
4376
|
-
|
|
4377
|
+
MoonUIButtonPro,
|
|
4377
4378
|
{
|
|
4378
4379
|
variant: "ghost",
|
|
4379
4380
|
size: "sm",
|
|
@@ -4383,7 +4384,7 @@ function Calendar2({
|
|
|
4383
4384
|
}
|
|
4384
4385
|
),
|
|
4385
4386
|
/* @__PURE__ */ jsx(
|
|
4386
|
-
|
|
4387
|
+
MoonUIButtonPro,
|
|
4387
4388
|
{
|
|
4388
4389
|
variant: "ghost",
|
|
4389
4390
|
size: "sm",
|
|
@@ -4432,7 +4433,7 @@ function Calendar2({
|
|
|
4432
4433
|
/* @__PURE__ */ jsx("h5", { className: "font-medium", children: event.title }),
|
|
4433
4434
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
4434
4435
|
/* @__PURE__ */ jsx(
|
|
4435
|
-
|
|
4436
|
+
MoonUIButtonPro,
|
|
4436
4437
|
{
|
|
4437
4438
|
variant: "ghost",
|
|
4438
4439
|
size: "sm",
|
|
@@ -4441,7 +4442,7 @@ function Calendar2({
|
|
|
4441
4442
|
}
|
|
4442
4443
|
),
|
|
4443
4444
|
/* @__PURE__ */ jsx(
|
|
4444
|
-
|
|
4445
|
+
MoonUIButtonPro,
|
|
4445
4446
|
{
|
|
4446
4447
|
variant: "ghost",
|
|
4447
4448
|
size: "sm",
|
|
@@ -4478,7 +4479,7 @@ function Calendar2({
|
|
|
4478
4479
|
getEventsForDate(selectedDate).length === 0 && /* @__PURE__ */ jsxs("div", { className: "text-center py-4", children: [
|
|
4479
4480
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-2", children: "No events scheduled for this date" }),
|
|
4480
4481
|
/* @__PURE__ */ jsxs(
|
|
4481
|
-
|
|
4482
|
+
MoonUIButtonPro,
|
|
4482
4483
|
{
|
|
4483
4484
|
variant: "outline",
|
|
4484
4485
|
size: "sm",
|
|
@@ -4642,7 +4643,7 @@ function Kanban({
|
|
|
4642
4643
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
4643
4644
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
|
|
4644
4645
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Kanban Board is available exclusively to MoonUI Pro subscribers." }),
|
|
4645
|
-
/* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
4646
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
4646
4647
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
4647
4648
|
"Upgrade to Pro"
|
|
4648
4649
|
] }) }) })
|
|
@@ -4767,7 +4768,7 @@ function Kanban({
|
|
|
4767
4768
|
/* @__PURE__ */ jsx(CardTitle, { className: "text-sm font-medium", children: column.title }),
|
|
4768
4769
|
/* @__PURE__ */ jsx(Badge, { variant: "secondary", className: "text-xs", children: column.cards.length })
|
|
4769
4770
|
] }),
|
|
4770
|
-
/* @__PURE__ */ jsx(
|
|
4771
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsx(MoreHorizontal, { className: "h-4 w-4" }) })
|
|
4771
4772
|
] }),
|
|
4772
4773
|
column.limit && /* @__PURE__ */ jsx(CardDescription, { className: cn(
|
|
4773
4774
|
"text-xs",
|
|
@@ -4796,7 +4797,7 @@ function Kanban({
|
|
|
4796
4797
|
] }),
|
|
4797
4798
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 opacity-0 group-hover:opacity-100 transition-opacity", children: [
|
|
4798
4799
|
/* @__PURE__ */ jsx(
|
|
4799
|
-
|
|
4800
|
+
MoonUIButtonPro,
|
|
4800
4801
|
{
|
|
4801
4802
|
variant: "ghost",
|
|
4802
4803
|
size: "sm",
|
|
@@ -4806,7 +4807,7 @@ function Kanban({
|
|
|
4806
4807
|
}
|
|
4807
4808
|
),
|
|
4808
4809
|
/* @__PURE__ */ jsx(
|
|
4809
|
-
|
|
4810
|
+
MoonUIButtonPro,
|
|
4810
4811
|
{
|
|
4811
4812
|
variant: "ghost",
|
|
4812
4813
|
size: "sm",
|
|
@@ -4853,7 +4854,7 @@ function Kanban({
|
|
|
4853
4854
|
card.id
|
|
4854
4855
|
)),
|
|
4855
4856
|
onAddCard && /* @__PURE__ */ jsxs(
|
|
4856
|
-
|
|
4857
|
+
MoonUIButtonPro,
|
|
4857
4858
|
{
|
|
4858
4859
|
variant: "ghost",
|
|
4859
4860
|
size: "sm",
|
|
@@ -4873,7 +4874,7 @@ function Kanban({
|
|
|
4873
4874
|
);
|
|
4874
4875
|
}),
|
|
4875
4876
|
showAddColumn && onAddColumn && /* @__PURE__ */ jsx("div", { className: "flex-shrink-0 w-80", children: /* @__PURE__ */ jsxs(
|
|
4876
|
-
|
|
4877
|
+
MoonUIButtonPro,
|
|
4877
4878
|
{
|
|
4878
4879
|
variant: "outline",
|
|
4879
4880
|
onClick: onAddColumn,
|
|
@@ -44391,7 +44392,7 @@ function RichTextEditor({
|
|
|
44391
44392
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
44392
44393
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
|
|
44393
44394
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Advanced Rich Text Editor is available exclusively to MoonUI Pro subscribers." }),
|
|
44394
|
-
/* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
44395
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
44395
44396
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
44396
44397
|
"Upgrade to Pro"
|
|
44397
44398
|
] }) }) })
|
|
@@ -44817,7 +44818,7 @@ function RichTextEditor({
|
|
|
44817
44818
|
(features.bold || features.italic || features.underline || features.strike || features.code) && (features.heading || features.align) && /* @__PURE__ */ jsx("div", { className: "w-px h-6 bg-border mx-1 shrink-0" }),
|
|
44818
44819
|
(features.heading || features.align) && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
44819
44820
|
features.heading && /* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
44820
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
44821
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "ghost", size: "sm", className: "h-8 px-2", disabled: isSourceView, children: [
|
|
44821
44822
|
/* @__PURE__ */ jsx(Type, { className: "w-4 h-4 mr-1" }),
|
|
44822
44823
|
/* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3" })
|
|
44823
44824
|
] }) }),
|
|
@@ -44929,7 +44930,7 @@ function RichTextEditor({
|
|
|
44929
44930
|
features.color && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 shrink-0", children: [
|
|
44930
44931
|
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
44931
44932
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
44932
|
-
|
|
44933
|
+
MoonUIButtonPro,
|
|
44933
44934
|
{
|
|
44934
44935
|
variant: "ghost",
|
|
44935
44936
|
size: "sm",
|
|
@@ -44952,7 +44953,7 @@ function RichTextEditor({
|
|
|
44952
44953
|
] }),
|
|
44953
44954
|
/* @__PURE__ */ jsxs(Popover, { children: [
|
|
44954
44955
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
44955
|
-
|
|
44956
|
+
MoonUIButtonPro,
|
|
44956
44957
|
{
|
|
44957
44958
|
variant: "ghost",
|
|
44958
44959
|
size: "sm",
|
|
@@ -45022,7 +45023,7 @@ function RichTextEditor({
|
|
|
45022
45023
|
] }) }),
|
|
45023
45024
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-between", children: [
|
|
45024
45025
|
editor.isActive("link") && /* @__PURE__ */ jsx(
|
|
45025
|
-
|
|
45026
|
+
MoonUIButtonPro,
|
|
45026
45027
|
{
|
|
45027
45028
|
variant: "destructive",
|
|
45028
45029
|
onClick: () => {
|
|
@@ -45033,8 +45034,8 @@ function RichTextEditor({
|
|
|
45033
45034
|
}
|
|
45034
45035
|
),
|
|
45035
45036
|
/* @__PURE__ */ jsxs("div", { className: "ml-auto flex gap-2", children: [
|
|
45036
|
-
/* @__PURE__ */ jsx(
|
|
45037
|
-
/* @__PURE__ */ jsx(
|
|
45037
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "outline", onClick: () => setIsLinkDialogOpen(false), children: "Cancel" }),
|
|
45038
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { onClick: addLink, children: "Add Link" })
|
|
45038
45039
|
] })
|
|
45039
45040
|
] })
|
|
45040
45041
|
] })
|
|
@@ -45078,8 +45079,8 @@ function RichTextEditor({
|
|
|
45078
45079
|
)
|
|
45079
45080
|
] }) }),
|
|
45080
45081
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
45081
|
-
/* @__PURE__ */ jsx(
|
|
45082
|
-
/* @__PURE__ */ jsx(
|
|
45082
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "outline", onClick: () => setIsImageDialogOpen(false), children: "Cancel" }),
|
|
45083
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { onClick: addImage, children: "Add Image" })
|
|
45083
45084
|
] })
|
|
45084
45085
|
] })
|
|
45085
45086
|
] }),
|
|
@@ -45144,13 +45145,13 @@ function RichTextEditor({
|
|
|
45144
45145
|
] })
|
|
45145
45146
|
] }),
|
|
45146
45147
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
45147
|
-
/* @__PURE__ */ jsx(
|
|
45148
|
-
/* @__PURE__ */ jsx(
|
|
45148
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "outline", onClick: () => setIsTableDialogOpen(false), children: "Cancel" }),
|
|
45149
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { onClick: createTable2, children: "Create Table" })
|
|
45149
45150
|
] })
|
|
45150
45151
|
] })
|
|
45151
45152
|
] }),
|
|
45152
45153
|
/* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
45153
|
-
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
45154
|
+
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", className: "h-8 px-1", children: /* @__PURE__ */ jsx(ChevronDown, { className: "w-3 h-3" }) }) }),
|
|
45154
45155
|
/* @__PURE__ */ jsxs(DropdownMenuContent, { children: [
|
|
45155
45156
|
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => editor.chain().focus().addColumnBefore().run(), children: "Add column before" }),
|
|
45156
45157
|
/* @__PURE__ */ jsx(DropdownMenuItem, { onClick: () => editor.chain().focus().addColumnAfter().run(), children: "Add column after" }),
|
|
@@ -45209,7 +45210,7 @@ function RichTextEditor({
|
|
|
45209
45210
|
features.ai && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
45210
45211
|
/* @__PURE__ */ jsxs(DropdownMenu, { children: [
|
|
45211
45212
|
/* @__PURE__ */ jsx(DropdownMenuTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
45212
|
-
|
|
45213
|
+
MoonUIButtonPro,
|
|
45213
45214
|
{
|
|
45214
45215
|
variant: "ghost",
|
|
45215
45216
|
size: "sm",
|
|
@@ -45387,7 +45388,7 @@ function RichTextEditor({
|
|
|
45387
45388
|
] })
|
|
45388
45389
|
] })
|
|
45389
45390
|
] }),
|
|
45390
|
-
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(
|
|
45391
|
+
/* @__PURE__ */ jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ jsx(MoonUIButtonPro, { onClick: () => {
|
|
45391
45392
|
setIsAiSettingsOpen(false);
|
|
45392
45393
|
toast({
|
|
45393
45394
|
title: "Settings saved",
|
|
@@ -45521,8 +45522,8 @@ function RichTextEditor({
|
|
|
45521
45522
|
] })
|
|
45522
45523
|
] }),
|
|
45523
45524
|
/* @__PURE__ */ jsxs("div", { className: "flex justify-end gap-2", children: [
|
|
45524
|
-
/* @__PURE__ */ jsx(
|
|
45525
|
-
/* @__PURE__ */ jsx(
|
|
45525
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "outline", onClick: () => setIsTableBorderDialogOpen(false), children: "Cancel" }),
|
|
45526
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { onClick: () => {
|
|
45526
45527
|
applyTableBorders(tableBorderWidth, tableBorderColor, tableBorderStyle);
|
|
45527
45528
|
setIsTableBorderDialogOpen(false);
|
|
45528
45529
|
toast({
|
|
@@ -46533,7 +46534,7 @@ function AdvancedChart({
|
|
|
46533
46534
|
if (error) {
|
|
46534
46535
|
return /* @__PURE__ */ jsx(Card, { className: cn$1("w-full", className), children: /* @__PURE__ */ jsx(CardContent, { className: "flex items-center justify-center", style: { height }, children: /* @__PURE__ */ jsxs("div", { className: "text-center", children: [
|
|
46535
46536
|
/* @__PURE__ */ jsx("p", { className: "text-destructive mb-2", children: error }),
|
|
46536
|
-
onRefresh && /* @__PURE__ */ jsxs(
|
|
46537
|
+
onRefresh && /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", onClick: onRefresh, children: [
|
|
46537
46538
|
/* @__PURE__ */ jsx(RefreshCw, { className: "mr-2 h-4 w-4" }),
|
|
46538
46539
|
"Retry"
|
|
46539
46540
|
] })
|
|
@@ -46562,10 +46563,10 @@ function AdvancedChart({
|
|
|
46562
46563
|
subtitle && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: subtitle })
|
|
46563
46564
|
] }),
|
|
46564
46565
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-1", children: [
|
|
46565
|
-
onRefresh && /* @__PURE__ */ jsx(
|
|
46566
|
-
/* @__PURE__ */ jsx(
|
|
46567
|
-
onExport && /* @__PURE__ */ jsx(
|
|
46568
|
-
/* @__PURE__ */ jsx(
|
|
46566
|
+
onRefresh && /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", onClick: onRefresh, children: /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" }) }),
|
|
46567
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsx(Settings, { className: "h-4 w-4" }) }),
|
|
46568
|
+
onExport && /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", onClick: () => handleExport("png"), children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" }) }),
|
|
46569
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", onClick: () => setIsFullscreen(!isFullscreen), children: /* @__PURE__ */ jsx(Maximize2, { className: "h-4 w-4" }) })
|
|
46569
46570
|
] })
|
|
46570
46571
|
] }),
|
|
46571
46572
|
/* @__PURE__ */ jsx(CardContent, { children: responsive ? /* @__PURE__ */ jsx(ResponsiveContainer, { width: "100%", height, children: renderChart() }) : /* @__PURE__ */ jsx("div", { style: { width: "100%", height: `${height}px` }, children: renderChart() }) })
|
|
@@ -46683,7 +46684,7 @@ function Dashboard({
|
|
|
46683
46684
|
widget.description && /* @__PURE__ */ jsx(CardDescription, { className: "mt-1", children: widget.description })
|
|
46684
46685
|
] }),
|
|
46685
46686
|
/* @__PURE__ */ jsx(
|
|
46686
|
-
|
|
46687
|
+
MoonUIButtonPro,
|
|
46687
46688
|
{
|
|
46688
46689
|
variant: "ghost",
|
|
46689
46690
|
size: "sm",
|
|
@@ -46743,7 +46744,7 @@ function Dashboard({
|
|
|
46743
46744
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: description })
|
|
46744
46745
|
] }),
|
|
46745
46746
|
refreshable && /* @__PURE__ */ jsxs(
|
|
46746
|
-
|
|
46747
|
+
MoonUIButtonPro,
|
|
46747
46748
|
{
|
|
46748
46749
|
variant: "outline",
|
|
46749
46750
|
onClick: handleRefresh,
|
|
@@ -46758,15 +46759,15 @@ function Dashboard({
|
|
|
46758
46759
|
/* @__PURE__ */ jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: displayMetrics.map(renderMetricCard) }),
|
|
46759
46760
|
widgets.length > 0 && /* @__PURE__ */ jsx("div", { className: "grid gap-4 md:grid-cols-2 lg:grid-cols-4", children: widgets.map(renderWidget) }),
|
|
46760
46761
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 pt-4 border-t", children: [
|
|
46761
|
-
/* @__PURE__ */ jsxs(
|
|
46762
|
+
/* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
|
|
46762
46763
|
/* @__PURE__ */ jsx(Download, { className: "h-4 w-4 mr-2" }),
|
|
46763
46764
|
"Export Data"
|
|
46764
46765
|
] }),
|
|
46765
|
-
/* @__PURE__ */ jsxs(
|
|
46766
|
+
/* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
|
|
46766
46767
|
/* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4 mr-2" }),
|
|
46767
46768
|
"Schedule Report"
|
|
46768
46769
|
] }),
|
|
46769
|
-
/* @__PURE__ */ jsxs(
|
|
46770
|
+
/* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
|
|
46770
46771
|
/* @__PURE__ */ jsx(Star, { className: "h-4 w-4 mr-2" }),
|
|
46771
46772
|
"Save View"
|
|
46772
46773
|
] })
|
|
@@ -47173,7 +47174,7 @@ var AdvancedFormsInternal = ({
|
|
|
47173
47174
|
}
|
|
47174
47175
|
),
|
|
47175
47176
|
/* @__PURE__ */ jsx(
|
|
47176
|
-
|
|
47177
|
+
MoonUIButtonPro,
|
|
47177
47178
|
{
|
|
47178
47179
|
type: "button",
|
|
47179
47180
|
variant: "ghost",
|
|
@@ -47263,7 +47264,7 @@ var AdvancedFormsInternal = ({
|
|
|
47263
47264
|
uploadedFiles[field.name] && uploadedFiles[field.name].length > 0 && /* @__PURE__ */ jsx("div", { className: "space-y-2", children: uploadedFiles[field.name].map((file, index2) => /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between p-2 bg-muted rounded-md", children: [
|
|
47264
47265
|
/* @__PURE__ */ jsx("span", { className: "text-sm truncate", children: file.name }),
|
|
47265
47266
|
/* @__PURE__ */ jsx(
|
|
47266
|
-
|
|
47267
|
+
MoonUIButtonPro,
|
|
47267
47268
|
{
|
|
47268
47269
|
type: "button",
|
|
47269
47270
|
variant: "ghost",
|
|
@@ -47330,7 +47331,7 @@ var AdvancedFormsInternal = ({
|
|
|
47330
47331
|
" fields completed"
|
|
47331
47332
|
] }),
|
|
47332
47333
|
/* @__PURE__ */ jsx(
|
|
47333
|
-
|
|
47334
|
+
MoonUIButtonPro,
|
|
47334
47335
|
{
|
|
47335
47336
|
type: "submit",
|
|
47336
47337
|
disabled: isSubmitting || !isValid,
|
|
@@ -47357,7 +47358,7 @@ var AdvancedForms = ({ className, ...props }) => {
|
|
|
47357
47358
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
47358
47359
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
47359
47360
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Advanced Forms is available exclusively to MoonUI Pro subscribers." }),
|
|
47360
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
47361
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
47361
47362
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
47362
47363
|
"Upgrade to Pro"
|
|
47363
47364
|
] }) })
|
|
@@ -47548,7 +47549,7 @@ var ColorPickerInternal = ({
|
|
|
47548
47549
|
};
|
|
47549
47550
|
return /* @__PURE__ */ jsxs(Popover, { children: [
|
|
47550
47551
|
/* @__PURE__ */ jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
47551
|
-
|
|
47552
|
+
MoonUIButtonPro,
|
|
47552
47553
|
{
|
|
47553
47554
|
variant: "outline",
|
|
47554
47555
|
className: cn(
|
|
@@ -47665,7 +47666,7 @@ var ColorPickerInternal = ({
|
|
|
47665
47666
|
showCopy && /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
47666
47667
|
/* @__PURE__ */ jsx(Label, { children: "\xA0" }),
|
|
47667
47668
|
/* @__PURE__ */ jsx(
|
|
47668
|
-
|
|
47669
|
+
MoonUIButtonPro,
|
|
47669
47670
|
{
|
|
47670
47671
|
variant: "outline",
|
|
47671
47672
|
size: "sm",
|
|
@@ -47678,7 +47679,7 @@ var ColorPickerInternal = ({
|
|
|
47678
47679
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2", children: [
|
|
47679
47680
|
/* @__PURE__ */ jsx(Label, { children: "\xA0" }),
|
|
47680
47681
|
/* @__PURE__ */ jsx(
|
|
47681
|
-
|
|
47682
|
+
MoonUIButtonPro,
|
|
47682
47683
|
{
|
|
47683
47684
|
variant: "outline",
|
|
47684
47685
|
size: "sm",
|
|
@@ -47717,7 +47718,7 @@ var ColorPicker2 = ({ className, ...props }) => {
|
|
|
47717
47718
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
47718
47719
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
47719
47720
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Color Picker is available exclusively to MoonUI Pro subscribers." }),
|
|
47720
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
47721
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
47721
47722
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
47722
47723
|
"Upgrade to Pro"
|
|
47723
47724
|
] }) })
|
|
@@ -47867,7 +47868,7 @@ var GitHubStarsInternal = ({
|
|
|
47867
47868
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold", children: "Failed to load repositories" }),
|
|
47868
47869
|
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: error })
|
|
47869
47870
|
] }),
|
|
47870
|
-
/* @__PURE__ */ jsxs(
|
|
47871
|
+
/* @__PURE__ */ jsxs(MoonUIButtonPro, { onClick: fetchRepositories, variant: "outline", children: [
|
|
47871
47872
|
/* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4 mr-2" }),
|
|
47872
47873
|
"Try Again"
|
|
47873
47874
|
] })
|
|
@@ -47894,7 +47895,7 @@ var GitHubStarsInternal = ({
|
|
|
47894
47895
|
" repos"
|
|
47895
47896
|
] }),
|
|
47896
47897
|
autoRefresh && /* @__PURE__ */ jsx(Badge, { variant: "secondary", children: "Auto-refresh" }),
|
|
47897
|
-
/* @__PURE__ */ jsx(
|
|
47898
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { onClick: fetchRepositories, variant: "outline", size: "sm", children: /* @__PURE__ */ jsx(RefreshCw, { className: "h-4 w-4" }) })
|
|
47898
47899
|
] })
|
|
47899
47900
|
] }),
|
|
47900
47901
|
/* @__PURE__ */ jsx("div", { className: cn(
|
|
@@ -47918,7 +47919,7 @@ var GitHubStarsInternal = ({
|
|
|
47918
47919
|
showOwner && /* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground truncate", children: repo.owner.login })
|
|
47919
47920
|
] }),
|
|
47920
47921
|
/* @__PURE__ */ jsx(
|
|
47921
|
-
|
|
47922
|
+
MoonUIButtonPro,
|
|
47922
47923
|
{
|
|
47923
47924
|
variant: "ghost",
|
|
47924
47925
|
size: "sm",
|
|
@@ -47983,7 +47984,7 @@ var GitHubStars = ({ className, ...props }) => {
|
|
|
47983
47984
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
47984
47985
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
47985
47986
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "GitHub Stars is available exclusively to MoonUI Pro subscribers." }),
|
|
47986
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
47987
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
47987
47988
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
47988
47989
|
"Upgrade to Pro"
|
|
47989
47990
|
] }) })
|
|
@@ -48173,7 +48174,7 @@ var HealthCheckInternal = ({
|
|
|
48173
48174
|
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: "Uptime" })
|
|
48174
48175
|
] }),
|
|
48175
48176
|
/* @__PURE__ */ jsx(
|
|
48176
|
-
|
|
48177
|
+
MoonUIButtonPro,
|
|
48177
48178
|
{
|
|
48178
48179
|
onClick: checkAllEndpoints,
|
|
48179
48180
|
disabled: isChecking,
|
|
@@ -48276,7 +48277,7 @@ var HealthCheck = ({ className, ...props }) => {
|
|
|
48276
48277
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
48277
48278
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
48278
48279
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Health Check is available exclusively to MoonUI Pro subscribers." }),
|
|
48279
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
48280
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
48280
48281
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
48281
48282
|
"Upgrade to Pro"
|
|
48282
48283
|
] }) })
|
|
@@ -48497,7 +48498,7 @@ var LazyComponent = ({ className, ...props }) => {
|
|
|
48497
48498
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
48498
48499
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
48499
48500
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Lazy Component is available exclusively to MoonUI Pro subscribers." }),
|
|
48500
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
48501
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
48501
48502
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
48502
48503
|
"Upgrade to Pro"
|
|
48503
48504
|
] }) })
|
|
@@ -48664,7 +48665,7 @@ var OptimizedImageInternal = ({
|
|
|
48664
48665
|
children: [
|
|
48665
48666
|
/* @__PURE__ */ jsxs("div", { className: "absolute top-2 right-2 flex gap-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200", children: [
|
|
48666
48667
|
showInfo && /* @__PURE__ */ jsx(
|
|
48667
|
-
|
|
48668
|
+
MoonUIButtonPro,
|
|
48668
48669
|
{
|
|
48669
48670
|
size: "sm",
|
|
48670
48671
|
variant: "secondary",
|
|
@@ -48674,7 +48675,7 @@ var OptimizedImageInternal = ({
|
|
|
48674
48675
|
}
|
|
48675
48676
|
),
|
|
48676
48677
|
showDownload && /* @__PURE__ */ jsx(
|
|
48677
|
-
|
|
48678
|
+
MoonUIButtonPro,
|
|
48678
48679
|
{
|
|
48679
48680
|
size: "sm",
|
|
48680
48681
|
variant: "secondary",
|
|
@@ -48684,7 +48685,7 @@ var OptimizedImageInternal = ({
|
|
|
48684
48685
|
}
|
|
48685
48686
|
),
|
|
48686
48687
|
showPreview && /* @__PURE__ */ jsx(
|
|
48687
|
-
|
|
48688
|
+
MoonUIButtonPro,
|
|
48688
48689
|
{
|
|
48689
48690
|
size: "sm",
|
|
48690
48691
|
variant: "secondary",
|
|
@@ -48736,7 +48737,7 @@ var OptimizedImageInternal = ({
|
|
|
48736
48737
|
/* @__PURE__ */ jsxs("div", { className: "absolute top-4 right-4 flex gap-2 z-10", children: [
|
|
48737
48738
|
showZoom && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
48738
48739
|
/* @__PURE__ */ jsx(
|
|
48739
|
-
|
|
48740
|
+
MoonUIButtonPro,
|
|
48740
48741
|
{
|
|
48741
48742
|
size: "sm",
|
|
48742
48743
|
variant: "secondary",
|
|
@@ -48750,7 +48751,7 @@ var OptimizedImageInternal = ({
|
|
|
48750
48751
|
"%"
|
|
48751
48752
|
] }),
|
|
48752
48753
|
/* @__PURE__ */ jsx(
|
|
48753
|
-
|
|
48754
|
+
MoonUIButtonPro,
|
|
48754
48755
|
{
|
|
48755
48756
|
size: "sm",
|
|
48756
48757
|
variant: "secondary",
|
|
@@ -48760,7 +48761,7 @@ var OptimizedImageInternal = ({
|
|
|
48760
48761
|
}
|
|
48761
48762
|
),
|
|
48762
48763
|
/* @__PURE__ */ jsx(
|
|
48763
|
-
|
|
48764
|
+
MoonUIButtonPro,
|
|
48764
48765
|
{
|
|
48765
48766
|
size: "sm",
|
|
48766
48767
|
variant: "secondary",
|
|
@@ -48770,7 +48771,7 @@ var OptimizedImageInternal = ({
|
|
|
48770
48771
|
)
|
|
48771
48772
|
] }),
|
|
48772
48773
|
/* @__PURE__ */ jsx(
|
|
48773
|
-
|
|
48774
|
+
MoonUIButtonPro,
|
|
48774
48775
|
{
|
|
48775
48776
|
size: "sm",
|
|
48776
48777
|
variant: "secondary",
|
|
@@ -48808,7 +48809,7 @@ var OptimizedImage = ({ className, ...props }) => {
|
|
|
48808
48809
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
48809
48810
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
48810
48811
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Optimized Image is available exclusively to MoonUI Pro subscribers." }),
|
|
48811
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
48812
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
48812
48813
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
48813
48814
|
"Upgrade to Pro"
|
|
48814
48815
|
] }) })
|
|
@@ -49376,7 +49377,7 @@ var PerformanceDebuggerInternal = ({
|
|
|
49376
49377
|
};
|
|
49377
49378
|
if (!isVisible) {
|
|
49378
49379
|
return /* @__PURE__ */ jsxs(
|
|
49379
|
-
|
|
49380
|
+
MoonUIButtonPro,
|
|
49380
49381
|
{
|
|
49381
49382
|
variant: "outline",
|
|
49382
49383
|
size: "sm",
|
|
@@ -49404,7 +49405,7 @@ var PerformanceDebuggerInternal = ({
|
|
|
49404
49405
|
isCapturing ? "Live" : "Paused"
|
|
49405
49406
|
] }),
|
|
49406
49407
|
/* @__PURE__ */ jsx(
|
|
49407
|
-
|
|
49408
|
+
MoonUIButtonPro,
|
|
49408
49409
|
{
|
|
49409
49410
|
variant: "outline",
|
|
49410
49411
|
size: "sm",
|
|
@@ -49413,7 +49414,7 @@ var PerformanceDebuggerInternal = ({
|
|
|
49413
49414
|
}
|
|
49414
49415
|
),
|
|
49415
49416
|
/* @__PURE__ */ jsx(
|
|
49416
|
-
|
|
49417
|
+
MoonUIButtonPro,
|
|
49417
49418
|
{
|
|
49418
49419
|
variant: "outline",
|
|
49419
49420
|
size: "sm",
|
|
@@ -49422,7 +49423,7 @@ var PerformanceDebuggerInternal = ({
|
|
|
49422
49423
|
}
|
|
49423
49424
|
),
|
|
49424
49425
|
/* @__PURE__ */ jsx(
|
|
49425
|
-
|
|
49426
|
+
MoonUIButtonPro,
|
|
49426
49427
|
{
|
|
49427
49428
|
variant: "outline",
|
|
49428
49429
|
size: "sm",
|
|
@@ -49431,7 +49432,7 @@ var PerformanceDebuggerInternal = ({
|
|
|
49431
49432
|
}
|
|
49432
49433
|
),
|
|
49433
49434
|
/* @__PURE__ */ jsx(
|
|
49434
|
-
|
|
49435
|
+
MoonUIButtonPro,
|
|
49435
49436
|
{
|
|
49436
49437
|
variant: "ghost",
|
|
49437
49438
|
size: "sm",
|
|
@@ -49493,7 +49494,7 @@ var PerformanceDebuggerInternal = ({
|
|
|
49493
49494
|
entries.length,
|
|
49494
49495
|
" entries captured"
|
|
49495
49496
|
] }),
|
|
49496
|
-
/* @__PURE__ */ jsx(
|
|
49497
|
+
/* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "outline", size: "sm", onClick: clearData, children: "Clear History" })
|
|
49497
49498
|
] }),
|
|
49498
49499
|
/* @__PURE__ */ jsx("div", { className: "space-y-2 max-h-96 overflow-y-auto", children: entries.map((entry, index) => /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsxs(CardContent, { className: "p-4", children: [
|
|
49499
49500
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-2", children: [
|
|
@@ -49557,7 +49558,7 @@ var PerformanceDebugger = ({ className, ...props }) => {
|
|
|
49557
49558
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
49558
49559
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
49559
49560
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Performance Debugger is available exclusively to MoonUI Pro subscribers." }),
|
|
49560
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
49561
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
49561
49562
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
49562
49563
|
"Upgrade to Pro"
|
|
49563
49564
|
] }) })
|
|
@@ -49684,7 +49685,7 @@ var PerformanceMonitorInternal = ({
|
|
|
49684
49685
|
}
|
|
49685
49686
|
if (newAlerts.length > 0) {
|
|
49686
49687
|
setAlerts((prev) => [...newAlerts, ...prev].slice(0, 20));
|
|
49687
|
-
newAlerts.forEach((
|
|
49688
|
+
newAlerts.forEach((alert2) => onAlert?.(alert2));
|
|
49688
49689
|
}
|
|
49689
49690
|
}, [alertThresholds, onAlert]);
|
|
49690
49691
|
const updateMetrics = useCallback(async () => {
|
|
@@ -49769,7 +49770,7 @@ var PerformanceMonitorInternal = ({
|
|
|
49769
49770
|
};
|
|
49770
49771
|
if (!isVisible) {
|
|
49771
49772
|
return /* @__PURE__ */ jsxs(
|
|
49772
|
-
|
|
49773
|
+
MoonUIButtonPro,
|
|
49773
49774
|
{
|
|
49774
49775
|
variant: "outline",
|
|
49775
49776
|
size: "sm",
|
|
@@ -49807,7 +49808,7 @@ var PerformanceMonitorInternal = ({
|
|
|
49807
49808
|
alerts.length
|
|
49808
49809
|
] }),
|
|
49809
49810
|
/* @__PURE__ */ jsx(
|
|
49810
|
-
|
|
49811
|
+
MoonUIButtonPro,
|
|
49811
49812
|
{
|
|
49812
49813
|
variant: "outline",
|
|
49813
49814
|
size: "sm",
|
|
@@ -49817,7 +49818,7 @@ var PerformanceMonitorInternal = ({
|
|
|
49817
49818
|
}
|
|
49818
49819
|
),
|
|
49819
49820
|
/* @__PURE__ */ jsx(
|
|
49820
|
-
|
|
49821
|
+
MoonUIButtonPro,
|
|
49821
49822
|
{
|
|
49822
49823
|
variant: "outline",
|
|
49823
49824
|
size: "sm",
|
|
@@ -49826,7 +49827,7 @@ var PerformanceMonitorInternal = ({
|
|
|
49826
49827
|
}
|
|
49827
49828
|
),
|
|
49828
49829
|
/* @__PURE__ */ jsx(
|
|
49829
|
-
|
|
49830
|
+
MoonUIButtonPro,
|
|
49830
49831
|
{
|
|
49831
49832
|
variant: "ghost",
|
|
49832
49833
|
size: "sm",
|
|
@@ -50058,7 +50059,7 @@ var PerformanceMonitorInternal = ({
|
|
|
50058
50059
|
" alerts"
|
|
50059
50060
|
] }),
|
|
50060
50061
|
/* @__PURE__ */ jsx(
|
|
50061
|
-
|
|
50062
|
+
MoonUIButtonPro,
|
|
50062
50063
|
{
|
|
50063
50064
|
variant: "outline",
|
|
50064
50065
|
size: "sm",
|
|
@@ -50068,7 +50069,7 @@ var PerformanceMonitorInternal = ({
|
|
|
50068
50069
|
}
|
|
50069
50070
|
)
|
|
50070
50071
|
] }),
|
|
50071
|
-
/* @__PURE__ */ jsx("div", { className: "space-y-2 max-h-96 overflow-y-auto", children: /* @__PURE__ */ jsx(AnimatePresence, { children: alerts.map((
|
|
50072
|
+
/* @__PURE__ */ jsx("div", { className: "space-y-2 max-h-96 overflow-y-auto", children: /* @__PURE__ */ jsx(AnimatePresence, { children: alerts.map((alert2, index) => /* @__PURE__ */ jsx(
|
|
50072
50073
|
motion.div,
|
|
50073
50074
|
{
|
|
50074
50075
|
initial: { opacity: 0, x: -20 },
|
|
@@ -50077,22 +50078,22 @@ var PerformanceMonitorInternal = ({
|
|
|
50077
50078
|
transition: { delay: index * 0.05 },
|
|
50078
50079
|
children: /* @__PURE__ */ jsx(Card, { children: /* @__PURE__ */ jsx(CardContent, { className: "p-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
50079
50080
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
|
|
50080
|
-
|
|
50081
|
+
alert2.type === "critical" ? /* @__PURE__ */ jsx(AlertTriangle, { className: "h-4 w-4 text-red-500" }) : alert2.type === "warning" ? /* @__PURE__ */ jsx(AlertTriangle, { className: "h-4 w-4 text-yellow-500" }) : /* @__PURE__ */ jsx(CheckCircle, { className: "h-4 w-4 text-blue-500" }),
|
|
50081
50082
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
50082
|
-
/* @__PURE__ */ jsx("div", { className: "font-medium text-sm", children:
|
|
50083
|
-
/* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children:
|
|
50083
|
+
/* @__PURE__ */ jsx("div", { className: "font-medium text-sm", children: alert2.metric }),
|
|
50084
|
+
/* @__PURE__ */ jsx("div", { className: "text-sm text-muted-foreground", children: alert2.message })
|
|
50084
50085
|
] })
|
|
50085
50086
|
] }),
|
|
50086
50087
|
/* @__PURE__ */ jsxs("div", { className: "text-right text-sm", children: [
|
|
50087
50088
|
/* @__PURE__ */ jsxs("div", { className: "font-medium", children: [
|
|
50088
|
-
|
|
50089
|
-
|
|
50089
|
+
alert2.value.toFixed(1),
|
|
50090
|
+
alert2.metric === "Network" ? "ms" : "%"
|
|
50090
50091
|
] }),
|
|
50091
|
-
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children:
|
|
50092
|
+
/* @__PURE__ */ jsx("div", { className: "text-xs text-muted-foreground", children: alert2.timestamp.toLocaleTimeString() })
|
|
50092
50093
|
] })
|
|
50093
50094
|
] }) }) })
|
|
50094
50095
|
},
|
|
50095
|
-
|
|
50096
|
+
alert2.id
|
|
50096
50097
|
)) }) }),
|
|
50097
50098
|
alerts.length === 0 && /* @__PURE__ */ jsxs("div", { className: "text-center py-8", children: [
|
|
50098
50099
|
/* @__PURE__ */ jsx(CheckCircle, { className: "h-12 w-12 mx-auto mb-4 text-green-500" }),
|
|
@@ -50153,7 +50154,7 @@ var PerformanceMonitor = ({ className, ...props }) => {
|
|
|
50153
50154
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
50154
50155
|
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-sm mb-2", children: "Pro Feature" }),
|
|
50155
50156
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-xs mb-4", children: "Performance Monitor is available exclusively to MoonUI Pro subscribers." }),
|
|
50156
|
-
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(
|
|
50157
|
+
/* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
50157
50158
|
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
50158
50159
|
"Upgrade to Pro"
|
|
50159
50160
|
] }) })
|
|
@@ -50162,6 +50163,472 @@ var PerformanceMonitor = ({ className, ...props }) => {
|
|
|
50162
50163
|
}
|
|
50163
50164
|
return /* @__PURE__ */ jsx(PerformanceMonitorInternal, { className, ...props });
|
|
50164
50165
|
};
|
|
50166
|
+
var getFileIcon = (type) => {
|
|
50167
|
+
if (type.startsWith("image/"))
|
|
50168
|
+
return /* @__PURE__ */ jsx(Image$1, { className: "h-4 w-4" });
|
|
50169
|
+
if (type.startsWith("video/"))
|
|
50170
|
+
return /* @__PURE__ */ jsx(Video, { className: "h-4 w-4" });
|
|
50171
|
+
if (type.startsWith("audio/"))
|
|
50172
|
+
return /* @__PURE__ */ jsx(Music, { className: "h-4 w-4" });
|
|
50173
|
+
if (type.includes("pdf"))
|
|
50174
|
+
return /* @__PURE__ */ jsx(FileText, { className: "h-4 w-4" });
|
|
50175
|
+
if (type.includes("zip") || type.includes("rar"))
|
|
50176
|
+
return /* @__PURE__ */ jsx(Archive, { className: "h-4 w-4" });
|
|
50177
|
+
return /* @__PURE__ */ jsx(File, { className: "h-4 w-4" });
|
|
50178
|
+
};
|
|
50179
|
+
var formatFileSize = (bytes) => {
|
|
50180
|
+
if (bytes === 0)
|
|
50181
|
+
return "0 Bytes";
|
|
50182
|
+
const k = 1024;
|
|
50183
|
+
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
50184
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
50185
|
+
return parseFloat((bytes / Math.pow(k, i)).toFixed(2)) + " " + sizes[i];
|
|
50186
|
+
};
|
|
50187
|
+
function FileUpload({
|
|
50188
|
+
accept = "*",
|
|
50189
|
+
multiple = false,
|
|
50190
|
+
maxSize = 10,
|
|
50191
|
+
// 10MB default
|
|
50192
|
+
maxFiles = 5,
|
|
50193
|
+
onUpload,
|
|
50194
|
+
onRemove,
|
|
50195
|
+
className,
|
|
50196
|
+
disabled = false,
|
|
50197
|
+
showPreview = true,
|
|
50198
|
+
allowedTypes = []
|
|
50199
|
+
}) {
|
|
50200
|
+
const { hasProAccess, isLoading } = useSubscription();
|
|
50201
|
+
if (!isLoading && !hasProAccess) {
|
|
50202
|
+
return /* @__PURE__ */ jsx(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx(CardContent, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
|
|
50203
|
+
/* @__PURE__ */ jsx("div", { className: "rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto", children: /* @__PURE__ */ jsx(Lock, { className: "h-6 w-6 text-purple-600 dark:text-purple-400" }) }),
|
|
50204
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
50205
|
+
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
|
|
50206
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "File Upload is available exclusively to MoonUI Pro subscribers." }),
|
|
50207
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
50208
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
50209
|
+
"Upgrade to Pro"
|
|
50210
|
+
] }) }) })
|
|
50211
|
+
] })
|
|
50212
|
+
] }) }) });
|
|
50213
|
+
}
|
|
50214
|
+
const [files, setFiles] = React16__default.useState([]);
|
|
50215
|
+
const [isDragOver, setIsDragOver] = React16__default.useState(false);
|
|
50216
|
+
const [isUploading, setIsUploading] = React16__default.useState(false);
|
|
50217
|
+
const fileInputRef = React16__default.useRef(null);
|
|
50218
|
+
const validateFile = (file) => {
|
|
50219
|
+
if (file.size > maxSize * 1024 * 1024) {
|
|
50220
|
+
return `File size must be less than ${maxSize}MB`;
|
|
50221
|
+
}
|
|
50222
|
+
if (allowedTypes.length > 0 && !allowedTypes.includes(file.type)) {
|
|
50223
|
+
return `File type ${file.type} is not allowed`;
|
|
50224
|
+
}
|
|
50225
|
+
return null;
|
|
50226
|
+
};
|
|
50227
|
+
const handleFileSelect = async (selectedFiles) => {
|
|
50228
|
+
if (!selectedFiles || disabled)
|
|
50229
|
+
return;
|
|
50230
|
+
const fileArray = Array.from(selectedFiles);
|
|
50231
|
+
if (files.length + fileArray.length > maxFiles) {
|
|
50232
|
+
alert(`Maximum ${maxFiles} files allowed`);
|
|
50233
|
+
return;
|
|
50234
|
+
}
|
|
50235
|
+
const validFiles = [];
|
|
50236
|
+
const invalidFiles = [];
|
|
50237
|
+
fileArray.forEach((file) => {
|
|
50238
|
+
const error = validateFile(file);
|
|
50239
|
+
if (error) {
|
|
50240
|
+
invalidFiles.push(`${file.name}: ${error}`);
|
|
50241
|
+
} else {
|
|
50242
|
+
validFiles.push({
|
|
50243
|
+
file,
|
|
50244
|
+
id: Math.random().toString(36).substr(2, 9),
|
|
50245
|
+
status: "uploading",
|
|
50246
|
+
progress: 0
|
|
50247
|
+
});
|
|
50248
|
+
}
|
|
50249
|
+
});
|
|
50250
|
+
if (invalidFiles.length > 0) {
|
|
50251
|
+
alert(invalidFiles.join("\n"));
|
|
50252
|
+
}
|
|
50253
|
+
if (validFiles.length === 0)
|
|
50254
|
+
return;
|
|
50255
|
+
setFiles((prev) => [...prev, ...validFiles]);
|
|
50256
|
+
setIsUploading(true);
|
|
50257
|
+
if (onUpload) {
|
|
50258
|
+
try {
|
|
50259
|
+
await onUpload(validFiles.map((f) => f.file));
|
|
50260
|
+
setFiles((prev) => prev.map(
|
|
50261
|
+
(f) => validFiles.find((vf) => vf.id === f.id) ? { ...f, status: "success", progress: 100 } : f
|
|
50262
|
+
));
|
|
50263
|
+
} catch (error) {
|
|
50264
|
+
setFiles((prev) => prev.map(
|
|
50265
|
+
(f) => validFiles.find((vf) => vf.id === f.id) ? { ...f, status: "error", error: "Upload failed" } : f
|
|
50266
|
+
));
|
|
50267
|
+
}
|
|
50268
|
+
} else {
|
|
50269
|
+
for (const validFile of validFiles) {
|
|
50270
|
+
const interval = setInterval(() => {
|
|
50271
|
+
setFiles((prev) => prev.map(
|
|
50272
|
+
(f) => f.id === validFile.id && f.progress < 100 ? { ...f, progress: f.progress + 10 } : f
|
|
50273
|
+
));
|
|
50274
|
+
}, 100);
|
|
50275
|
+
setTimeout(() => {
|
|
50276
|
+
clearInterval(interval);
|
|
50277
|
+
setFiles((prev) => prev.map(
|
|
50278
|
+
(f) => f.id === validFile.id ? { ...f, status: "success", progress: 100 } : f
|
|
50279
|
+
));
|
|
50280
|
+
}, 1e3);
|
|
50281
|
+
}
|
|
50282
|
+
}
|
|
50283
|
+
setIsUploading(false);
|
|
50284
|
+
};
|
|
50285
|
+
const handleRemove = (fileToRemove) => {
|
|
50286
|
+
setFiles((prev) => prev.filter((f) => f.id !== fileToRemove.id));
|
|
50287
|
+
if (onRemove) {
|
|
50288
|
+
onRemove(fileToRemove.file);
|
|
50289
|
+
}
|
|
50290
|
+
};
|
|
50291
|
+
const handleDrop = (e) => {
|
|
50292
|
+
e.preventDefault();
|
|
50293
|
+
setIsDragOver(false);
|
|
50294
|
+
handleFileSelect(e.dataTransfer.files);
|
|
50295
|
+
};
|
|
50296
|
+
const handleDragOver = (e) => {
|
|
50297
|
+
e.preventDefault();
|
|
50298
|
+
setIsDragOver(true);
|
|
50299
|
+
};
|
|
50300
|
+
const handleDragLeave = (e) => {
|
|
50301
|
+
e.preventDefault();
|
|
50302
|
+
setIsDragOver(false);
|
|
50303
|
+
};
|
|
50304
|
+
const handleClick2 = () => {
|
|
50305
|
+
if (!disabled) {
|
|
50306
|
+
fileInputRef.current?.click();
|
|
50307
|
+
}
|
|
50308
|
+
};
|
|
50309
|
+
return /* @__PURE__ */ jsxs(Card, { className: cn("w-full", className), children: [
|
|
50310
|
+
/* @__PURE__ */ jsxs(CardHeader, { children: [
|
|
50311
|
+
/* @__PURE__ */ jsxs(CardTitle, { className: "flex items-center gap-2", children: [
|
|
50312
|
+
/* @__PURE__ */ jsx(Upload, { className: "h-5 w-5" }),
|
|
50313
|
+
"File Upload"
|
|
50314
|
+
] }),
|
|
50315
|
+
/* @__PURE__ */ jsxs(CardDescription, { children: [
|
|
50316
|
+
multiple ? `Upload up to ${maxFiles} files` : "Upload a file",
|
|
50317
|
+
" (max ",
|
|
50318
|
+
maxSize,
|
|
50319
|
+
"MB each)"
|
|
50320
|
+
] })
|
|
50321
|
+
] }),
|
|
50322
|
+
/* @__PURE__ */ jsxs(CardContent, { className: "space-y-4", children: [
|
|
50323
|
+
/* @__PURE__ */ jsxs(
|
|
50324
|
+
"div",
|
|
50325
|
+
{
|
|
50326
|
+
className: cn(
|
|
50327
|
+
"border-2 border-dashed rounded-lg p-8 text-center cursor-pointer transition-colors",
|
|
50328
|
+
isDragOver ? "border-primary bg-primary/5" : "border-muted-foreground/25",
|
|
50329
|
+
disabled && "cursor-not-allowed opacity-50"
|
|
50330
|
+
),
|
|
50331
|
+
onDrop: handleDrop,
|
|
50332
|
+
onDragOver: handleDragOver,
|
|
50333
|
+
onDragLeave: handleDragLeave,
|
|
50334
|
+
onClick: handleClick2,
|
|
50335
|
+
children: [
|
|
50336
|
+
/* @__PURE__ */ jsx(Upload, { className: "h-10 w-10 mx-auto mb-4 text-muted-foreground" }),
|
|
50337
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground mb-2", children: "Drag and drop files here, or click to select" }),
|
|
50338
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: accept === "*" ? "Any file type" : `Accepted types: ${accept}` })
|
|
50339
|
+
]
|
|
50340
|
+
}
|
|
50341
|
+
),
|
|
50342
|
+
/* @__PURE__ */ jsx(
|
|
50343
|
+
"input",
|
|
50344
|
+
{
|
|
50345
|
+
ref: fileInputRef,
|
|
50346
|
+
type: "file",
|
|
50347
|
+
accept,
|
|
50348
|
+
multiple,
|
|
50349
|
+
onChange: (e) => handleFileSelect(e.target.files),
|
|
50350
|
+
className: "hidden",
|
|
50351
|
+
disabled
|
|
50352
|
+
}
|
|
50353
|
+
),
|
|
50354
|
+
files.length > 0 && /* @__PURE__ */ jsxs("div", { className: "space-y-2", children: [
|
|
50355
|
+
/* @__PURE__ */ jsxs("h4", { className: "text-sm font-medium", children: [
|
|
50356
|
+
"Uploaded Files (",
|
|
50357
|
+
files.length,
|
|
50358
|
+
")"
|
|
50359
|
+
] }),
|
|
50360
|
+
files.map((uploadedFile) => /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3 p-3 border rounded-lg", children: [
|
|
50361
|
+
/* @__PURE__ */ jsx("div", { className: "flex-shrink-0", children: getFileIcon(uploadedFile.file.type) }),
|
|
50362
|
+
/* @__PURE__ */ jsxs("div", { className: "flex-1 min-w-0", children: [
|
|
50363
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
50364
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium truncate", children: uploadedFile.file.name }),
|
|
50365
|
+
/* @__PURE__ */ jsxs(Badge, { variant: uploadedFile.status === "success" ? "success" : uploadedFile.status === "error" ? "destructive" : "secondary", children: [
|
|
50366
|
+
uploadedFile.status === "uploading" && /* @__PURE__ */ jsx(Loader2, { className: "h-3 w-3 mr-1 animate-spin" }),
|
|
50367
|
+
uploadedFile.status === "success" && /* @__PURE__ */ jsx(CheckCircle2, { className: "h-3 w-3 mr-1" }),
|
|
50368
|
+
uploadedFile.status === "error" && /* @__PURE__ */ jsx(AlertCircle, { className: "h-3 w-3 mr-1" }),
|
|
50369
|
+
uploadedFile.status
|
|
50370
|
+
] })
|
|
50371
|
+
] }),
|
|
50372
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mt-1", children: [
|
|
50373
|
+
/* @__PURE__ */ jsx("p", { className: "text-xs text-muted-foreground", children: formatFileSize(uploadedFile.file.size) }),
|
|
50374
|
+
uploadedFile.status === "uploading" && /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
|
|
50375
|
+
uploadedFile.progress,
|
|
50376
|
+
"%"
|
|
50377
|
+
] })
|
|
50378
|
+
] }),
|
|
50379
|
+
uploadedFile.status === "uploading" && /* @__PURE__ */ jsx("div", { className: "mt-2 h-2 bg-secondary rounded-full overflow-hidden", children: /* @__PURE__ */ jsx(
|
|
50380
|
+
"div",
|
|
50381
|
+
{
|
|
50382
|
+
className: "h-full bg-primary transition-all duration-300 ease-out",
|
|
50383
|
+
style: { width: `${uploadedFile.progress}%` }
|
|
50384
|
+
}
|
|
50385
|
+
) }),
|
|
50386
|
+
uploadedFile.error && /* @__PURE__ */ jsx("p", { className: "text-xs text-destructive mt-1", children: uploadedFile.error })
|
|
50387
|
+
] }),
|
|
50388
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1", children: [
|
|
50389
|
+
uploadedFile.status === "success" && showPreview && uploadedFile.file.type.startsWith("image/") && /* @__PURE__ */ jsx(MoonUIButtonPro, { variant: "ghost", size: "sm", children: /* @__PURE__ */ jsx(Download, { className: "h-4 w-4" }) }),
|
|
50390
|
+
/* @__PURE__ */ jsx(
|
|
50391
|
+
MoonUIButtonPro,
|
|
50392
|
+
{
|
|
50393
|
+
variant: "ghost",
|
|
50394
|
+
size: "sm",
|
|
50395
|
+
onClick: () => handleRemove(uploadedFile),
|
|
50396
|
+
disabled: uploadedFile.status === "uploading",
|
|
50397
|
+
children: /* @__PURE__ */ jsx(X, { className: "h-4 w-4" })
|
|
50398
|
+
}
|
|
50399
|
+
)
|
|
50400
|
+
] })
|
|
50401
|
+
] }, uploadedFile.id))
|
|
50402
|
+
] }),
|
|
50403
|
+
isUploading && /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 text-sm text-muted-foreground", children: [
|
|
50404
|
+
/* @__PURE__ */ jsx(Loader2, { className: "h-4 w-4 animate-spin" }),
|
|
50405
|
+
"Uploading files..."
|
|
50406
|
+
] })
|
|
50407
|
+
] })
|
|
50408
|
+
] });
|
|
50409
|
+
}
|
|
50410
|
+
function DataTable({
|
|
50411
|
+
columns,
|
|
50412
|
+
data,
|
|
50413
|
+
searchable = true,
|
|
50414
|
+
filterable = true,
|
|
50415
|
+
exportable = true,
|
|
50416
|
+
selectable = false,
|
|
50417
|
+
pagination = true,
|
|
50418
|
+
pageSize = 10,
|
|
50419
|
+
className,
|
|
50420
|
+
onRowSelect,
|
|
50421
|
+
onExport,
|
|
50422
|
+
features = {},
|
|
50423
|
+
theme = {},
|
|
50424
|
+
texts = {}
|
|
50425
|
+
}) {
|
|
50426
|
+
const { hasProAccess, isLoading } = useSubscription();
|
|
50427
|
+
if (!isLoading && !hasProAccess) {
|
|
50428
|
+
return /* @__PURE__ */ jsx(Card, { className: cn("w-full", className), children: /* @__PURE__ */ jsx(CardContent, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
|
|
50429
|
+
/* @__PURE__ */ jsx("div", { className: "rounded-full bg-purple-100 dark:bg-purple-900/30 p-3 w-fit mx-auto", children: /* @__PURE__ */ jsx(Lock, { className: "h-6 w-6 text-purple-600 dark:text-purple-400" }) }),
|
|
50430
|
+
/* @__PURE__ */ jsxs("div", { children: [
|
|
50431
|
+
/* @__PURE__ */ jsx("h3", { className: "font-semibold text-lg mb-2", children: "Pro Feature" }),
|
|
50432
|
+
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground text-sm mb-4", children: "Data Table is available exclusively to MoonUI Pro subscribers." }),
|
|
50433
|
+
/* @__PURE__ */ jsx("div", { className: "flex gap-3 justify-center", children: /* @__PURE__ */ jsx("a", { href: "/pricing", children: /* @__PURE__ */ jsxs(MoonUIButtonPro, { size: "sm", children: [
|
|
50434
|
+
/* @__PURE__ */ jsx(Sparkles, { className: "mr-2 h-4 w-4" }),
|
|
50435
|
+
"Upgrade to Pro"
|
|
50436
|
+
] }) }) })
|
|
50437
|
+
] })
|
|
50438
|
+
] }) }) });
|
|
50439
|
+
}
|
|
50440
|
+
const [sorting, setSorting] = React16__default.useState([]);
|
|
50441
|
+
const [columnFilters, setColumnFilters] = React16__default.useState([]);
|
|
50442
|
+
const [columnVisibility, setColumnVisibility] = React16__default.useState({});
|
|
50443
|
+
const [rowSelection, setRowSelection] = React16__default.useState({});
|
|
50444
|
+
const [globalFilter, setGlobalFilter] = React16__default.useState("");
|
|
50445
|
+
const table = useReactTable({
|
|
50446
|
+
data,
|
|
50447
|
+
columns,
|
|
50448
|
+
onSortingChange: setSorting,
|
|
50449
|
+
onColumnFiltersChange: setColumnFilters,
|
|
50450
|
+
getCoreRowModel: getCoreRowModel(),
|
|
50451
|
+
getPaginationRowModel: getPaginationRowModel(),
|
|
50452
|
+
getSortedRowModel: getSortedRowModel(),
|
|
50453
|
+
getFilteredRowModel: getFilteredRowModel(),
|
|
50454
|
+
onColumnVisibilityChange: setColumnVisibility,
|
|
50455
|
+
onRowSelectionChange: setRowSelection,
|
|
50456
|
+
onGlobalFilterChange: setGlobalFilter,
|
|
50457
|
+
globalFilterFn: "includesString",
|
|
50458
|
+
state: {
|
|
50459
|
+
sorting,
|
|
50460
|
+
columnFilters,
|
|
50461
|
+
columnVisibility,
|
|
50462
|
+
rowSelection,
|
|
50463
|
+
globalFilter
|
|
50464
|
+
},
|
|
50465
|
+
initialState: {
|
|
50466
|
+
pagination: {
|
|
50467
|
+
pageSize
|
|
50468
|
+
}
|
|
50469
|
+
}
|
|
50470
|
+
});
|
|
50471
|
+
React16__default.useEffect(() => {
|
|
50472
|
+
if (onRowSelect && selectable) {
|
|
50473
|
+
const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
|
|
50474
|
+
onRowSelect(selectedRows);
|
|
50475
|
+
}
|
|
50476
|
+
}, [rowSelection, onRowSelect, selectable, table]);
|
|
50477
|
+
({
|
|
50478
|
+
sorting: features.sorting !== false,
|
|
50479
|
+
filtering: features.filtering !== false || filterable,
|
|
50480
|
+
pagination: features.pagination !== false || pagination,
|
|
50481
|
+
search: features.search !== false || searchable,
|
|
50482
|
+
columnVisibility: features.columnVisibility !== false,
|
|
50483
|
+
rowSelection: features.rowSelection !== false || selectable,
|
|
50484
|
+
export: features.export !== false || exportable
|
|
50485
|
+
});
|
|
50486
|
+
const handleExport = () => {
|
|
50487
|
+
if (onExport) {
|
|
50488
|
+
const selectedRows = table.getFilteredSelectedRowModel().rows;
|
|
50489
|
+
const dataToExport = selectedRows.length > 0 ? selectedRows.map((row) => row.original) : table.getFilteredRowModel().rows.map((row) => row.original);
|
|
50490
|
+
onExport(dataToExport);
|
|
50491
|
+
}
|
|
50492
|
+
};
|
|
50493
|
+
return /* @__PURE__ */ jsxs("div", { className: cn("space-y-4", className), children: [
|
|
50494
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
|
|
50495
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
50496
|
+
searchable && /* @__PURE__ */ jsxs("div", { className: "relative", children: [
|
|
50497
|
+
/* @__PURE__ */ jsx(Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
|
|
50498
|
+
/* @__PURE__ */ jsx(
|
|
50499
|
+
Input,
|
|
50500
|
+
{
|
|
50501
|
+
placeholder: "Search all columns...",
|
|
50502
|
+
value: globalFilter,
|
|
50503
|
+
onChange: (e) => setGlobalFilter(e.target.value),
|
|
50504
|
+
className: "pl-8 w-64"
|
|
50505
|
+
}
|
|
50506
|
+
)
|
|
50507
|
+
] }),
|
|
50508
|
+
filterable && /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
|
|
50509
|
+
/* @__PURE__ */ jsx(Filter, { className: "mr-2 h-4 w-4" }),
|
|
50510
|
+
"Filters"
|
|
50511
|
+
] })
|
|
50512
|
+
] }),
|
|
50513
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
50514
|
+
exportable && /* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", onClick: handleExport, children: [
|
|
50515
|
+
/* @__PURE__ */ jsx(Download, { className: "mr-2 h-4 w-4" }),
|
|
50516
|
+
"Export"
|
|
50517
|
+
] }),
|
|
50518
|
+
/* @__PURE__ */ jsxs(MoonUIButtonPro, { variant: "outline", size: "sm", children: [
|
|
50519
|
+
/* @__PURE__ */ jsx(Settings, { className: "mr-2 h-4 w-4" }),
|
|
50520
|
+
"Columns"
|
|
50521
|
+
] })
|
|
50522
|
+
] })
|
|
50523
|
+
] }),
|
|
50524
|
+
/* @__PURE__ */ jsx("div", { className: "rounded-md border", children: /* @__PURE__ */ jsxs("table", { className: "w-full", children: [
|
|
50525
|
+
/* @__PURE__ */ jsx("thead", { children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx("tr", { className: "border-b", children: headerGroup.headers.map((header) => /* @__PURE__ */ jsx(
|
|
50526
|
+
"th",
|
|
50527
|
+
{
|
|
50528
|
+
className: "h-12 px-4 text-left align-middle font-medium text-muted-foreground",
|
|
50529
|
+
children: header.isPlaceholder ? null : /* @__PURE__ */ jsxs(
|
|
50530
|
+
"div",
|
|
50531
|
+
{
|
|
50532
|
+
className: cn(
|
|
50533
|
+
"flex items-center space-x-2",
|
|
50534
|
+
header.column.getCanSort() && "cursor-pointer select-none"
|
|
50535
|
+
),
|
|
50536
|
+
onClick: header.column.getToggleSortingHandler(),
|
|
50537
|
+
children: [
|
|
50538
|
+
flexRender(header.column.columnDef.header, header.getContext()),
|
|
50539
|
+
header.column.getCanSort() && /* @__PURE__ */ jsx("div", { className: "ml-2", children: header.column.getIsSorted() === "asc" ? /* @__PURE__ */ jsx(ArrowUp, { className: "h-4 w-4" }) : header.column.getIsSorted() === "desc" ? /* @__PURE__ */ jsx(ArrowDown, { className: "h-4 w-4" }) : /* @__PURE__ */ jsx(ArrowUpDown, { className: "h-4 w-4" }) })
|
|
50540
|
+
]
|
|
50541
|
+
}
|
|
50542
|
+
)
|
|
50543
|
+
},
|
|
50544
|
+
header.id
|
|
50545
|
+
)) }, headerGroup.id)) }),
|
|
50546
|
+
/* @__PURE__ */ jsx("tbody", { children: table.getRowModel().rows?.length ? table.getRowModel().rows.map((row) => /* @__PURE__ */ jsx(
|
|
50547
|
+
"tr",
|
|
50548
|
+
{
|
|
50549
|
+
className: cn(
|
|
50550
|
+
"border-b transition-colors hover:bg-muted/50",
|
|
50551
|
+
row.getIsSelected() && "bg-muted"
|
|
50552
|
+
),
|
|
50553
|
+
children: row.getVisibleCells().map((cell) => /* @__PURE__ */ jsx("td", { className: "p-4 align-middle", children: flexRender(cell.column.columnDef.cell, cell.getContext()) }, cell.id))
|
|
50554
|
+
},
|
|
50555
|
+
row.id
|
|
50556
|
+
)) : /* @__PURE__ */ jsx("tr", { children: /* @__PURE__ */ jsx("td", { colSpan: columns.length, className: "h-24 text-center", children: "No results found." }) }) })
|
|
50557
|
+
] }) }),
|
|
50558
|
+
pagination && /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between px-2", children: [
|
|
50559
|
+
/* @__PURE__ */ jsx("div", { className: "flex-1 text-sm text-muted-foreground", children: selectable && table.getFilteredSelectedRowModel().rows.length > 0 && /* @__PURE__ */ jsxs("span", { children: [
|
|
50560
|
+
table.getFilteredSelectedRowModel().rows.length,
|
|
50561
|
+
" of",
|
|
50562
|
+
" ",
|
|
50563
|
+
table.getFilteredRowModel().rows.length,
|
|
50564
|
+
" row(s) selected."
|
|
50565
|
+
] }) }),
|
|
50566
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-6 lg:space-x-8", children: [
|
|
50567
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
50568
|
+
/* @__PURE__ */ jsx("p", { className: "text-sm font-medium", children: "Rows per page" }),
|
|
50569
|
+
/* @__PURE__ */ jsx(
|
|
50570
|
+
"select",
|
|
50571
|
+
{
|
|
50572
|
+
value: table.getState().pagination.pageSize,
|
|
50573
|
+
onChange: (e) => table.setPageSize(Number(e.target.value)),
|
|
50574
|
+
className: "h-8 w-[70px] rounded border border-input bg-background px-3 py-1 text-sm",
|
|
50575
|
+
children: [10, 20, 30, 40, 50].map((pageSize2) => /* @__PURE__ */ jsx("option", { value: pageSize2, children: pageSize2 }, pageSize2))
|
|
50576
|
+
}
|
|
50577
|
+
)
|
|
50578
|
+
] }),
|
|
50579
|
+
/* @__PURE__ */ jsxs("div", { className: "flex w-[100px] items-center justify-center text-sm font-medium", children: [
|
|
50580
|
+
"Page ",
|
|
50581
|
+
table.getState().pagination.pageIndex + 1,
|
|
50582
|
+
" of",
|
|
50583
|
+
" ",
|
|
50584
|
+
table.getPageCount()
|
|
50585
|
+
] }),
|
|
50586
|
+
/* @__PURE__ */ jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
50587
|
+
/* @__PURE__ */ jsx(
|
|
50588
|
+
MoonUIButtonPro,
|
|
50589
|
+
{
|
|
50590
|
+
variant: "outline",
|
|
50591
|
+
className: "hidden h-8 w-8 p-0 lg:flex",
|
|
50592
|
+
onClick: () => table.setPageIndex(0),
|
|
50593
|
+
disabled: !table.getCanPreviousPage(),
|
|
50594
|
+
children: /* @__PURE__ */ jsx(ChevronsLeft, { className: "h-4 w-4" })
|
|
50595
|
+
}
|
|
50596
|
+
),
|
|
50597
|
+
/* @__PURE__ */ jsx(
|
|
50598
|
+
MoonUIButtonPro,
|
|
50599
|
+
{
|
|
50600
|
+
variant: "outline",
|
|
50601
|
+
className: "h-8 w-8 p-0",
|
|
50602
|
+
onClick: () => table.previousPage(),
|
|
50603
|
+
disabled: !table.getCanPreviousPage(),
|
|
50604
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "h-4 w-4" })
|
|
50605
|
+
}
|
|
50606
|
+
),
|
|
50607
|
+
/* @__PURE__ */ jsx(
|
|
50608
|
+
MoonUIButtonPro,
|
|
50609
|
+
{
|
|
50610
|
+
variant: "outline",
|
|
50611
|
+
className: "h-8 w-8 p-0",
|
|
50612
|
+
onClick: () => table.nextPage(),
|
|
50613
|
+
disabled: !table.getCanNextPage(),
|
|
50614
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "h-4 w-4" })
|
|
50615
|
+
}
|
|
50616
|
+
),
|
|
50617
|
+
/* @__PURE__ */ jsx(
|
|
50618
|
+
MoonUIButtonPro,
|
|
50619
|
+
{
|
|
50620
|
+
variant: "outline",
|
|
50621
|
+
className: "hidden h-8 w-8 p-0 lg:flex",
|
|
50622
|
+
onClick: () => table.setPageIndex(table.getPageCount() - 1),
|
|
50623
|
+
disabled: !table.getCanNextPage(),
|
|
50624
|
+
children: /* @__PURE__ */ jsx(ChevronsRight, { className: "h-4 w-4" })
|
|
50625
|
+
}
|
|
50626
|
+
)
|
|
50627
|
+
] })
|
|
50628
|
+
] })
|
|
50629
|
+
] })
|
|
50630
|
+
] });
|
|
50631
|
+
}
|
|
50165
50632
|
|
|
50166
50633
|
// src/components/enhanced/index.ts
|
|
50167
50634
|
var enhanced_exports = {};
|
|
@@ -51061,4 +51528,4 @@ var BadgePro = React16__default.forwardRef(({
|
|
|
51061
51528
|
});
|
|
51062
51529
|
BadgePro.displayName = "BadgePro";
|
|
51063
51530
|
|
|
51064
|
-
export { AdvancedChart, AdvancedForms, AnimatedButton, Calendar2 as Calendar, ColorPicker2 as ColorPicker, Dashboard, DraggableList, enhanced_exports as Enhanced, ErrorBoundary, FloatingActionButton, GitHubStars, HealthCheck, HoverCard3D, Kanban, LazyComponent, LazyImage, LazyList, MagneticButton, MemoryAnalytics, MemoryEfficientData, OptimizedImage, PerformanceDebugger, PerformanceMonitor, PinchZoom, RichTextEditor, SelectableVirtualList, SpotlightCard, SwipeableCard, Timeline, VirtualList, animatedButtonVariants, useStreamingData, useVirtualList };
|
|
51531
|
+
export { AdvancedChart, AdvancedForms, AnimatedButton, Calendar2 as Calendar, ColorPicker2 as ColorPicker, Dashboard, DataTable, DraggableList, enhanced_exports as Enhanced, ErrorBoundary, FileUpload, FloatingActionButton, GitHubStars, HealthCheck, HoverCard3D, Kanban, LazyComponent, LazyImage, LazyList, MagneticButton, MemoryAnalytics, MemoryEfficientData, OptimizedImage, PerformanceDebugger, PerformanceMonitor, PinchZoom, RichTextEditor, SelectableVirtualList, SpotlightCard, SwipeableCard, Timeline, VirtualList, animatedButtonVariants, useStreamingData, useVirtualList };
|