@moontra/moonui-pro 2.21.3 → 2.21.4
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 +9 -9
- package/dist/index.mjs +999 -665
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { clsx } from 'clsx';
|
|
3
3
|
import { twMerge } from 'tailwind-merge';
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
4
|
+
import * as React67 from 'react';
|
|
5
|
+
import React67__default, { useState, useMemo, useCallback, useRef, useEffect, forwardRef, createContext, useContext, useLayoutEffect, useDebugValue, Component } from 'react';
|
|
6
6
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
7
7
|
import { Loader2, Play, ExternalLink, ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, MoreHorizontal, Minus, Clock, ChevronUp, Search, Mic, MicOff, Settings, RefreshCw, Zap, ChevronRight, Crown, Circle, ChevronLeft, Plus, Lock, Sparkles, ZoomOut, ZoomIn, Pause, VolumeX, Volume2, Download, Maximize2, Filter, Image as Image$1, Video, RotateCw, Minimize2, Phone, Globe, Upload, Eye, CheckCircle2, RotateCcw, Copy, Share, Trash2, CreditCard, XCircle, HelpCircle, 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, Table as Table$1, Undo, Redo, Edit, Wand2, Maximize, FileText, Briefcase, MessageSquare, Heart, GraduationCap, Languages, Lightbulb, BarChart3, Music, Archive, File, FileSpreadsheet, FileJson, FileDown, ArrowUp, ArrowDown, ArrowUpDown, ChevronsLeft, ChevronsRight, CheckCircle, Star, Menu, Calendar as Calendar$1, Repeat, MapPin, Users, User, Move, EyeOff, Timer, Square, Cpu, Target, GitBranch, ArrowRight, MoreVertical, Trash, TrendingUp, MessageCircle, Paperclip, Printer, TrendingDown, Bell, CheckCheck, Settings2, LogOut, Edit3, LayoutGrid, Share2, Save, Github, Activity, Server, Monitor, MemoryStick, HardDrive, Network, Columns, Pin, Sun, Moon, Send, Tag, Flag, CalendarIcon, DollarSign, Trophy, Grip, Unlock, Map as Map$1, GitFork, Package, BellOff, ArrowUpRight, ArrowDownRight } from 'lucide-react';
|
|
8
8
|
import { cva } from 'class-variance-authority';
|
|
@@ -11,8 +11,8 @@ import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
|
11
11
|
import { format, addMonths, subMonths, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek, isSameMonth, isToday, isSameDay, startOfDay, endOfDay, subDays, formatDistanceToNow } from 'date-fns';
|
|
12
12
|
import { motion, AnimatePresence, useAnimation, useMotionValue, animate, useSpring, useTransform, Reorder, useDragControls } from 'framer-motion';
|
|
13
13
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
14
|
-
import * as
|
|
15
|
-
import
|
|
14
|
+
import * as ReactDOM2 from 'react-dom';
|
|
15
|
+
import ReactDOM2__default from 'react-dom';
|
|
16
16
|
import { createSlot, createSlottable } from '@radix-ui/react-slot';
|
|
17
17
|
import { Command } from 'cmdk';
|
|
18
18
|
import Fuse from 'fuse.js';
|
|
@@ -2123,7 +2123,7 @@ var accordionTriggerVariants = cva(
|
|
|
2123
2123
|
}
|
|
2124
2124
|
}
|
|
2125
2125
|
);
|
|
2126
|
-
var MoonUIAccordionPro =
|
|
2126
|
+
var MoonUIAccordionPro = React67.forwardRef((props, ref) => {
|
|
2127
2127
|
const {
|
|
2128
2128
|
className,
|
|
2129
2129
|
size: size4 = "md",
|
|
@@ -2143,7 +2143,7 @@ var MoonUIAccordionPro = React60.forwardRef((props, ref) => {
|
|
|
2143
2143
|
...rest
|
|
2144
2144
|
} = props;
|
|
2145
2145
|
const collapsible = props.type === "single" ? props.collapsible ?? true : void 0;
|
|
2146
|
-
|
|
2146
|
+
React67.useEffect(() => {
|
|
2147
2147
|
if (autoExpandFromHash && typeof window !== "undefined") {
|
|
2148
2148
|
const hash = window.location.hash.replace("#", "");
|
|
2149
2149
|
if (hash) {
|
|
@@ -2160,7 +2160,7 @@ var MoonUIAccordionPro = React60.forwardRef((props, ref) => {
|
|
|
2160
2160
|
}
|
|
2161
2161
|
}
|
|
2162
2162
|
}, [autoExpandFromHash]);
|
|
2163
|
-
const handleValueChange =
|
|
2163
|
+
const handleValueChange = React67.useCallback((newValue) => {
|
|
2164
2164
|
if (onItemToggle && newValue) {
|
|
2165
2165
|
if (Array.isArray(newValue)) {
|
|
2166
2166
|
newValue.forEach((v) => onItemToggle(v, true));
|
|
@@ -2204,12 +2204,12 @@ var MoonUIAccordionPro = React60.forwardRef((props, ref) => {
|
|
|
2204
2204
|
);
|
|
2205
2205
|
});
|
|
2206
2206
|
MoonUIAccordionPro.displayName = "MoonUIAccordionPro";
|
|
2207
|
-
var AccordionContext =
|
|
2208
|
-
var MoonUIAccordionItemPro =
|
|
2209
|
-
const { size: size4, variant, onItemToggle } =
|
|
2210
|
-
const [hasBeenOpened, setHasBeenOpened] =
|
|
2207
|
+
var AccordionContext = React67.createContext({});
|
|
2208
|
+
var MoonUIAccordionItemPro = React67.forwardRef(({ className, loading, progress, badge, badgeVariant = "default", completed, lazy, children, ...props }, ref) => {
|
|
2209
|
+
const { size: size4, variant, onItemToggle } = React67.useContext(AccordionContext);
|
|
2210
|
+
const [hasBeenOpened, setHasBeenOpened] = React67.useState(!lazy);
|
|
2211
2211
|
const progressOffset = progress ? 188.4 - 188.4 * progress / 100 : 188.4;
|
|
2212
|
-
|
|
2212
|
+
React67.useEffect(() => {
|
|
2213
2213
|
if (lazy && !hasBeenOpened) {
|
|
2214
2214
|
const item = document.querySelector(`[data-state="open"][value="${props.value}"]`);
|
|
2215
2215
|
if (item) {
|
|
@@ -2282,7 +2282,7 @@ var MoonUIAccordionItemPro = React60.forwardRef(({ className, loading, progress,
|
|
|
2282
2282
|
);
|
|
2283
2283
|
});
|
|
2284
2284
|
MoonUIAccordionItemPro.displayName = "MoonUIAccordionItemPro";
|
|
2285
|
-
var MoonUIAccordionTriggerPro =
|
|
2285
|
+
var MoonUIAccordionTriggerPro = React67.forwardRef(({
|
|
2286
2286
|
className,
|
|
2287
2287
|
children,
|
|
2288
2288
|
leftIcon,
|
|
@@ -2294,7 +2294,7 @@ var MoonUIAccordionTriggerPro = React60.forwardRef(({
|
|
|
2294
2294
|
hideChevron,
|
|
2295
2295
|
...props
|
|
2296
2296
|
}, ref) => {
|
|
2297
|
-
const { size: size4, variant, searchTerm } =
|
|
2297
|
+
const { size: size4, variant, searchTerm } = React67.useContext(AccordionContext);
|
|
2298
2298
|
const highlightText = (text, searchTerm2) => {
|
|
2299
2299
|
if (!searchTerm2 || typeof text !== "string")
|
|
2300
2300
|
return text;
|
|
@@ -2334,11 +2334,11 @@ var MoonUIAccordionTriggerPro = React60.forwardRef(({
|
|
|
2334
2334
|
) });
|
|
2335
2335
|
});
|
|
2336
2336
|
MoonUIAccordionTriggerPro.displayName = "MoonUIAccordionTriggerPro";
|
|
2337
|
-
var MoonUIAccordionContentPro =
|
|
2338
|
-
const { size: size4, variant, animationMode } =
|
|
2339
|
-
const [dynamicContent, setDynamicContent] =
|
|
2340
|
-
const [isLoading, setIsLoading] =
|
|
2341
|
-
|
|
2337
|
+
var MoonUIAccordionContentPro = React67.forwardRef(({ className, children, contentLoading, loadContent, noPadding, ...props }, ref) => {
|
|
2338
|
+
const { size: size4, variant, animationMode } = React67.useContext(AccordionContext);
|
|
2339
|
+
const [dynamicContent, setDynamicContent] = React67.useState(null);
|
|
2340
|
+
const [isLoading, setIsLoading] = React67.useState(false);
|
|
2341
|
+
React67.useEffect(() => {
|
|
2342
2342
|
if (loadContent && !dynamicContent) {
|
|
2343
2343
|
setIsLoading(true);
|
|
2344
2344
|
loadContent().then(setDynamicContent).finally(() => setIsLoading(false));
|
|
@@ -2375,8 +2375,8 @@ var MoonUIAccordionContentPro = React60.forwardRef(({ className, children, conte
|
|
|
2375
2375
|
});
|
|
2376
2376
|
MoonUIAccordionContentPro.displayName = "MoonUIAccordionContentPro";
|
|
2377
2377
|
var useAccordionAnalytics = () => {
|
|
2378
|
-
const [analytics, setAnalytics] =
|
|
2379
|
-
const trackItemOpen =
|
|
2378
|
+
const [analytics, setAnalytics] = React67.useState({});
|
|
2379
|
+
const trackItemOpen = React67.useCallback((itemId) => {
|
|
2380
2380
|
setAnalytics((prev) => ({
|
|
2381
2381
|
...prev,
|
|
2382
2382
|
[itemId]: {
|
|
@@ -2423,9 +2423,9 @@ var MoonUIalertVariantsPro = cva(
|
|
|
2423
2423
|
}
|
|
2424
2424
|
}
|
|
2425
2425
|
);
|
|
2426
|
-
var MoonUIAlertPro =
|
|
2426
|
+
var MoonUIAlertPro = React67.forwardRef(
|
|
2427
2427
|
({ className, variant = "default", size: size4, radius, hideIcon = false, closable = false, onClose, children, ...props }, ref) => {
|
|
2428
|
-
const MoonUIIconPro =
|
|
2428
|
+
const MoonUIIconPro = React67.useMemo(() => {
|
|
2429
2429
|
switch (variant) {
|
|
2430
2430
|
case "success":
|
|
2431
2431
|
return Check;
|
|
@@ -2464,7 +2464,7 @@ var MoonUIAlertPro = React60.forwardRef(
|
|
|
2464
2464
|
}
|
|
2465
2465
|
);
|
|
2466
2466
|
MoonUIAlertPro.displayName = "AlertPro";
|
|
2467
|
-
var MoonUIAlertTitlePro =
|
|
2467
|
+
var MoonUIAlertTitlePro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2468
2468
|
"h5",
|
|
2469
2469
|
{
|
|
2470
2470
|
ref,
|
|
@@ -2473,7 +2473,7 @@ var MoonUIAlertTitlePro = React60.forwardRef(({ className, ...props }, ref) => /
|
|
|
2473
2473
|
}
|
|
2474
2474
|
));
|
|
2475
2475
|
MoonUIAlertTitlePro.displayName = "AlertTitlePro";
|
|
2476
|
-
var MoonUIAlertDescriptionPro =
|
|
2476
|
+
var MoonUIAlertDescriptionPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2477
2477
|
"div",
|
|
2478
2478
|
{
|
|
2479
2479
|
ref,
|
|
@@ -2537,7 +2537,7 @@ var MoonUIaspectRatioVariantsPro = cva(
|
|
|
2537
2537
|
}
|
|
2538
2538
|
}
|
|
2539
2539
|
);
|
|
2540
|
-
var MoonUIAspectRatioPro =
|
|
2540
|
+
var MoonUIAspectRatioPro = React67.forwardRef(({
|
|
2541
2541
|
className,
|
|
2542
2542
|
variant,
|
|
2543
2543
|
radius,
|
|
@@ -2555,12 +2555,12 @@ var MoonUIAspectRatioPro = React60.forwardRef(({
|
|
|
2555
2555
|
children,
|
|
2556
2556
|
...props
|
|
2557
2557
|
}, ref) => {
|
|
2558
|
-
const [currentRatio, setCurrentRatio] =
|
|
2558
|
+
const [currentRatio, setCurrentRatio] = React67.useState(() => {
|
|
2559
2559
|
if (preset)
|
|
2560
2560
|
return PRESET_RATIOS[preset];
|
|
2561
2561
|
return ratio;
|
|
2562
2562
|
});
|
|
2563
|
-
|
|
2563
|
+
React67.useEffect(() => {
|
|
2564
2564
|
const newRatio = preset ? PRESET_RATIOS[preset] : ratio;
|
|
2565
2565
|
if (smoothTransition) {
|
|
2566
2566
|
setCurrentRatio(newRatio);
|
|
@@ -2568,7 +2568,7 @@ var MoonUIAspectRatioPro = React60.forwardRef(({
|
|
|
2568
2568
|
setCurrentRatio(newRatio);
|
|
2569
2569
|
}
|
|
2570
2570
|
}, [preset, ratio, smoothTransition]);
|
|
2571
|
-
|
|
2571
|
+
React67.useEffect(() => {
|
|
2572
2572
|
if (!responsive)
|
|
2573
2573
|
return;
|
|
2574
2574
|
const handleResize = () => {
|
|
@@ -2657,7 +2657,7 @@ var moonUIAvatarVariantsPro = cva(
|
|
|
2657
2657
|
}
|
|
2658
2658
|
}
|
|
2659
2659
|
);
|
|
2660
|
-
var MoonUIAvatarPro =
|
|
2660
|
+
var MoonUIAvatarPro = React67.forwardRef(({ className, size: size4, radius, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2661
2661
|
AvatarPrimitive.Root,
|
|
2662
2662
|
{
|
|
2663
2663
|
ref,
|
|
@@ -2666,7 +2666,7 @@ var MoonUIAvatarPro = React60.forwardRef(({ className, size: size4, radius, vari
|
|
|
2666
2666
|
}
|
|
2667
2667
|
));
|
|
2668
2668
|
MoonUIAvatarPro.displayName = AvatarPrimitive.Root.displayName;
|
|
2669
|
-
var MoonUIAvatarImagePro =
|
|
2669
|
+
var MoonUIAvatarImagePro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2670
2670
|
AvatarPrimitive.Image,
|
|
2671
2671
|
{
|
|
2672
2672
|
ref,
|
|
@@ -2675,7 +2675,7 @@ var MoonUIAvatarImagePro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
2675
2675
|
}
|
|
2676
2676
|
));
|
|
2677
2677
|
MoonUIAvatarImagePro.displayName = AvatarPrimitive.Image.displayName;
|
|
2678
|
-
var MoonUIAvatarFallbackPro =
|
|
2678
|
+
var MoonUIAvatarFallbackPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2679
2679
|
AvatarPrimitive.Fallback,
|
|
2680
2680
|
{
|
|
2681
2681
|
ref,
|
|
@@ -2687,9 +2687,9 @@ var MoonUIAvatarFallbackPro = React60.forwardRef(({ className, ...props }, ref)
|
|
|
2687
2687
|
}
|
|
2688
2688
|
));
|
|
2689
2689
|
MoonUIAvatarFallbackPro.displayName = AvatarPrimitive.Fallback.displayName;
|
|
2690
|
-
var MoonUIAvatarGroupPro =
|
|
2690
|
+
var MoonUIAvatarGroupPro = React67.forwardRef(
|
|
2691
2691
|
({ className, max: max2 = 3, size: size4 = "md", children, overlapOffset, ...props }, ref) => {
|
|
2692
|
-
const childrenArray =
|
|
2692
|
+
const childrenArray = React67.Children.toArray(children);
|
|
2693
2693
|
const visibleChildren = max2 ? childrenArray.slice(0, max2) : childrenArray;
|
|
2694
2694
|
const remainingCount = max2 ? Math.max(0, childrenArray.length - max2) : 0;
|
|
2695
2695
|
const defaultOffsets = {
|
|
@@ -2716,7 +2716,7 @@ var MoonUIAvatarGroupPro = React60.forwardRef(
|
|
|
2716
2716
|
marginLeft: index2 === 0 ? 0 : `${finalOffset}px`,
|
|
2717
2717
|
zIndex: visibleChildren.length - index2
|
|
2718
2718
|
},
|
|
2719
|
-
children:
|
|
2719
|
+
children: React67.isValidElement(child) && child.type === MoonUIAvatarPro ? React67.cloneElement(child, { size: size4 }) : child
|
|
2720
2720
|
},
|
|
2721
2721
|
index2
|
|
2722
2722
|
)),
|
|
@@ -2921,7 +2921,7 @@ var MoonUIbreadcrumbVariantsPro = cva(
|
|
|
2921
2921
|
}
|
|
2922
2922
|
}
|
|
2923
2923
|
);
|
|
2924
|
-
var MoonUIBreadcrumbPro =
|
|
2924
|
+
var MoonUIBreadcrumbPro = React67.forwardRef(
|
|
2925
2925
|
({ className, variant, size: size4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2926
2926
|
"nav",
|
|
2927
2927
|
{
|
|
@@ -2933,9 +2933,9 @@ var MoonUIBreadcrumbPro = React60.forwardRef(
|
|
|
2933
2933
|
)
|
|
2934
2934
|
);
|
|
2935
2935
|
MoonUIBreadcrumbPro.displayName = "BreadcrumbPro";
|
|
2936
|
-
var MoonUIBreadcrumbListPro =
|
|
2936
|
+
var MoonUIBreadcrumbListPro = React67.forwardRef(
|
|
2937
2937
|
({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
|
|
2938
|
-
const MoonUIchildrenArrayPro =
|
|
2938
|
+
const MoonUIchildrenArrayPro = React67.Children.toArray(props.children).filter(Boolean);
|
|
2939
2939
|
const MoonUIchildCountPro = MoonUIchildrenArrayPro.length;
|
|
2940
2940
|
if (collapsed && MoonUIchildCountPro > collapsedWidth) {
|
|
2941
2941
|
const MoonUIfirstItemPro = MoonUIchildrenArrayPro[0];
|
|
@@ -2971,9 +2971,9 @@ var MoonUIBreadcrumbListPro = React60.forwardRef(
|
|
|
2971
2971
|
}
|
|
2972
2972
|
);
|
|
2973
2973
|
MoonUIBreadcrumbListPro.displayName = "BreadcrumbListPro";
|
|
2974
|
-
var MoonUIBreadcrumbItemPro =
|
|
2974
|
+
var MoonUIBreadcrumbItemPro = React67.forwardRef(
|
|
2975
2975
|
({ className, isCurrent, href, asChild = false, ...props }, ref) => {
|
|
2976
|
-
const MoonUICompPro = asChild ?
|
|
2976
|
+
const MoonUICompPro = asChild ? React67.Fragment : href ? "a" : "span";
|
|
2977
2977
|
const MoonUIitemPropsPro = asChild ? {} : href ? { href } : {};
|
|
2978
2978
|
return /* @__PURE__ */ jsx(
|
|
2979
2979
|
"li",
|
|
@@ -3030,7 +3030,7 @@ var MoonUIBreadcrumbEllipsisPro = ({
|
|
|
3030
3030
|
}
|
|
3031
3031
|
);
|
|
3032
3032
|
MoonUIBreadcrumbEllipsisPro.displayName = "BreadcrumbEllipsisPro";
|
|
3033
|
-
var MoonUIBreadcrumbLinkPro =
|
|
3033
|
+
var MoonUIBreadcrumbLinkPro = React67.forwardRef(
|
|
3034
3034
|
({ className, href, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3035
3035
|
"a",
|
|
3036
3036
|
{
|
|
@@ -3045,7 +3045,7 @@ var MoonUIBreadcrumbLinkPro = React60.forwardRef(
|
|
|
3045
3045
|
)
|
|
3046
3046
|
);
|
|
3047
3047
|
MoonUIBreadcrumbLinkPro.displayName = "BreadcrumbLinkPro";
|
|
3048
|
-
var MoonUIBreadcrumbPagePro =
|
|
3048
|
+
var MoonUIBreadcrumbPagePro = React67.forwardRef(
|
|
3049
3049
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3050
3050
|
"span",
|
|
3051
3051
|
{
|
|
@@ -3208,7 +3208,7 @@ var moonUIButtonProVariants = cva(
|
|
|
3208
3208
|
}
|
|
3209
3209
|
}
|
|
3210
3210
|
);
|
|
3211
|
-
var MoonUIButtonPro =
|
|
3211
|
+
var MoonUIButtonPro = React67.forwardRef(
|
|
3212
3212
|
({
|
|
3213
3213
|
className,
|
|
3214
3214
|
variant,
|
|
@@ -3267,7 +3267,7 @@ function Calendar({
|
|
|
3267
3267
|
return selected;
|
|
3268
3268
|
return /* @__PURE__ */ new Date();
|
|
3269
3269
|
};
|
|
3270
|
-
const [currentMonth, setCurrentMonth] =
|
|
3270
|
+
const [currentMonth, setCurrentMonth] = React67.useState(getInitialMonth());
|
|
3271
3271
|
const weekDays = [
|
|
3272
3272
|
{ short: "S", full: "Sunday" },
|
|
3273
3273
|
{ short: "M", full: "Monday" },
|
|
@@ -3657,7 +3657,7 @@ var moonUICardVariantsPro = cva(
|
|
|
3657
3657
|
}
|
|
3658
3658
|
}
|
|
3659
3659
|
);
|
|
3660
|
-
var MoonUICardPro =
|
|
3660
|
+
var MoonUICardPro = React67.forwardRef(
|
|
3661
3661
|
({
|
|
3662
3662
|
className,
|
|
3663
3663
|
variant,
|
|
@@ -3674,8 +3674,8 @@ var MoonUICardPro = React60.forwardRef(
|
|
|
3674
3674
|
asChild,
|
|
3675
3675
|
...props
|
|
3676
3676
|
}, ref) => {
|
|
3677
|
-
const [mousePos, setMousePos] =
|
|
3678
|
-
const [isHovered, setIsHovered] =
|
|
3677
|
+
const [mousePos, setMousePos] = React67.useState({ x: 0, y: 0 });
|
|
3678
|
+
const [isHovered, setIsHovered] = React67.useState(false);
|
|
3679
3679
|
const handleMouseMove2 = (e) => {
|
|
3680
3680
|
if (!enableTilt && !enableParallax)
|
|
3681
3681
|
return;
|
|
@@ -3735,7 +3735,7 @@ var MoonUICardPro = React60.forwardRef(
|
|
|
3735
3735
|
}
|
|
3736
3736
|
);
|
|
3737
3737
|
MoonUICardPro.displayName = "MoonUICardPro";
|
|
3738
|
-
var MoonUICardHeaderPro =
|
|
3738
|
+
var MoonUICardHeaderPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3739
3739
|
"div",
|
|
3740
3740
|
{
|
|
3741
3741
|
ref,
|
|
@@ -3744,7 +3744,7 @@ var MoonUICardHeaderPro = React60.forwardRef(({ className, ...props }, ref) => /
|
|
|
3744
3744
|
}
|
|
3745
3745
|
));
|
|
3746
3746
|
MoonUICardHeaderPro.displayName = "MoonUICardHeaderPro";
|
|
3747
|
-
var MoonUICardTitlePro =
|
|
3747
|
+
var MoonUICardTitlePro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3748
3748
|
"h3",
|
|
3749
3749
|
{
|
|
3750
3750
|
ref,
|
|
@@ -3753,7 +3753,7 @@ var MoonUICardTitlePro = React60.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3753
3753
|
}
|
|
3754
3754
|
));
|
|
3755
3755
|
MoonUICardTitlePro.displayName = "MoonUICardTitlePro";
|
|
3756
|
-
var MoonUICardDescriptionPro =
|
|
3756
|
+
var MoonUICardDescriptionPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3757
3757
|
"p",
|
|
3758
3758
|
{
|
|
3759
3759
|
ref,
|
|
@@ -3762,9 +3762,9 @@ var MoonUICardDescriptionPro = React60.forwardRef(({ className, ...props }, ref)
|
|
|
3762
3762
|
}
|
|
3763
3763
|
));
|
|
3764
3764
|
MoonUICardDescriptionPro.displayName = "MoonUICardDescriptionPro";
|
|
3765
|
-
var MoonUICardContentPro =
|
|
3765
|
+
var MoonUICardContentPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("pt-0", className), ...props }));
|
|
3766
3766
|
MoonUICardContentPro.displayName = "MoonUICardContentPro";
|
|
3767
|
-
var MoonUICardFooterPro =
|
|
3767
|
+
var MoonUICardFooterPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3768
3768
|
"div",
|
|
3769
3769
|
{
|
|
3770
3770
|
ref,
|
|
@@ -3811,7 +3811,7 @@ var moonUICheckboxVariantsPro = cva(
|
|
|
3811
3811
|
}
|
|
3812
3812
|
}
|
|
3813
3813
|
);
|
|
3814
|
-
var MoonUICheckboxPro =
|
|
3814
|
+
var MoonUICheckboxPro = React67.forwardRef(({
|
|
3815
3815
|
className,
|
|
3816
3816
|
variant,
|
|
3817
3817
|
size: size4,
|
|
@@ -3822,8 +3822,8 @@ var MoonUICheckboxPro = React60.forwardRef(({
|
|
|
3822
3822
|
checked,
|
|
3823
3823
|
...props
|
|
3824
3824
|
}, ref) => {
|
|
3825
|
-
const [isIndeterminate, setIsIndeterminate] =
|
|
3826
|
-
|
|
3825
|
+
const [isIndeterminate, setIsIndeterminate] = React67.useState(indeterminate);
|
|
3826
|
+
React67.useEffect(() => {
|
|
3827
3827
|
setIsIndeterminate(indeterminate);
|
|
3828
3828
|
}, [indeterminate]);
|
|
3829
3829
|
const effectiveChecked = isIndeterminate ? false : checked;
|
|
@@ -3848,7 +3848,7 @@ var MoonUICheckboxPro = React60.forwardRef(({
|
|
|
3848
3848
|
);
|
|
3849
3849
|
});
|
|
3850
3850
|
MoonUICheckboxPro.displayName = CheckboxPrimitive.Root.displayName;
|
|
3851
|
-
var MoonUICheckboxGroupPro =
|
|
3851
|
+
var MoonUICheckboxGroupPro = React67.forwardRef(
|
|
3852
3852
|
({ className, orientation = "vertical", spacing = "1rem", children, ...props }, ref) => {
|
|
3853
3853
|
return /* @__PURE__ */ jsx(
|
|
3854
3854
|
"div",
|
|
@@ -3868,7 +3868,7 @@ var MoonUICheckboxGroupPro = React60.forwardRef(
|
|
|
3868
3868
|
}
|
|
3869
3869
|
);
|
|
3870
3870
|
MoonUICheckboxGroupPro.displayName = "CheckboxGroup";
|
|
3871
|
-
var MoonUICheckboxLabelPro =
|
|
3871
|
+
var MoonUICheckboxLabelPro = React67.forwardRef(
|
|
3872
3872
|
({ className, htmlFor, children, position = "end", disabled = false, ...props }, ref) => {
|
|
3873
3873
|
return /* @__PURE__ */ jsx(
|
|
3874
3874
|
"label",
|
|
@@ -3888,14 +3888,14 @@ var MoonUICheckboxLabelPro = React60.forwardRef(
|
|
|
3888
3888
|
}
|
|
3889
3889
|
);
|
|
3890
3890
|
MoonUICheckboxLabelPro.displayName = "CheckboxLabel";
|
|
3891
|
-
var MoonUICheckboxWithLabelPro =
|
|
3891
|
+
var MoonUICheckboxWithLabelPro = React67.forwardRef(({
|
|
3892
3892
|
id,
|
|
3893
3893
|
label,
|
|
3894
3894
|
labelPosition = "end",
|
|
3895
3895
|
labelClassName,
|
|
3896
3896
|
...checkboxProps
|
|
3897
3897
|
}, ref) => {
|
|
3898
|
-
const generatedId =
|
|
3898
|
+
const generatedId = React67.useId();
|
|
3899
3899
|
const checkboxId = id || generatedId;
|
|
3900
3900
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
3901
3901
|
labelPosition === "start" && /* @__PURE__ */ jsx(
|
|
@@ -3923,7 +3923,7 @@ var MoonUICheckboxWithLabelPro = React60.forwardRef(({
|
|
|
3923
3923
|
});
|
|
3924
3924
|
MoonUICheckboxWithLabelPro.displayName = "CheckboxWithLabel";
|
|
3925
3925
|
|
|
3926
|
-
//
|
|
3926
|
+
// node_modules/@radix-ui/primitive/dist/index.mjs
|
|
3927
3927
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
3928
3928
|
return function handleEvent(event) {
|
|
3929
3929
|
originalEventHandler?.(event);
|
|
@@ -3935,19 +3935,19 @@ function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForD
|
|
|
3935
3935
|
function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
3936
3936
|
let defaultContexts = [];
|
|
3937
3937
|
function createContext32(rootComponentName, defaultContext) {
|
|
3938
|
-
const BaseContext =
|
|
3938
|
+
const BaseContext = React67.createContext(defaultContext);
|
|
3939
3939
|
const index2 = defaultContexts.length;
|
|
3940
3940
|
defaultContexts = [...defaultContexts, defaultContext];
|
|
3941
3941
|
const Provider3 = (props) => {
|
|
3942
3942
|
const { scope, children, ...context } = props;
|
|
3943
3943
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
3944
|
-
const value =
|
|
3944
|
+
const value = React67.useMemo(() => context, Object.values(context));
|
|
3945
3945
|
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
3946
3946
|
};
|
|
3947
3947
|
Provider3.displayName = rootComponentName + "Provider";
|
|
3948
3948
|
function useContext23(consumerName, scope) {
|
|
3949
3949
|
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
3950
|
-
const context =
|
|
3950
|
+
const context = React67.useContext(Context);
|
|
3951
3951
|
if (context)
|
|
3952
3952
|
return context;
|
|
3953
3953
|
if (defaultContext !== void 0)
|
|
@@ -3958,11 +3958,11 @@ function createContextScope(scopeName, createContextScopeDeps = []) {
|
|
|
3958
3958
|
}
|
|
3959
3959
|
const createScope = () => {
|
|
3960
3960
|
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
3961
|
-
return
|
|
3961
|
+
return React67.createContext(defaultContext);
|
|
3962
3962
|
});
|
|
3963
3963
|
return function useScope(scope) {
|
|
3964
3964
|
const contexts = scope?.[scopeName] || scopeContexts;
|
|
3965
|
-
return
|
|
3965
|
+
return React67.useMemo(
|
|
3966
3966
|
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
3967
3967
|
[scope, contexts]
|
|
3968
3968
|
);
|
|
@@ -3986,15 +3986,15 @@ function composeContextScopes(...scopes) {
|
|
|
3986
3986
|
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
3987
3987
|
return { ...nextScopes2, ...currentScope };
|
|
3988
3988
|
}, {});
|
|
3989
|
-
return
|
|
3989
|
+
return React67.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
3990
3990
|
};
|
|
3991
3991
|
};
|
|
3992
3992
|
createScope.scopeName = baseScope.scopeName;
|
|
3993
3993
|
return createScope;
|
|
3994
3994
|
}
|
|
3995
|
-
var useLayoutEffect2 = globalThis?.document ?
|
|
3995
|
+
var useLayoutEffect2 = globalThis?.document ? React67.useLayoutEffect : () => {
|
|
3996
3996
|
};
|
|
3997
|
-
var useInsertionEffect =
|
|
3997
|
+
var useInsertionEffect = React67[" useInsertionEffect ".trim().toString()] || useLayoutEffect2;
|
|
3998
3998
|
function useControllableState({
|
|
3999
3999
|
prop,
|
|
4000
4000
|
defaultProp,
|
|
@@ -4009,8 +4009,8 @@ function useControllableState({
|
|
|
4009
4009
|
const isControlled = prop !== void 0;
|
|
4010
4010
|
const value = isControlled ? prop : uncontrolledProp;
|
|
4011
4011
|
{
|
|
4012
|
-
const isControlledRef =
|
|
4013
|
-
|
|
4012
|
+
const isControlledRef = React67.useRef(prop !== void 0);
|
|
4013
|
+
React67.useEffect(() => {
|
|
4014
4014
|
const wasControlled = isControlledRef.current;
|
|
4015
4015
|
if (wasControlled !== isControlled) {
|
|
4016
4016
|
const from2 = wasControlled ? "controlled" : "uncontrolled";
|
|
@@ -4022,7 +4022,7 @@ function useControllableState({
|
|
|
4022
4022
|
isControlledRef.current = isControlled;
|
|
4023
4023
|
}, [isControlled, caller]);
|
|
4024
4024
|
}
|
|
4025
|
-
const setValue =
|
|
4025
|
+
const setValue = React67.useCallback(
|
|
4026
4026
|
(nextValue) => {
|
|
4027
4027
|
if (isControlled) {
|
|
4028
4028
|
const value2 = isFunction(nextValue) ? nextValue(prop) : nextValue;
|
|
@@ -4041,13 +4041,13 @@ function useUncontrolledState({
|
|
|
4041
4041
|
defaultProp,
|
|
4042
4042
|
onChange
|
|
4043
4043
|
}) {
|
|
4044
|
-
const [value, setValue] =
|
|
4045
|
-
const prevValueRef =
|
|
4046
|
-
const onChangeRef =
|
|
4044
|
+
const [value, setValue] = React67.useState(defaultProp);
|
|
4045
|
+
const prevValueRef = React67.useRef(value);
|
|
4046
|
+
const onChangeRef = React67.useRef(onChange);
|
|
4047
4047
|
useInsertionEffect(() => {
|
|
4048
4048
|
onChangeRef.current = onChange;
|
|
4049
4049
|
}, [onChange]);
|
|
4050
|
-
|
|
4050
|
+
React67.useEffect(() => {
|
|
4051
4051
|
if (prevValueRef.current !== value) {
|
|
4052
4052
|
onChangeRef.current?.(value);
|
|
4053
4053
|
prevValueRef.current = value;
|
|
@@ -4090,7 +4090,7 @@ function composeRefs(...refs) {
|
|
|
4090
4090
|
};
|
|
4091
4091
|
}
|
|
4092
4092
|
function useComposedRefs(...refs) {
|
|
4093
|
-
return
|
|
4093
|
+
return React67.useCallback(composeRefs(...refs), refs);
|
|
4094
4094
|
}
|
|
4095
4095
|
var NODES = [
|
|
4096
4096
|
"a",
|
|
@@ -4113,7 +4113,7 @@ var NODES = [
|
|
|
4113
4113
|
];
|
|
4114
4114
|
var Primitive = NODES.reduce((primitive, node) => {
|
|
4115
4115
|
const Slot = createSlot(`Primitive.${node}`);
|
|
4116
|
-
const Node4 =
|
|
4116
|
+
const Node4 = React67.forwardRef((props, forwardedRef) => {
|
|
4117
4117
|
const { asChild, ...primitiveProps } = props;
|
|
4118
4118
|
const Comp = asChild ? Slot : node;
|
|
4119
4119
|
if (typeof window !== "undefined") {
|
|
@@ -4124,12 +4124,8 @@ var Primitive = NODES.reduce((primitive, node) => {
|
|
|
4124
4124
|
Node4.displayName = `Primitive.${node}`;
|
|
4125
4125
|
return { ...primitive, [node]: Node4 };
|
|
4126
4126
|
}, {});
|
|
4127
|
-
function dispatchDiscreteCustomEvent(target, event) {
|
|
4128
|
-
if (target)
|
|
4129
|
-
ReactDOM.flushSync(() => target.dispatchEvent(event));
|
|
4130
|
-
}
|
|
4131
4127
|
function useStateMachine(initialState, machine) {
|
|
4132
|
-
return
|
|
4128
|
+
return React67.useReducer((state, event) => {
|
|
4133
4129
|
const nextState = machine[state][event];
|
|
4134
4130
|
return nextState ?? state;
|
|
4135
4131
|
}, initialState);
|
|
@@ -4137,17 +4133,17 @@ function useStateMachine(initialState, machine) {
|
|
|
4137
4133
|
var Presence = (props) => {
|
|
4138
4134
|
const { present, children } = props;
|
|
4139
4135
|
const presence = usePresence(present);
|
|
4140
|
-
const child = typeof children === "function" ? children({ present: presence.isPresent }) :
|
|
4136
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React67.Children.only(children);
|
|
4141
4137
|
const ref = useComposedRefs(presence.ref, getElementRef(child));
|
|
4142
4138
|
const forceMount = typeof children === "function";
|
|
4143
|
-
return forceMount || presence.isPresent ?
|
|
4139
|
+
return forceMount || presence.isPresent ? React67.cloneElement(child, { ref }) : null;
|
|
4144
4140
|
};
|
|
4145
4141
|
Presence.displayName = "Presence";
|
|
4146
4142
|
function usePresence(present) {
|
|
4147
|
-
const [node, setNode2] =
|
|
4148
|
-
const stylesRef =
|
|
4149
|
-
const prevPresentRef =
|
|
4150
|
-
const prevAnimationNameRef =
|
|
4143
|
+
const [node, setNode2] = React67.useState();
|
|
4144
|
+
const stylesRef = React67.useRef(null);
|
|
4145
|
+
const prevPresentRef = React67.useRef(present);
|
|
4146
|
+
const prevAnimationNameRef = React67.useRef("none");
|
|
4151
4147
|
const initialState = present ? "mounted" : "unmounted";
|
|
4152
4148
|
const [state, send] = useStateMachine(initialState, {
|
|
4153
4149
|
mounted: {
|
|
@@ -4162,7 +4158,7 @@ function usePresence(present) {
|
|
|
4162
4158
|
MOUNT: "mounted"
|
|
4163
4159
|
}
|
|
4164
4160
|
});
|
|
4165
|
-
|
|
4161
|
+
React67.useEffect(() => {
|
|
4166
4162
|
const currentAnimationName = getAnimationName(stylesRef.current);
|
|
4167
4163
|
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
4168
4164
|
}, [state]);
|
|
@@ -4228,7 +4224,7 @@ function usePresence(present) {
|
|
|
4228
4224
|
}, [node, send]);
|
|
4229
4225
|
return {
|
|
4230
4226
|
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
4231
|
-
ref:
|
|
4227
|
+
ref: React67.useCallback((node2) => {
|
|
4232
4228
|
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
4233
4229
|
setNode2(node2);
|
|
4234
4230
|
}, [])
|
|
@@ -4250,10 +4246,10 @@ function getElementRef(element) {
|
|
|
4250
4246
|
}
|
|
4251
4247
|
return element.props.ref || element.ref;
|
|
4252
4248
|
}
|
|
4253
|
-
var useReactId =
|
|
4249
|
+
var useReactId = React67[" useId ".trim().toString()] || (() => void 0);
|
|
4254
4250
|
var count = 0;
|
|
4255
4251
|
function useId2(deterministicId) {
|
|
4256
|
-
const [id, setId] =
|
|
4252
|
+
const [id, setId] = React67.useState(useReactId());
|
|
4257
4253
|
useLayoutEffect2(() => {
|
|
4258
4254
|
if (!deterministicId)
|
|
4259
4255
|
setId((reactId) => reactId ?? String(count++));
|
|
@@ -4263,7 +4259,7 @@ function useId2(deterministicId) {
|
|
|
4263
4259
|
var COLLAPSIBLE_NAME = "Collapsible";
|
|
4264
4260
|
var [createCollapsibleContext, createCollapsibleScope] = createContextScope(COLLAPSIBLE_NAME);
|
|
4265
4261
|
var [CollapsibleProvider, useCollapsibleContext] = createCollapsibleContext(COLLAPSIBLE_NAME);
|
|
4266
|
-
var Collapsible =
|
|
4262
|
+
var Collapsible = React67.forwardRef(
|
|
4267
4263
|
(props, forwardedRef) => {
|
|
4268
4264
|
const {
|
|
4269
4265
|
__scopeCollapsible,
|
|
@@ -4286,7 +4282,7 @@ var Collapsible = React60.forwardRef(
|
|
|
4286
4282
|
disabled,
|
|
4287
4283
|
contentId: useId2(),
|
|
4288
4284
|
open,
|
|
4289
|
-
onOpenToggle:
|
|
4285
|
+
onOpenToggle: React67.useCallback(() => setOpen((prevOpen) => !prevOpen), [setOpen]),
|
|
4290
4286
|
children: /* @__PURE__ */ jsx(
|
|
4291
4287
|
Primitive.div,
|
|
4292
4288
|
{
|
|
@@ -4302,7 +4298,7 @@ var Collapsible = React60.forwardRef(
|
|
|
4302
4298
|
);
|
|
4303
4299
|
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
4304
4300
|
var TRIGGER_NAME = "CollapsibleTrigger";
|
|
4305
|
-
var CollapsibleTrigger =
|
|
4301
|
+
var CollapsibleTrigger = React67.forwardRef(
|
|
4306
4302
|
(props, forwardedRef) => {
|
|
4307
4303
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
4308
4304
|
const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);
|
|
@@ -4324,7 +4320,7 @@ var CollapsibleTrigger = React60.forwardRef(
|
|
|
4324
4320
|
);
|
|
4325
4321
|
CollapsibleTrigger.displayName = TRIGGER_NAME;
|
|
4326
4322
|
var CONTENT_NAME = "CollapsibleContent";
|
|
4327
|
-
var CollapsibleContent =
|
|
4323
|
+
var CollapsibleContent = React67.forwardRef(
|
|
4328
4324
|
(props, forwardedRef) => {
|
|
4329
4325
|
const { forceMount, ...contentProps } = props;
|
|
4330
4326
|
const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);
|
|
@@ -4332,20 +4328,20 @@ var CollapsibleContent = React60.forwardRef(
|
|
|
4332
4328
|
}
|
|
4333
4329
|
);
|
|
4334
4330
|
CollapsibleContent.displayName = CONTENT_NAME;
|
|
4335
|
-
var CollapsibleContentImpl =
|
|
4331
|
+
var CollapsibleContentImpl = React67.forwardRef((props, forwardedRef) => {
|
|
4336
4332
|
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
4337
4333
|
const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);
|
|
4338
|
-
const [isPresent, setIsPresent] =
|
|
4339
|
-
const ref =
|
|
4334
|
+
const [isPresent, setIsPresent] = React67.useState(present);
|
|
4335
|
+
const ref = React67.useRef(null);
|
|
4340
4336
|
const composedRefs = useComposedRefs(forwardedRef, ref);
|
|
4341
|
-
const heightRef =
|
|
4337
|
+
const heightRef = React67.useRef(0);
|
|
4342
4338
|
const height = heightRef.current;
|
|
4343
|
-
const widthRef =
|
|
4339
|
+
const widthRef = React67.useRef(0);
|
|
4344
4340
|
const width = widthRef.current;
|
|
4345
4341
|
const isOpen = context.open || isPresent;
|
|
4346
|
-
const isMountAnimationPreventedRef =
|
|
4347
|
-
const originalStylesRef =
|
|
4348
|
-
|
|
4342
|
+
const isMountAnimationPreventedRef = React67.useRef(isOpen);
|
|
4343
|
+
const originalStylesRef = React67.useRef(void 0);
|
|
4344
|
+
React67.useEffect(() => {
|
|
4349
4345
|
const rAF = requestAnimationFrame(() => isMountAnimationPreventedRef.current = false);
|
|
4350
4346
|
return () => cancelAnimationFrame(rAF);
|
|
4351
4347
|
}, []);
|
|
@@ -4392,7 +4388,7 @@ function getState(open) {
|
|
|
4392
4388
|
var Root4 = Collapsible;
|
|
4393
4389
|
var Trigger2 = CollapsibleTrigger;
|
|
4394
4390
|
var Content2 = CollapsibleContent;
|
|
4395
|
-
var MoonUICollapsiblePro =
|
|
4391
|
+
var MoonUICollapsiblePro = React67.forwardRef(({
|
|
4396
4392
|
className,
|
|
4397
4393
|
variant = "default",
|
|
4398
4394
|
size: size4 = "md",
|
|
@@ -4412,7 +4408,7 @@ var MoonUICollapsiblePro = React60.forwardRef(({
|
|
|
4412
4408
|
children,
|
|
4413
4409
|
disabled
|
|
4414
4410
|
}, ref) => {
|
|
4415
|
-
const [localOpen, setLocalOpen] =
|
|
4411
|
+
const [localOpen, setLocalOpen] = React67.useState(() => {
|
|
4416
4412
|
if (persistKey && typeof window !== "undefined") {
|
|
4417
4413
|
const stored = localStorage.getItem(`collapsible-${persistKey}`);
|
|
4418
4414
|
if (stored !== null) {
|
|
@@ -4421,9 +4417,9 @@ var MoonUICollapsiblePro = React60.forwardRef(({
|
|
|
4421
4417
|
}
|
|
4422
4418
|
return defaultOpen || false;
|
|
4423
4419
|
});
|
|
4424
|
-
const [hasBeenOpened, setHasBeenOpened] =
|
|
4420
|
+
const [hasBeenOpened, setHasBeenOpened] = React67.useState(!lazy);
|
|
4425
4421
|
const isOpen = controlledOpen !== void 0 ? controlledOpen : localOpen;
|
|
4426
|
-
const handleOpenChange =
|
|
4422
|
+
const handleOpenChange = React67.useCallback((open) => {
|
|
4427
4423
|
if (!loading) {
|
|
4428
4424
|
setLocalOpen(open);
|
|
4429
4425
|
onOpenChange?.(open);
|
|
@@ -4443,7 +4439,7 @@ var MoonUICollapsiblePro = React60.forwardRef(({
|
|
|
4443
4439
|
}
|
|
4444
4440
|
}
|
|
4445
4441
|
}, [loading, onOpenChange, onToggleChange, persistKey, lazy, hasBeenOpened, autoCollapseAfter]);
|
|
4446
|
-
|
|
4442
|
+
React67.useEffect(() => {
|
|
4447
4443
|
if (shortcut) {
|
|
4448
4444
|
const handleKeyPress = (e) => {
|
|
4449
4445
|
const keys2 = shortcut.toLowerCase().split("+");
|
|
@@ -4540,7 +4536,7 @@ var MoonUICollapsiblePro = React60.forwardRef(({
|
|
|
4540
4536
|
] });
|
|
4541
4537
|
});
|
|
4542
4538
|
MoonUICollapsiblePro.displayName = "MoonUICollapsiblePro";
|
|
4543
|
-
var CollapsibleContext =
|
|
4539
|
+
var CollapsibleContext = React67.createContext({});
|
|
4544
4540
|
var collapsibleTriggerVariants = cva(
|
|
4545
4541
|
"flex w-full items-center gap-3 transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
4546
4542
|
{
|
|
@@ -4567,7 +4563,7 @@ var collapsibleTriggerVariants = cva(
|
|
|
4567
4563
|
}
|
|
4568
4564
|
}
|
|
4569
4565
|
);
|
|
4570
|
-
var MoonUICollapsibleTriggerPro =
|
|
4566
|
+
var MoonUICollapsibleTriggerPro = React67.forwardRef(({
|
|
4571
4567
|
className,
|
|
4572
4568
|
children,
|
|
4573
4569
|
variant: triggerVariant,
|
|
@@ -4582,7 +4578,7 @@ var MoonUICollapsibleTriggerPro = React60.forwardRef(({
|
|
|
4582
4578
|
status,
|
|
4583
4579
|
...props
|
|
4584
4580
|
}, ref) => {
|
|
4585
|
-
const { variant, size: size4, shortcut } =
|
|
4581
|
+
const { variant, size: size4, shortcut } = React67.useContext(CollapsibleContext);
|
|
4586
4582
|
const finalVariant = triggerVariant || variant || "default";
|
|
4587
4583
|
const finalSize = triggerSize || size4 || "md";
|
|
4588
4584
|
const statusIcon = status && {
|
|
@@ -4660,7 +4656,7 @@ var collapsibleContentVariants = cva(
|
|
|
4660
4656
|
}
|
|
4661
4657
|
}
|
|
4662
4658
|
);
|
|
4663
|
-
var MoonUICollapsibleContentPro =
|
|
4659
|
+
var MoonUICollapsibleContentPro = React67.forwardRef(({
|
|
4664
4660
|
className,
|
|
4665
4661
|
children,
|
|
4666
4662
|
variant: contentVariant,
|
|
@@ -4671,12 +4667,12 @@ var MoonUICollapsibleContentPro = React60.forwardRef(({
|
|
|
4671
4667
|
padding,
|
|
4672
4668
|
...props
|
|
4673
4669
|
}, ref) => {
|
|
4674
|
-
const { variant, size: size4, animationMode, lazy } =
|
|
4670
|
+
const { variant, size: size4, animationMode, lazy } = React67.useContext(CollapsibleContext);
|
|
4675
4671
|
const finalVariant = contentVariant || variant || "default";
|
|
4676
4672
|
const finalSize = contentSize || size4 || "md";
|
|
4677
|
-
const [dynamicContent, setDynamicContent] =
|
|
4678
|
-
const [isLoading, setIsLoading] =
|
|
4679
|
-
|
|
4673
|
+
const [dynamicContent, setDynamicContent] = React67.useState(null);
|
|
4674
|
+
const [isLoading, setIsLoading] = React67.useState(false);
|
|
4675
|
+
React67.useEffect(() => {
|
|
4680
4676
|
if (loadContent && !dynamicContent) {
|
|
4681
4677
|
setIsLoading(true);
|
|
4682
4678
|
loadContent().then(setDynamicContent).finally(() => setIsLoading(false));
|
|
@@ -4716,19 +4712,19 @@ var MoonUICollapsibleContentPro = React60.forwardRef(({
|
|
|
4716
4712
|
});
|
|
4717
4713
|
MoonUICollapsibleContentPro.displayName = "MoonUICollapsibleContentPro";
|
|
4718
4714
|
var useCollapsibleAnalytics = () => {
|
|
4719
|
-
const [analytics, setAnalytics] =
|
|
4715
|
+
const [analytics, setAnalytics] = React67.useState({
|
|
4720
4716
|
openCount: 0,
|
|
4721
4717
|
lastOpened: null,
|
|
4722
4718
|
totalTimeOpen: 0
|
|
4723
4719
|
});
|
|
4724
|
-
const trackOpen =
|
|
4720
|
+
const trackOpen = React67.useCallback(() => {
|
|
4725
4721
|
setAnalytics((prev) => ({
|
|
4726
4722
|
...prev,
|
|
4727
4723
|
openCount: prev.openCount + 1,
|
|
4728
4724
|
lastOpened: /* @__PURE__ */ new Date()
|
|
4729
4725
|
}));
|
|
4730
4726
|
}, []);
|
|
4731
|
-
const trackClose =
|
|
4727
|
+
const trackClose = React67.useCallback(() => {
|
|
4732
4728
|
setAnalytics((prev) => {
|
|
4733
4729
|
if (prev.lastOpened) {
|
|
4734
4730
|
const timeOpen = Date.now() - prev.lastOpened.getTime();
|
|
@@ -4863,7 +4859,7 @@ var overlayVariants = cva(
|
|
|
4863
4859
|
}
|
|
4864
4860
|
}
|
|
4865
4861
|
);
|
|
4866
|
-
var MoonUIDialogOverlayPro =
|
|
4862
|
+
var MoonUIDialogOverlayPro = React67.forwardRef(({ className, variant, blurAmount, animation, customBackdrop = false, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4867
4863
|
DialogPrimitive.Overlay,
|
|
4868
4864
|
{
|
|
4869
4865
|
ref,
|
|
@@ -4946,7 +4942,7 @@ var dialogContentVariants = cva(
|
|
|
4946
4942
|
}
|
|
4947
4943
|
}
|
|
4948
4944
|
);
|
|
4949
|
-
var MoonUIDialogContentPro =
|
|
4945
|
+
var MoonUIDialogContentPro = React67.forwardRef(
|
|
4950
4946
|
({
|
|
4951
4947
|
className,
|
|
4952
4948
|
children,
|
|
@@ -4975,7 +4971,7 @@ var MoonUIDialogContentPro = React60.forwardRef(
|
|
|
4975
4971
|
closeAnimation = true,
|
|
4976
4972
|
...props
|
|
4977
4973
|
}, ref) => {
|
|
4978
|
-
const [isClosing, setIsClosing] =
|
|
4974
|
+
const [isClosing, setIsClosing] = React67.useState(false);
|
|
4979
4975
|
const zIndex = 50 + stackLevel * 10;
|
|
4980
4976
|
const getConfirmationIcon = () => {
|
|
4981
4977
|
switch (confirmationType) {
|
|
@@ -5140,7 +5136,7 @@ var MoonUIDialogContentPro = React60.forwardRef(
|
|
|
5140
5136
|
};
|
|
5141
5137
|
const animationVariants2 = getAnimationVariants();
|
|
5142
5138
|
const displayIcon = confirmationType ? getConfirmationIcon() : icon;
|
|
5143
|
-
|
|
5139
|
+
React67.useEffect(() => {
|
|
5144
5140
|
if (typeof window !== "undefined" && true) {
|
|
5145
5141
|
console.log("\u{1F3AD} Dialog Animation Debug:", {
|
|
5146
5142
|
animation,
|
|
@@ -5293,7 +5289,7 @@ var MoonUIDialogFooterPro = ({
|
|
|
5293
5289
|
}
|
|
5294
5290
|
);
|
|
5295
5291
|
MoonUIDialogFooterPro.displayName = "MoonUIDialogFooterPro";
|
|
5296
|
-
var MoonUIDialogTitlePro =
|
|
5292
|
+
var MoonUIDialogTitlePro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5297
5293
|
DialogPrimitive.Title,
|
|
5298
5294
|
{
|
|
5299
5295
|
ref,
|
|
@@ -5305,7 +5301,7 @@ var MoonUIDialogTitlePro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
5305
5301
|
}
|
|
5306
5302
|
));
|
|
5307
5303
|
MoonUIDialogTitlePro.displayName = DialogPrimitive.Title.displayName;
|
|
5308
|
-
var MoonUIDialogDescriptionPro =
|
|
5304
|
+
var MoonUIDialogDescriptionPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5309
5305
|
DialogPrimitive.Description,
|
|
5310
5306
|
{
|
|
5311
5307
|
ref,
|
|
@@ -5317,7 +5313,7 @@ var MoonUIDialogDescriptionPro = React60.forwardRef(({ className, ...props }, re
|
|
|
5317
5313
|
}
|
|
5318
5314
|
));
|
|
5319
5315
|
MoonUIDialogDescriptionPro.displayName = DialogPrimitive.Description.displayName;
|
|
5320
|
-
var MoonUIDialogFormPro =
|
|
5316
|
+
var MoonUIDialogFormPro = React67.forwardRef(({ className, enableValidation = false, onSubmit, isSubmitting = false, ...props }, ref) => {
|
|
5321
5317
|
const handleSubmit = async (e) => {
|
|
5322
5318
|
e.preventDefault();
|
|
5323
5319
|
if (onSubmit && !isSubmitting) {
|
|
@@ -5367,7 +5363,7 @@ var tooltipVariants = cva(
|
|
|
5367
5363
|
);
|
|
5368
5364
|
var MoonUITooltipPro = TooltipPrimitive.Root;
|
|
5369
5365
|
var MoonUITooltipTriggerPro = TooltipPrimitive.Trigger;
|
|
5370
|
-
var MoonUITooltipArrowPro =
|
|
5366
|
+
var MoonUITooltipArrowPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5371
5367
|
TooltipPrimitive.Arrow,
|
|
5372
5368
|
{
|
|
5373
5369
|
ref,
|
|
@@ -5376,7 +5372,7 @@ var MoonUITooltipArrowPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
5376
5372
|
}
|
|
5377
5373
|
));
|
|
5378
5374
|
MoonUITooltipArrowPro.displayName = TooltipPrimitive.Arrow.displayName;
|
|
5379
|
-
var MoonUITooltipContentPro =
|
|
5375
|
+
var MoonUITooltipContentPro = React67.forwardRef(({ className, variant, size: size4, showArrow = false, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5380
5376
|
TooltipPrimitive.Content,
|
|
5381
5377
|
{
|
|
5382
5378
|
ref,
|
|
@@ -5390,7 +5386,7 @@ var MoonUITooltipContentPro = React60.forwardRef(({ className, variant, size: si
|
|
|
5390
5386
|
}
|
|
5391
5387
|
));
|
|
5392
5388
|
MoonUITooltipContentPro.displayName = TooltipPrimitive.Content.displayName;
|
|
5393
|
-
var MoonUISimpleTooltipPro =
|
|
5389
|
+
var MoonUISimpleTooltipPro = React67.forwardRef(
|
|
5394
5390
|
({
|
|
5395
5391
|
children,
|
|
5396
5392
|
content,
|
|
@@ -5510,7 +5506,7 @@ var moonUIInputVariantsPro = cva(
|
|
|
5510
5506
|
}
|
|
5511
5507
|
}
|
|
5512
5508
|
);
|
|
5513
|
-
var MoonUIInputPro =
|
|
5509
|
+
var MoonUIInputPro = React67.forwardRef(
|
|
5514
5510
|
({
|
|
5515
5511
|
className,
|
|
5516
5512
|
wrapperClassName,
|
|
@@ -5584,7 +5580,7 @@ MoonUIInputPro.displayName = "MoonUIInputPro";
|
|
|
5584
5580
|
var moonUILabelVariantsPro = cva(
|
|
5585
5581
|
"text-sm font-medium leading-none text-gray-900 dark:text-gray-200 peer-disabled:cursor-not-allowed peer-disabled:opacity-70 dark:peer-disabled:opacity-60 transition-colors duration-200"
|
|
5586
5582
|
);
|
|
5587
|
-
var MoonUILabelPro =
|
|
5583
|
+
var MoonUILabelPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5588
5584
|
LabelPrimitive.Root,
|
|
5589
5585
|
{
|
|
5590
5586
|
ref,
|
|
@@ -5597,7 +5593,7 @@ var MoonUISelectPro = SelectPrimitive.Root;
|
|
|
5597
5593
|
MoonUISelectPro.displayName = "MoonUISelectPro";
|
|
5598
5594
|
var MoonUISelectGroupPro = SelectPrimitive.Group;
|
|
5599
5595
|
var MoonUISelectValuePro = SelectPrimitive.Value;
|
|
5600
|
-
var MoonUISelectTriggerPro =
|
|
5596
|
+
var MoonUISelectTriggerPro = React67.forwardRef(({ className, children, variant = "standard", size: size4 = "md", error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5601
5597
|
SelectPrimitive.Trigger,
|
|
5602
5598
|
{
|
|
5603
5599
|
ref,
|
|
@@ -5639,7 +5635,7 @@ var MoonUISelectTriggerPro = React60.forwardRef(({ className, children, variant
|
|
|
5639
5635
|
}
|
|
5640
5636
|
));
|
|
5641
5637
|
MoonUISelectTriggerPro.displayName = SelectPrimitive.Trigger.displayName;
|
|
5642
|
-
var MoonUISelectScrollUpButtonPro =
|
|
5638
|
+
var MoonUISelectScrollUpButtonPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5643
5639
|
SelectPrimitive.ScrollUpButton,
|
|
5644
5640
|
{
|
|
5645
5641
|
ref,
|
|
@@ -5652,7 +5648,7 @@ var MoonUISelectScrollUpButtonPro = React60.forwardRef(({ className, ...props },
|
|
|
5652
5648
|
}
|
|
5653
5649
|
));
|
|
5654
5650
|
MoonUISelectScrollUpButtonPro.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
5655
|
-
var MoonUISelectScrollDownButtonPro =
|
|
5651
|
+
var MoonUISelectScrollDownButtonPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5656
5652
|
SelectPrimitive.ScrollDownButton,
|
|
5657
5653
|
{
|
|
5658
5654
|
ref,
|
|
@@ -5665,14 +5661,14 @@ var MoonUISelectScrollDownButtonPro = React60.forwardRef(({ className, ...props
|
|
|
5665
5661
|
}
|
|
5666
5662
|
));
|
|
5667
5663
|
MoonUISelectScrollDownButtonPro.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
5668
|
-
var MoonUISelectContentPro =
|
|
5669
|
-
const [searchValue, setSearchValue] =
|
|
5670
|
-
const filteredChildren =
|
|
5664
|
+
var MoonUISelectContentPro = React67.forwardRef(({ className, children, position = "popper", side = "bottom", align = "start", enableSearch, searchPlaceholder = "Search...", noResultsText = "No results found", searchLoading, searchIcon, ...props }, ref) => {
|
|
5665
|
+
const [searchValue, setSearchValue] = React67.useState("");
|
|
5666
|
+
const filteredChildren = React67.useMemo(() => {
|
|
5671
5667
|
if (!enableSearch || !searchValue)
|
|
5672
5668
|
return children;
|
|
5673
5669
|
const searchLower = searchValue.toLowerCase();
|
|
5674
|
-
return
|
|
5675
|
-
if (!
|
|
5670
|
+
return React67.Children.toArray(children).filter((child) => {
|
|
5671
|
+
if (!React67.isValidElement(child))
|
|
5676
5672
|
return true;
|
|
5677
5673
|
if (child.type === MoonUISelectGroupPro || child.type === MoonUISelectLabelPro || child.type === MoonUISelectSeparatorPro) {
|
|
5678
5674
|
return true;
|
|
@@ -5745,7 +5741,7 @@ var MoonUISelectContentPro = React60.forwardRef(({ className, children, position
|
|
|
5745
5741
|
"p-1",
|
|
5746
5742
|
position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
|
5747
5743
|
),
|
|
5748
|
-
children: searchLoading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx(Loader2, { className: "h-5 w-5 animate-spin text-gray-400" }) }) : filteredChildren &&
|
|
5744
|
+
children: searchLoading ? /* @__PURE__ */ jsx("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ jsx(Loader2, { className: "h-5 w-5 animate-spin text-gray-400" }) }) : filteredChildren && React67.Children.count(filteredChildren) > 0 ? filteredChildren : enableSearch ? /* @__PURE__ */ jsx("div", { className: "py-6 text-center text-sm text-gray-500 dark:text-gray-400", children: noResultsText }) : children
|
|
5749
5745
|
}
|
|
5750
5746
|
),
|
|
5751
5747
|
/* @__PURE__ */ jsx(MoonUISelectScrollDownButtonPro, {})
|
|
@@ -5754,7 +5750,7 @@ var MoonUISelectContentPro = React60.forwardRef(({ className, children, position
|
|
|
5754
5750
|
) });
|
|
5755
5751
|
});
|
|
5756
5752
|
MoonUISelectContentPro.displayName = SelectPrimitive.Content.displayName;
|
|
5757
|
-
var MoonUISelectLabelPro =
|
|
5753
|
+
var MoonUISelectLabelPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5758
5754
|
SelectPrimitive.Label,
|
|
5759
5755
|
{
|
|
5760
5756
|
ref,
|
|
@@ -5763,7 +5759,7 @@ var MoonUISelectLabelPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
5763
5759
|
}
|
|
5764
5760
|
));
|
|
5765
5761
|
MoonUISelectLabelPro.displayName = SelectPrimitive.Label.displayName;
|
|
5766
|
-
var MoonUISelectItemPro =
|
|
5762
|
+
var MoonUISelectItemPro = React67.forwardRef(({ className, children, variant = "default", size: size4 = "md", rightIcon, customIndicator, enableHoverScale, description, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5767
5763
|
SelectPrimitive.Item,
|
|
5768
5764
|
{
|
|
5769
5765
|
ref,
|
|
@@ -5795,7 +5791,7 @@ var MoonUISelectItemPro = React60.forwardRef(({ className, children, variant = "
|
|
|
5795
5791
|
}
|
|
5796
5792
|
));
|
|
5797
5793
|
MoonUISelectItemPro.displayName = SelectPrimitive.Item.displayName;
|
|
5798
|
-
var MoonUISelectSeparatorPro =
|
|
5794
|
+
var MoonUISelectSeparatorPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5799
5795
|
SelectPrimitive.Separator,
|
|
5800
5796
|
{
|
|
5801
5797
|
ref,
|
|
@@ -5966,7 +5962,7 @@ var getAIProvider = (settings) => {
|
|
|
5966
5962
|
return null;
|
|
5967
5963
|
}
|
|
5968
5964
|
};
|
|
5969
|
-
var MoonUICommandPro =
|
|
5965
|
+
var MoonUICommandPro = React67.forwardRef(({
|
|
5970
5966
|
className,
|
|
5971
5967
|
variant,
|
|
5972
5968
|
size: size4,
|
|
@@ -6351,7 +6347,7 @@ var MoonUICommandDialogPro = ({
|
|
|
6351
6347
|
/* @__PURE__ */ jsx(MoonUICommandPro, { ...commandProps, children })
|
|
6352
6348
|
] }) });
|
|
6353
6349
|
};
|
|
6354
|
-
var MoonUICommandInputPro =
|
|
6350
|
+
var MoonUICommandInputPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
6355
6351
|
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
6356
6352
|
/* @__PURE__ */ jsx(
|
|
6357
6353
|
Command.Input,
|
|
@@ -6366,7 +6362,7 @@ var MoonUICommandInputPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
6366
6362
|
)
|
|
6367
6363
|
] }));
|
|
6368
6364
|
MoonUICommandInputPro.displayName = Command.Input.displayName;
|
|
6369
|
-
var MoonUICommandListPro =
|
|
6365
|
+
var MoonUICommandListPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6370
6366
|
Command.List,
|
|
6371
6367
|
{
|
|
6372
6368
|
ref,
|
|
@@ -6375,7 +6371,7 @@ var MoonUICommandListPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
6375
6371
|
}
|
|
6376
6372
|
));
|
|
6377
6373
|
MoonUICommandListPro.displayName = Command.List.displayName;
|
|
6378
|
-
var MoonUICommandEmptyPro =
|
|
6374
|
+
var MoonUICommandEmptyPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6379
6375
|
Command.Empty,
|
|
6380
6376
|
{
|
|
6381
6377
|
ref,
|
|
@@ -6384,7 +6380,7 @@ var MoonUICommandEmptyPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
6384
6380
|
}
|
|
6385
6381
|
));
|
|
6386
6382
|
MoonUICommandEmptyPro.displayName = Command.Empty.displayName;
|
|
6387
|
-
var MoonUICommandGroupPro =
|
|
6383
|
+
var MoonUICommandGroupPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6388
6384
|
Command.Group,
|
|
6389
6385
|
{
|
|
6390
6386
|
ref,
|
|
@@ -6396,7 +6392,7 @@ var MoonUICommandGroupPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
6396
6392
|
}
|
|
6397
6393
|
));
|
|
6398
6394
|
MoonUICommandGroupPro.displayName = Command.Group.displayName;
|
|
6399
|
-
var MoonUICommandSeparatorPro =
|
|
6395
|
+
var MoonUICommandSeparatorPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6400
6396
|
Command.Separator,
|
|
6401
6397
|
{
|
|
6402
6398
|
ref,
|
|
@@ -6405,7 +6401,7 @@ var MoonUICommandSeparatorPro = React60.forwardRef(({ className, ...props }, ref
|
|
|
6405
6401
|
}
|
|
6406
6402
|
));
|
|
6407
6403
|
MoonUICommandSeparatorPro.displayName = Command.Separator.displayName;
|
|
6408
|
-
var MoonUICommandItemPro =
|
|
6404
|
+
var MoonUICommandItemPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6409
6405
|
Command.Item,
|
|
6410
6406
|
{
|
|
6411
6407
|
ref,
|
|
@@ -6498,7 +6494,7 @@ var dropdownItemVariants = cva(
|
|
|
6498
6494
|
}
|
|
6499
6495
|
}
|
|
6500
6496
|
);
|
|
6501
|
-
var MoonUIDropdownMenuSubTriggerPro =
|
|
6497
|
+
var MoonUIDropdownMenuSubTriggerPro = React67.forwardRef(({ className, inset, children, showChevron = true, badge, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6502
6498
|
DropdownMenuPrimitive.SubTrigger,
|
|
6503
6499
|
{
|
|
6504
6500
|
ref,
|
|
@@ -6522,7 +6518,7 @@ var MoonUIDropdownMenuSubTriggerPro = React60.forwardRef(({ className, inset, ch
|
|
|
6522
6518
|
}
|
|
6523
6519
|
));
|
|
6524
6520
|
MoonUIDropdownMenuSubTriggerPro.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
6525
|
-
var MoonUIDropdownMenuSubContentPro =
|
|
6521
|
+
var MoonUIDropdownMenuSubContentPro = React67.forwardRef(({ className, variant, animation, size: size4, ...props }, ref) => {
|
|
6526
6522
|
return /* @__PURE__ */ jsx(
|
|
6527
6523
|
DropdownMenuPrimitive.SubContent,
|
|
6528
6524
|
{
|
|
@@ -6533,7 +6529,7 @@ var MoonUIDropdownMenuSubContentPro = React60.forwardRef(({ className, variant,
|
|
|
6533
6529
|
);
|
|
6534
6530
|
});
|
|
6535
6531
|
MoonUIDropdownMenuSubContentPro.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
6536
|
-
var MoonUIDropdownMenuContentPro =
|
|
6532
|
+
var MoonUIDropdownMenuContentPro = React67.forwardRef(
|
|
6537
6533
|
({
|
|
6538
6534
|
className,
|
|
6539
6535
|
variant,
|
|
@@ -6551,12 +6547,12 @@ var MoonUIDropdownMenuContentPro = React60.forwardRef(
|
|
|
6551
6547
|
children,
|
|
6552
6548
|
...props
|
|
6553
6549
|
}, ref) => {
|
|
6554
|
-
const [searchQuery, setSearchQuery] =
|
|
6555
|
-
const filteredChildren =
|
|
6550
|
+
const [searchQuery, setSearchQuery] = React67.useState("");
|
|
6551
|
+
const filteredChildren = React67.useMemo(() => {
|
|
6556
6552
|
if (!enableSearch || !searchQuery)
|
|
6557
6553
|
return children;
|
|
6558
|
-
return
|
|
6559
|
-
if (!
|
|
6554
|
+
return React67.Children.toArray(children).filter((child) => {
|
|
6555
|
+
if (!React67.isValidElement(child))
|
|
6560
6556
|
return true;
|
|
6561
6557
|
const childText = getTextFromElement(child);
|
|
6562
6558
|
return childText.toLowerCase().includes(searchQuery.toLowerCase());
|
|
@@ -6612,7 +6608,7 @@ var MoonUIDropdownMenuContentPro = React60.forwardRef(
|
|
|
6612
6608
|
}
|
|
6613
6609
|
);
|
|
6614
6610
|
MoonUIDropdownMenuContentPro.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
6615
|
-
var MoonUIDropdownMenuItemPro =
|
|
6611
|
+
var MoonUIDropdownMenuItemPro = React67.forwardRef(
|
|
6616
6612
|
({
|
|
6617
6613
|
className,
|
|
6618
6614
|
variant,
|
|
@@ -6652,7 +6648,7 @@ var MoonUIDropdownMenuItemPro = React60.forwardRef(
|
|
|
6652
6648
|
)
|
|
6653
6649
|
);
|
|
6654
6650
|
MoonUIDropdownMenuItemPro.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
6655
|
-
var MoonUIDropdownMenuCheckboxItemPro =
|
|
6651
|
+
var MoonUIDropdownMenuCheckboxItemPro = React67.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6656
6652
|
DropdownMenuPrimitive.CheckboxItem,
|
|
6657
6653
|
{
|
|
6658
6654
|
ref,
|
|
@@ -6669,7 +6665,7 @@ var MoonUIDropdownMenuCheckboxItemPro = React60.forwardRef(({ className, childre
|
|
|
6669
6665
|
}
|
|
6670
6666
|
));
|
|
6671
6667
|
MoonUIDropdownMenuCheckboxItemPro.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
6672
|
-
var MoonUIDropdownMenuRadioItemPro =
|
|
6668
|
+
var MoonUIDropdownMenuRadioItemPro = React67.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
6673
6669
|
DropdownMenuPrimitive.RadioItem,
|
|
6674
6670
|
{
|
|
6675
6671
|
ref,
|
|
@@ -6685,7 +6681,7 @@ var MoonUIDropdownMenuRadioItemPro = React60.forwardRef(({ className, children,
|
|
|
6685
6681
|
}
|
|
6686
6682
|
));
|
|
6687
6683
|
MoonUIDropdownMenuRadioItemPro.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
6688
|
-
var MoonUIDropdownMenuLabelPro =
|
|
6684
|
+
var MoonUIDropdownMenuLabelPro = React67.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6689
6685
|
DropdownMenuPrimitive.Label,
|
|
6690
6686
|
{
|
|
6691
6687
|
ref,
|
|
@@ -6698,7 +6694,7 @@ var MoonUIDropdownMenuLabelPro = React60.forwardRef(({ className, inset, ...prop
|
|
|
6698
6694
|
}
|
|
6699
6695
|
));
|
|
6700
6696
|
MoonUIDropdownMenuLabelPro.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
6701
|
-
var MoonUIDropdownMenuSeparatorPro =
|
|
6697
|
+
var MoonUIDropdownMenuSeparatorPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6702
6698
|
DropdownMenuPrimitive.Separator,
|
|
6703
6699
|
{
|
|
6704
6700
|
ref,
|
|
@@ -6727,14 +6723,14 @@ function getTextFromElement(element) {
|
|
|
6727
6723
|
if (typeof props.children === "string") {
|
|
6728
6724
|
return props.children;
|
|
6729
6725
|
}
|
|
6730
|
-
if (
|
|
6726
|
+
if (React67.isValidElement(props.children)) {
|
|
6731
6727
|
return getTextFromElement(props.children);
|
|
6732
6728
|
}
|
|
6733
6729
|
if (Array.isArray(props.children)) {
|
|
6734
6730
|
return props.children.map((child) => {
|
|
6735
6731
|
if (typeof child === "string")
|
|
6736
6732
|
return child;
|
|
6737
|
-
if (
|
|
6733
|
+
if (React67.isValidElement(child))
|
|
6738
6734
|
return getTextFromElement(child);
|
|
6739
6735
|
return "";
|
|
6740
6736
|
}).join("");
|
|
@@ -6751,7 +6747,7 @@ var MoonUIPaginationPro = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
6751
6747
|
}
|
|
6752
6748
|
);
|
|
6753
6749
|
MoonUIPaginationPro.displayName = "PaginationPro";
|
|
6754
|
-
var MoonUIPaginationContentPro =
|
|
6750
|
+
var MoonUIPaginationContentPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6755
6751
|
"ul",
|
|
6756
6752
|
{
|
|
6757
6753
|
ref,
|
|
@@ -6760,7 +6756,7 @@ var MoonUIPaginationContentPro = React60.forwardRef(({ className, ...props }, re
|
|
|
6760
6756
|
}
|
|
6761
6757
|
));
|
|
6762
6758
|
MoonUIPaginationContentPro.displayName = "PaginationContentPro";
|
|
6763
|
-
var MoonUIPaginationItemPro =
|
|
6759
|
+
var MoonUIPaginationItemPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("li", { ref, className: cn("", className), ...props }));
|
|
6764
6760
|
MoonUIPaginationItemPro.displayName = "PaginationItemPro";
|
|
6765
6761
|
var MoonUIPaginationLinkPro = ({
|
|
6766
6762
|
className,
|
|
@@ -6883,7 +6879,7 @@ var popoverContentVariants = cva(
|
|
|
6883
6879
|
);
|
|
6884
6880
|
var MoonUIPopoverPro = PopoverPrimitive.Root;
|
|
6885
6881
|
var MoonUIPopoverTriggerPro = PopoverPrimitive.Trigger;
|
|
6886
|
-
var MoonUIPopoverContentPro =
|
|
6882
|
+
var MoonUIPopoverContentPro = React67.forwardRef(({
|
|
6887
6883
|
className,
|
|
6888
6884
|
variant,
|
|
6889
6885
|
size: size4,
|
|
@@ -6926,11 +6922,107 @@ var MoonUIPopoverContentPro = React60.forwardRef(({
|
|
|
6926
6922
|
)
|
|
6927
6923
|
] }));
|
|
6928
6924
|
MoonUIPopoverContentPro.displayName = PopoverPrimitive.Content.displayName;
|
|
6925
|
+
function createContextScope2(scopeName, createContextScopeDeps = []) {
|
|
6926
|
+
let defaultContexts = [];
|
|
6927
|
+
function createContext32(rootComponentName, defaultContext) {
|
|
6928
|
+
const BaseContext = React67.createContext(defaultContext);
|
|
6929
|
+
const index2 = defaultContexts.length;
|
|
6930
|
+
defaultContexts = [...defaultContexts, defaultContext];
|
|
6931
|
+
const Provider3 = (props) => {
|
|
6932
|
+
const { scope, children, ...context } = props;
|
|
6933
|
+
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
6934
|
+
const value = React67.useMemo(() => context, Object.values(context));
|
|
6935
|
+
return /* @__PURE__ */ jsx(Context.Provider, { value, children });
|
|
6936
|
+
};
|
|
6937
|
+
Provider3.displayName = rootComponentName + "Provider";
|
|
6938
|
+
function useContext23(consumerName, scope) {
|
|
6939
|
+
const Context = scope?.[scopeName]?.[index2] || BaseContext;
|
|
6940
|
+
const context = React67.useContext(Context);
|
|
6941
|
+
if (context)
|
|
6942
|
+
return context;
|
|
6943
|
+
if (defaultContext !== void 0)
|
|
6944
|
+
return defaultContext;
|
|
6945
|
+
throw new Error(`\`${consumerName}\` must be used within \`${rootComponentName}\``);
|
|
6946
|
+
}
|
|
6947
|
+
return [Provider3, useContext23];
|
|
6948
|
+
}
|
|
6949
|
+
const createScope = () => {
|
|
6950
|
+
const scopeContexts = defaultContexts.map((defaultContext) => {
|
|
6951
|
+
return React67.createContext(defaultContext);
|
|
6952
|
+
});
|
|
6953
|
+
return function useScope(scope) {
|
|
6954
|
+
const contexts = scope?.[scopeName] || scopeContexts;
|
|
6955
|
+
return React67.useMemo(
|
|
6956
|
+
() => ({ [`__scope${scopeName}`]: { ...scope, [scopeName]: contexts } }),
|
|
6957
|
+
[scope, contexts]
|
|
6958
|
+
);
|
|
6959
|
+
};
|
|
6960
|
+
};
|
|
6961
|
+
createScope.scopeName = scopeName;
|
|
6962
|
+
return [createContext32, composeContextScopes2(createScope, ...createContextScopeDeps)];
|
|
6963
|
+
}
|
|
6964
|
+
function composeContextScopes2(...scopes) {
|
|
6965
|
+
const baseScope = scopes[0];
|
|
6966
|
+
if (scopes.length === 1)
|
|
6967
|
+
return baseScope;
|
|
6968
|
+
const createScope = () => {
|
|
6969
|
+
const scopeHooks = scopes.map((createScope2) => ({
|
|
6970
|
+
useScope: createScope2(),
|
|
6971
|
+
scopeName: createScope2.scopeName
|
|
6972
|
+
}));
|
|
6973
|
+
return function useComposedScopes(overrideScopes) {
|
|
6974
|
+
const nextScopes = scopeHooks.reduce((nextScopes2, { useScope, scopeName }) => {
|
|
6975
|
+
const scopeProps = useScope(overrideScopes);
|
|
6976
|
+
const currentScope = scopeProps[`__scope${scopeName}`];
|
|
6977
|
+
return { ...nextScopes2, ...currentScope };
|
|
6978
|
+
}, {});
|
|
6979
|
+
return React67.useMemo(() => ({ [`__scope${baseScope.scopeName}`]: nextScopes }), [nextScopes]);
|
|
6980
|
+
};
|
|
6981
|
+
};
|
|
6982
|
+
createScope.scopeName = baseScope.scopeName;
|
|
6983
|
+
return createScope;
|
|
6984
|
+
}
|
|
6985
|
+
var NODES2 = [
|
|
6986
|
+
"a",
|
|
6987
|
+
"button",
|
|
6988
|
+
"div",
|
|
6989
|
+
"form",
|
|
6990
|
+
"h2",
|
|
6991
|
+
"h3",
|
|
6992
|
+
"img",
|
|
6993
|
+
"input",
|
|
6994
|
+
"label",
|
|
6995
|
+
"li",
|
|
6996
|
+
"nav",
|
|
6997
|
+
"ol",
|
|
6998
|
+
"p",
|
|
6999
|
+
"select",
|
|
7000
|
+
"span",
|
|
7001
|
+
"svg",
|
|
7002
|
+
"ul"
|
|
7003
|
+
];
|
|
7004
|
+
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
7005
|
+
const Slot = createSlot(`Primitive.${node}`);
|
|
7006
|
+
const Node4 = React67.forwardRef((props, forwardedRef) => {
|
|
7007
|
+
const { asChild, ...primitiveProps } = props;
|
|
7008
|
+
const Comp = asChild ? Slot : node;
|
|
7009
|
+
if (typeof window !== "undefined") {
|
|
7010
|
+
window[Symbol.for("radix-ui")] = true;
|
|
7011
|
+
}
|
|
7012
|
+
return /* @__PURE__ */ jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
7013
|
+
});
|
|
7014
|
+
Node4.displayName = `Primitive.${node}`;
|
|
7015
|
+
return { ...primitive, [node]: Node4 };
|
|
7016
|
+
}, {});
|
|
7017
|
+
function dispatchDiscreteCustomEvent(target, event) {
|
|
7018
|
+
if (target)
|
|
7019
|
+
ReactDOM2.flushSync(() => target.dispatchEvent(event));
|
|
7020
|
+
}
|
|
6929
7021
|
var PROGRESS_NAME = "Progress";
|
|
6930
7022
|
var DEFAULT_MAX = 100;
|
|
6931
|
-
var [createProgressContext, createProgressScope] =
|
|
7023
|
+
var [createProgressContext, createProgressScope] = createContextScope2(PROGRESS_NAME);
|
|
6932
7024
|
var [ProgressProvider, useProgressContext] = createProgressContext(PROGRESS_NAME);
|
|
6933
|
-
var Progress =
|
|
7025
|
+
var Progress = React67.forwardRef(
|
|
6934
7026
|
(props, forwardedRef) => {
|
|
6935
7027
|
const {
|
|
6936
7028
|
__scopeProgress,
|
|
@@ -6949,7 +7041,7 @@ var Progress = React60.forwardRef(
|
|
|
6949
7041
|
const value = isValidValueNumber(valueProp, max2) ? valueProp : null;
|
|
6950
7042
|
const valueLabel = isNumber(value) ? getValueLabel(value, max2) : void 0;
|
|
6951
7043
|
return /* @__PURE__ */ jsx(ProgressProvider, { scope: __scopeProgress, value, max: max2, children: /* @__PURE__ */ jsx(
|
|
6952
|
-
|
|
7044
|
+
Primitive2.div,
|
|
6953
7045
|
{
|
|
6954
7046
|
"aria-valuemax": max2,
|
|
6955
7047
|
"aria-valuemin": 0,
|
|
@@ -6967,12 +7059,12 @@ var Progress = React60.forwardRef(
|
|
|
6967
7059
|
);
|
|
6968
7060
|
Progress.displayName = PROGRESS_NAME;
|
|
6969
7061
|
var INDICATOR_NAME = "ProgressIndicator";
|
|
6970
|
-
var ProgressIndicator =
|
|
7062
|
+
var ProgressIndicator = React67.forwardRef(
|
|
6971
7063
|
(props, forwardedRef) => {
|
|
6972
7064
|
const { __scopeProgress, ...indicatorProps } = props;
|
|
6973
7065
|
const context = useProgressContext(INDICATOR_NAME, __scopeProgress);
|
|
6974
7066
|
return /* @__PURE__ */ jsx(
|
|
6975
|
-
|
|
7067
|
+
Primitive2.div,
|
|
6976
7068
|
{
|
|
6977
7069
|
"data-state": getProgressState(context.value, context.max),
|
|
6978
7070
|
"data-value": context.value ?? void 0,
|
|
@@ -7012,7 +7104,7 @@ Defaulting to \`null\`.`;
|
|
|
7012
7104
|
}
|
|
7013
7105
|
var Root11 = Progress;
|
|
7014
7106
|
var Indicator2 = ProgressIndicator;
|
|
7015
|
-
var MoonUIProgressPro =
|
|
7107
|
+
var MoonUIProgressPro = React67.forwardRef(({ className, value, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7016
7108
|
Root11,
|
|
7017
7109
|
{
|
|
7018
7110
|
ref,
|
|
@@ -7053,8 +7145,8 @@ var MoonUIradioGroupItemVariantsPro = cva(
|
|
|
7053
7145
|
}
|
|
7054
7146
|
}
|
|
7055
7147
|
);
|
|
7056
|
-
var MoonUIRadioGroupContextPro =
|
|
7057
|
-
var MoonUIRadioGroupPro =
|
|
7148
|
+
var MoonUIRadioGroupContextPro = React67.createContext({});
|
|
7149
|
+
var MoonUIRadioGroupPro = React67.forwardRef(
|
|
7058
7150
|
({ className, value, onValueChange, disabled, name, ...props }, ref) => {
|
|
7059
7151
|
return /* @__PURE__ */ jsx(MoonUIRadioGroupContextPro.Provider, { value: { value, onValueChange, disabled, name }, children: /* @__PURE__ */ jsx(
|
|
7060
7152
|
"div",
|
|
@@ -7068,9 +7160,9 @@ var MoonUIRadioGroupPro = React60.forwardRef(
|
|
|
7068
7160
|
}
|
|
7069
7161
|
);
|
|
7070
7162
|
MoonUIRadioGroupPro.displayName = "RadioGroupPro";
|
|
7071
|
-
var MoonUIRadioGroupItemPro =
|
|
7072
|
-
const radioGroup =
|
|
7073
|
-
const generatedId =
|
|
7163
|
+
var MoonUIRadioGroupItemPro = React67.forwardRef(({ className, variant, size: size4, indicator, id, value, disabled, ...props }, ref) => {
|
|
7164
|
+
const radioGroup = React67.useContext(MoonUIRadioGroupContextPro);
|
|
7165
|
+
const generatedId = React67.useId();
|
|
7074
7166
|
const radioId = id || generatedId;
|
|
7075
7167
|
const isChecked = radioGroup.value === value;
|
|
7076
7168
|
const handleChange = (e) => {
|
|
@@ -7118,7 +7210,7 @@ var MoonUIRadioGroupItemPro = React60.forwardRef(({ className, variant, size: si
|
|
|
7118
7210
|
] });
|
|
7119
7211
|
});
|
|
7120
7212
|
MoonUIRadioGroupItemPro.displayName = "RadioGroupItemPro";
|
|
7121
|
-
var MoonUIRadioLabelPro =
|
|
7213
|
+
var MoonUIRadioLabelPro = React67.forwardRef(
|
|
7122
7214
|
({ className, htmlFor, children, disabled = false, ...props }, ref) => {
|
|
7123
7215
|
return /* @__PURE__ */ jsx(
|
|
7124
7216
|
"label",
|
|
@@ -7137,13 +7229,13 @@ var MoonUIRadioLabelPro = React60.forwardRef(
|
|
|
7137
7229
|
}
|
|
7138
7230
|
);
|
|
7139
7231
|
MoonUIRadioLabelPro.displayName = "RadioLabelPro";
|
|
7140
|
-
var MoonUIRadioItemWithLabelPro =
|
|
7232
|
+
var MoonUIRadioItemWithLabelPro = React67.forwardRef(({
|
|
7141
7233
|
id,
|
|
7142
7234
|
label,
|
|
7143
7235
|
labelClassName,
|
|
7144
7236
|
...radioProps
|
|
7145
7237
|
}, ref) => {
|
|
7146
|
-
const generatedId =
|
|
7238
|
+
const generatedId = React67.useId();
|
|
7147
7239
|
const radioId = id || generatedId;
|
|
7148
7240
|
return /* @__PURE__ */ jsxs("div", { className: "flex items-center", children: [
|
|
7149
7241
|
/* @__PURE__ */ jsx(MoonUIRadioGroupItemPro, { ref, id: radioId, ...radioProps }),
|
|
@@ -7159,7 +7251,7 @@ var MoonUIRadioItemWithLabelPro = React60.forwardRef(({
|
|
|
7159
7251
|
] });
|
|
7160
7252
|
});
|
|
7161
7253
|
MoonUIRadioItemWithLabelPro.displayName = "RadioItemWithLabelPro";
|
|
7162
|
-
var ScrollArea =
|
|
7254
|
+
var ScrollArea = React67.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
7163
7255
|
ScrollAreaPrimitive.Root,
|
|
7164
7256
|
{
|
|
7165
7257
|
ref,
|
|
@@ -7173,7 +7265,7 @@ var ScrollArea = React60.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
7173
7265
|
}
|
|
7174
7266
|
));
|
|
7175
7267
|
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
7176
|
-
var ScrollBar =
|
|
7268
|
+
var ScrollBar = React67.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7177
7269
|
ScrollAreaPrimitive.ScrollAreaScrollbar,
|
|
7178
7270
|
{
|
|
7179
7271
|
ref,
|
|
@@ -7286,7 +7378,7 @@ var moonUISeparatorVariantsPro = cva(
|
|
|
7286
7378
|
}
|
|
7287
7379
|
}
|
|
7288
7380
|
);
|
|
7289
|
-
var MoonUISeparatorPro =
|
|
7381
|
+
var MoonUISeparatorPro = React67.forwardRef(
|
|
7290
7382
|
({
|
|
7291
7383
|
className,
|
|
7292
7384
|
orientation = "horizontal",
|
|
@@ -7313,7 +7405,7 @@ var Sheet = DialogPrimitive.Root;
|
|
|
7313
7405
|
var SheetTrigger = DialogPrimitive.Trigger;
|
|
7314
7406
|
var SheetClose = DialogPrimitive.Close;
|
|
7315
7407
|
var SheetPortal = DialogPrimitive.Portal;
|
|
7316
|
-
var SheetOverlay =
|
|
7408
|
+
var SheetOverlay = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7317
7409
|
DialogPrimitive.Overlay,
|
|
7318
7410
|
{
|
|
7319
7411
|
className: cn(
|
|
@@ -7341,7 +7433,7 @@ var sheetVariants = cva(
|
|
|
7341
7433
|
}
|
|
7342
7434
|
}
|
|
7343
7435
|
);
|
|
7344
|
-
var SheetContent =
|
|
7436
|
+
var SheetContent = React67.forwardRef(({ side = "right", className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SheetPortal, { children: [
|
|
7345
7437
|
/* @__PURE__ */ jsx(SheetOverlay, {}),
|
|
7346
7438
|
/* @__PURE__ */ jsxs(
|
|
7347
7439
|
DialogPrimitive.Content,
|
|
@@ -7388,7 +7480,7 @@ var SheetFooter = ({
|
|
|
7388
7480
|
}
|
|
7389
7481
|
);
|
|
7390
7482
|
SheetFooter.displayName = "SheetFooter";
|
|
7391
|
-
var SheetTitle =
|
|
7483
|
+
var SheetTitle = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7392
7484
|
DialogPrimitive.Title,
|
|
7393
7485
|
{
|
|
7394
7486
|
ref,
|
|
@@ -7397,7 +7489,7 @@ var SheetTitle = React60.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
7397
7489
|
}
|
|
7398
7490
|
));
|
|
7399
7491
|
SheetTitle.displayName = DialogPrimitive.Title.displayName;
|
|
7400
|
-
var SheetDescription =
|
|
7492
|
+
var SheetDescription = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7401
7493
|
DialogPrimitive.Description,
|
|
7402
7494
|
{
|
|
7403
7495
|
ref,
|
|
@@ -7498,7 +7590,7 @@ var sliderThumbVariants = cva(
|
|
|
7498
7590
|
}
|
|
7499
7591
|
}
|
|
7500
7592
|
);
|
|
7501
|
-
var MoonUISliderPro =
|
|
7593
|
+
var MoonUISliderPro = React67.forwardRef(({
|
|
7502
7594
|
className,
|
|
7503
7595
|
size: size4,
|
|
7504
7596
|
trackVariant,
|
|
@@ -7514,10 +7606,10 @@ var MoonUISliderPro = React60.forwardRef(({
|
|
|
7514
7606
|
disabled,
|
|
7515
7607
|
...props
|
|
7516
7608
|
}, ref) => {
|
|
7517
|
-
const [sliderValue, setSliderValue] =
|
|
7609
|
+
const [sliderValue, setSliderValue] = React67.useState(
|
|
7518
7610
|
value || defaultValue2 || [0]
|
|
7519
7611
|
);
|
|
7520
|
-
|
|
7612
|
+
React67.useEffect(() => {
|
|
7521
7613
|
if (value !== void 0) {
|
|
7522
7614
|
setSliderValue(value);
|
|
7523
7615
|
}
|
|
@@ -7532,7 +7624,7 @@ var MoonUISliderPro = React60.forwardRef(({
|
|
|
7532
7624
|
const calculateThumbPercent = (value2, min3, max3) => {
|
|
7533
7625
|
return (value2 - min3) / (max3 - min3) * 100;
|
|
7534
7626
|
};
|
|
7535
|
-
const trackRef =
|
|
7627
|
+
const trackRef = React67.useRef(null);
|
|
7536
7628
|
const min2 = props.min || 0;
|
|
7537
7629
|
const max2 = props.max || 100;
|
|
7538
7630
|
const step = props.step || 1;
|
|
@@ -7653,7 +7745,7 @@ var MoonUISliderPro = React60.forwardRef(({
|
|
|
7653
7745
|
] });
|
|
7654
7746
|
});
|
|
7655
7747
|
MoonUISliderPro.displayName = "MoonUISliderPro";
|
|
7656
|
-
var MoonUISwitchPro =
|
|
7748
|
+
var MoonUISwitchPro = React67.forwardRef(({ className, size: size4 = "md", variant = "primary", loading, leftIcon, rightIcon, description, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2", children: [
|
|
7657
7749
|
leftIcon && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: leftIcon }),
|
|
7658
7750
|
/* @__PURE__ */ jsxs(
|
|
7659
7751
|
SwitchPrimitives.Root,
|
|
@@ -7723,7 +7815,7 @@ var MoonUItableVariantsPro = cva(
|
|
|
7723
7815
|
}
|
|
7724
7816
|
}
|
|
7725
7817
|
);
|
|
7726
|
-
var MoonUITablePro =
|
|
7818
|
+
var MoonUITablePro = React67.forwardRef(({
|
|
7727
7819
|
className,
|
|
7728
7820
|
variant,
|
|
7729
7821
|
size: size4,
|
|
@@ -7740,11 +7832,11 @@ var MoonUITablePro = React60.forwardRef(({
|
|
|
7740
7832
|
...props
|
|
7741
7833
|
}, ref) => {
|
|
7742
7834
|
const MoonUIstripedPro = variant === "striped";
|
|
7743
|
-
const MoonUIchildrenWithPropsPro =
|
|
7744
|
-
if (
|
|
7835
|
+
const MoonUIchildrenWithPropsPro = React67.Children.map(props.children, (child) => {
|
|
7836
|
+
if (React67.isValidElement(child)) {
|
|
7745
7837
|
if (child.type === "tbody") {
|
|
7746
7838
|
const MoonUItbodyPropsPro = child.props;
|
|
7747
|
-
return
|
|
7839
|
+
return React67.cloneElement(child, {
|
|
7748
7840
|
className: cn(MoonUItbodyPropsPro.className, MoonUIstripedPro && "even:[&>tr]:bg-muted/50")
|
|
7749
7841
|
});
|
|
7750
7842
|
}
|
|
@@ -7769,10 +7861,10 @@ var MoonUITablePro = React60.forwardRef(({
|
|
|
7769
7861
|
] });
|
|
7770
7862
|
});
|
|
7771
7863
|
MoonUITablePro.displayName = "TablePro";
|
|
7772
|
-
var MoonUITableHeaderPro =
|
|
7864
|
+
var MoonUITableHeaderPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
7773
7865
|
MoonUITableHeaderPro.displayName = "TableHeaderPro";
|
|
7774
|
-
var MoonUITableBodyPro =
|
|
7775
|
-
const MoonUIhasChildrenPro =
|
|
7866
|
+
var MoonUITableBodyPro = React67.forwardRef(({ className, emptyContent, emptyMessage = "No data available", children, ...props }, ref) => {
|
|
7867
|
+
const MoonUIhasChildrenPro = React67.Children.count(children) > 0;
|
|
7776
7868
|
return /* @__PURE__ */ jsx(
|
|
7777
7869
|
"tbody",
|
|
7778
7870
|
{
|
|
@@ -7784,7 +7876,7 @@ var MoonUITableBodyPro = React60.forwardRef(({ className, emptyContent, emptyMes
|
|
|
7784
7876
|
);
|
|
7785
7877
|
});
|
|
7786
7878
|
MoonUITableBodyPro.displayName = "TableBodyPro";
|
|
7787
|
-
var MoonUITableFooterPro =
|
|
7879
|
+
var MoonUITableFooterPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7788
7880
|
"tfoot",
|
|
7789
7881
|
{
|
|
7790
7882
|
ref,
|
|
@@ -7793,7 +7885,7 @@ var MoonUITableFooterPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
7793
7885
|
}
|
|
7794
7886
|
));
|
|
7795
7887
|
MoonUITableFooterPro.displayName = "TableFooterPro";
|
|
7796
|
-
var MoonUITableRowPro =
|
|
7888
|
+
var MoonUITableRowPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7797
7889
|
"tr",
|
|
7798
7890
|
{
|
|
7799
7891
|
ref,
|
|
@@ -7805,7 +7897,7 @@ var MoonUITableRowPro = React60.forwardRef(({ className, ...props }, ref) => /*
|
|
|
7805
7897
|
}
|
|
7806
7898
|
));
|
|
7807
7899
|
MoonUITableRowPro.displayName = "TableRowPro";
|
|
7808
|
-
var MoonUITableHeadPro =
|
|
7900
|
+
var MoonUITableHeadPro = React67.forwardRef(
|
|
7809
7901
|
({ className, sortable, sorted, onSort, children, ...props }, ref) => {
|
|
7810
7902
|
const MoonUIrenderSortIconPro = () => {
|
|
7811
7903
|
if (!sortable)
|
|
@@ -7886,7 +7978,7 @@ var MoonUITableHeadPro = React60.forwardRef(
|
|
|
7886
7978
|
}
|
|
7887
7979
|
);
|
|
7888
7980
|
MoonUITableHeadPro.displayName = "TableHeadPro";
|
|
7889
|
-
var MoonUITableCellPro =
|
|
7981
|
+
var MoonUITableCellPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7890
7982
|
"td",
|
|
7891
7983
|
{
|
|
7892
7984
|
ref,
|
|
@@ -7895,7 +7987,7 @@ var MoonUITableCellPro = React60.forwardRef(({ className, ...props }, ref) => /*
|
|
|
7895
7987
|
}
|
|
7896
7988
|
));
|
|
7897
7989
|
MoonUITableCellPro.displayName = "TableCellPro";
|
|
7898
|
-
var MoonUITableCaptionPro =
|
|
7990
|
+
var MoonUITableCaptionPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7899
7991
|
"caption",
|
|
7900
7992
|
{
|
|
7901
7993
|
ref,
|
|
@@ -7905,7 +7997,7 @@ var MoonUITableCaptionPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
7905
7997
|
));
|
|
7906
7998
|
MoonUITableCaptionPro.displayName = "TableCaptionPro";
|
|
7907
7999
|
var Tabs = TabsPrimitive2.Root;
|
|
7908
|
-
var TabsList =
|
|
8000
|
+
var TabsList = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7909
8001
|
TabsPrimitive2.List,
|
|
7910
8002
|
{
|
|
7911
8003
|
ref,
|
|
@@ -7917,7 +8009,7 @@ var TabsList = React60.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
7917
8009
|
}
|
|
7918
8010
|
));
|
|
7919
8011
|
TabsList.displayName = TabsPrimitive2.List.displayName;
|
|
7920
|
-
var TabsTrigger =
|
|
8012
|
+
var TabsTrigger = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7921
8013
|
TabsPrimitive2.Trigger,
|
|
7922
8014
|
{
|
|
7923
8015
|
ref,
|
|
@@ -7929,7 +8021,7 @@ var TabsTrigger = React60.forwardRef(({ className, ...props }, ref) => /* @__PUR
|
|
|
7929
8021
|
}
|
|
7930
8022
|
));
|
|
7931
8023
|
TabsTrigger.displayName = TabsPrimitive2.Trigger.displayName;
|
|
7932
|
-
var TabsContent =
|
|
8024
|
+
var TabsContent = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7933
8025
|
TabsPrimitive2.Content,
|
|
7934
8026
|
{
|
|
7935
8027
|
ref,
|
|
@@ -7968,7 +8060,7 @@ var contentVariants = {
|
|
|
7968
8060
|
exit: { scale: 1.2, opacity: 0, filter: "blur(10px)" }
|
|
7969
8061
|
}
|
|
7970
8062
|
};
|
|
7971
|
-
var MoonUITabsPro =
|
|
8063
|
+
var MoonUITabsPro = React67.forwardRef(({
|
|
7972
8064
|
variant = "default",
|
|
7973
8065
|
animationMode = "fade",
|
|
7974
8066
|
orientation = "horizontal",
|
|
@@ -7997,8 +8089,8 @@ var MoonUITabsPro = React60.forwardRef(({
|
|
|
7997
8089
|
onValueChange,
|
|
7998
8090
|
...props
|
|
7999
8091
|
}, ref) => {
|
|
8000
|
-
const [items, setItems] =
|
|
8001
|
-
const [localValue, setLocalValue] =
|
|
8092
|
+
const [items, setItems] = React67.useState(initialItems);
|
|
8093
|
+
const [localValue, setLocalValue] = React67.useState(() => {
|
|
8002
8094
|
if (persistKey && typeof window !== "undefined") {
|
|
8003
8095
|
const stored = localStorage.getItem(`tabs-${persistKey}`);
|
|
8004
8096
|
if (stored) {
|
|
@@ -8014,11 +8106,11 @@ var MoonUITabsPro = React60.forwardRef(({
|
|
|
8014
8106
|
}
|
|
8015
8107
|
return defaultValue2 || items[0]?.value;
|
|
8016
8108
|
});
|
|
8017
|
-
const [loadedTabs, setLoadedTabs] =
|
|
8018
|
-
const [isChanging, setIsChanging] =
|
|
8019
|
-
const scrollRef =
|
|
8109
|
+
const [loadedTabs, setLoadedTabs] = React67.useState(/* @__PURE__ */ new Set());
|
|
8110
|
+
const [isChanging, setIsChanging] = React67.useState(false);
|
|
8111
|
+
const scrollRef = React67.useRef(null);
|
|
8020
8112
|
const value = controlledValue !== void 0 ? controlledValue : localValue;
|
|
8021
|
-
const handleValueChange =
|
|
8113
|
+
const handleValueChange = React67.useCallback(async (newValue) => {
|
|
8022
8114
|
if (loading || isChanging)
|
|
8023
8115
|
return;
|
|
8024
8116
|
if (onBeforeChange) {
|
|
@@ -8046,7 +8138,7 @@ var MoonUITabsPro = React60.forwardRef(({
|
|
|
8046
8138
|
window.history.replaceState({}, "", `${window.location.pathname}?${params}`);
|
|
8047
8139
|
}
|
|
8048
8140
|
}, [value, loading, isChanging, onBeforeChange, onValueChange, lazy, loadedTabs, onAnalytics, persistKey, items, urlSync]);
|
|
8049
|
-
const handleTabClose =
|
|
8141
|
+
const handleTabClose = React67.useCallback((tabValue, e) => {
|
|
8050
8142
|
e.stopPropagation();
|
|
8051
8143
|
const newItems = items.filter((item) => item.value !== tabValue);
|
|
8052
8144
|
setItems(newItems);
|
|
@@ -8057,7 +8149,7 @@ var MoonUITabsPro = React60.forwardRef(({
|
|
|
8057
8149
|
handleValueChange(newItems[0].value);
|
|
8058
8150
|
}
|
|
8059
8151
|
}, [items, value, onTabsChange, onTabClose, onAnalytics, handleValueChange]);
|
|
8060
|
-
const handleTabAdd =
|
|
8152
|
+
const handleTabAdd = React67.useCallback(() => {
|
|
8061
8153
|
if (maxTabs && items.length >= maxTabs) {
|
|
8062
8154
|
onAnalytics?.("tab_add_blocked", { reason: "max_tabs" });
|
|
8063
8155
|
return;
|
|
@@ -8065,7 +8157,7 @@ var MoonUITabsPro = React60.forwardRef(({
|
|
|
8065
8157
|
onTabAdd?.();
|
|
8066
8158
|
onAnalytics?.("tab_add", { count: items.length + 1 });
|
|
8067
8159
|
}, [items.length, maxTabs, onTabAdd, onAnalytics]);
|
|
8068
|
-
|
|
8160
|
+
React67.useEffect(() => {
|
|
8069
8161
|
if (!shortcuts)
|
|
8070
8162
|
return;
|
|
8071
8163
|
const handleKeyDown3 = (e) => {
|
|
@@ -8295,7 +8387,7 @@ var MoonUITabsPro = React60.forwardRef(({
|
|
|
8295
8387
|
] });
|
|
8296
8388
|
});
|
|
8297
8389
|
MoonUITabsPro.displayName = "MoonUITabsPro";
|
|
8298
|
-
var MoonUITabsListPro =
|
|
8390
|
+
var MoonUITabsListPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8299
8391
|
TabsPrimitive2.List,
|
|
8300
8392
|
{
|
|
8301
8393
|
ref,
|
|
@@ -8307,7 +8399,7 @@ var MoonUITabsListPro = React60.forwardRef(({ className, ...props }, ref) => /*
|
|
|
8307
8399
|
}
|
|
8308
8400
|
));
|
|
8309
8401
|
MoonUITabsListPro.displayName = "MoonUITabsListPro";
|
|
8310
|
-
var MoonUITabsTriggerPro =
|
|
8402
|
+
var MoonUITabsTriggerPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8311
8403
|
TabsPrimitive2.Trigger,
|
|
8312
8404
|
{
|
|
8313
8405
|
ref,
|
|
@@ -8319,7 +8411,7 @@ var MoonUITabsTriggerPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
8319
8411
|
}
|
|
8320
8412
|
));
|
|
8321
8413
|
MoonUITabsTriggerPro.displayName = "MoonUITabsTriggerPro";
|
|
8322
|
-
var MoonUITabsContentPro =
|
|
8414
|
+
var MoonUITabsContentPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8323
8415
|
TabsPrimitive2.Content,
|
|
8324
8416
|
{
|
|
8325
8417
|
ref,
|
|
@@ -8331,7 +8423,7 @@ var MoonUITabsContentPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
8331
8423
|
}
|
|
8332
8424
|
));
|
|
8333
8425
|
MoonUITabsContentPro.displayName = "MoonUITabsContentPro";
|
|
8334
|
-
var MoonUITextareaPro =
|
|
8426
|
+
var MoonUITextareaPro = React67__default.forwardRef(
|
|
8335
8427
|
({ className, ...props }, ref) => {
|
|
8336
8428
|
return /* @__PURE__ */ jsx(
|
|
8337
8429
|
"textarea",
|
|
@@ -8347,7 +8439,7 @@ var MoonUITextareaPro = React60__default.forwardRef(
|
|
|
8347
8439
|
}
|
|
8348
8440
|
);
|
|
8349
8441
|
MoonUITextareaPro.displayName = "MoonUITextareaPro";
|
|
8350
|
-
var MoonUIToastViewportPro =
|
|
8442
|
+
var MoonUIToastViewportPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8351
8443
|
ToastPrimitives.Viewport,
|
|
8352
8444
|
{
|
|
8353
8445
|
ref,
|
|
@@ -8376,7 +8468,7 @@ var moonUIToastVariantsPro = cva(
|
|
|
8376
8468
|
}
|
|
8377
8469
|
}
|
|
8378
8470
|
);
|
|
8379
|
-
var MoonUIToastPro =
|
|
8471
|
+
var MoonUIToastPro = React67.forwardRef(({ className, variant, ...props }, ref) => {
|
|
8380
8472
|
return /* @__PURE__ */ jsx(
|
|
8381
8473
|
ToastPrimitives.Root,
|
|
8382
8474
|
{
|
|
@@ -8387,7 +8479,7 @@ var MoonUIToastPro = React60.forwardRef(({ className, variant, ...props }, ref)
|
|
|
8387
8479
|
);
|
|
8388
8480
|
});
|
|
8389
8481
|
MoonUIToastPro.displayName = ToastPrimitives.Root.displayName;
|
|
8390
|
-
var MoonUIToastActionPro =
|
|
8482
|
+
var MoonUIToastActionPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8391
8483
|
ToastPrimitives.Action,
|
|
8392
8484
|
{
|
|
8393
8485
|
ref,
|
|
@@ -8399,7 +8491,7 @@ var MoonUIToastActionPro = React60.forwardRef(({ className, ...props }, ref) =>
|
|
|
8399
8491
|
}
|
|
8400
8492
|
));
|
|
8401
8493
|
MoonUIToastActionPro.displayName = ToastPrimitives.Action.displayName;
|
|
8402
|
-
var MoonUIToastClosePro =
|
|
8494
|
+
var MoonUIToastClosePro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8403
8495
|
ToastPrimitives.Close,
|
|
8404
8496
|
{
|
|
8405
8497
|
ref,
|
|
@@ -8413,7 +8505,7 @@ var MoonUIToastClosePro = React60.forwardRef(({ className, ...props }, ref) => /
|
|
|
8413
8505
|
}
|
|
8414
8506
|
));
|
|
8415
8507
|
MoonUIToastClosePro.displayName = ToastPrimitives.Close.displayName;
|
|
8416
|
-
var MoonUIToastTitlePro =
|
|
8508
|
+
var MoonUIToastTitlePro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8417
8509
|
ToastPrimitives.Title,
|
|
8418
8510
|
{
|
|
8419
8511
|
ref,
|
|
@@ -8422,7 +8514,7 @@ var MoonUIToastTitlePro = React60.forwardRef(({ className, ...props }, ref) => /
|
|
|
8422
8514
|
}
|
|
8423
8515
|
));
|
|
8424
8516
|
MoonUIToastTitlePro.displayName = ToastPrimitives.Title.displayName;
|
|
8425
|
-
var MoonUIToastDescriptionPro =
|
|
8517
|
+
var MoonUIToastDescriptionPro = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
8426
8518
|
ToastPrimitives.Description,
|
|
8427
8519
|
{
|
|
8428
8520
|
ref,
|
|
@@ -8529,17 +8621,93 @@ function toast({ ...props }) {
|
|
|
8529
8621
|
update
|
|
8530
8622
|
};
|
|
8531
8623
|
}
|
|
8624
|
+
|
|
8625
|
+
// ../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
8626
|
+
function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
8627
|
+
return function handleEvent(event) {
|
|
8628
|
+
originalEventHandler?.(event);
|
|
8629
|
+
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
8630
|
+
return ourEventHandler?.(event);
|
|
8631
|
+
}
|
|
8632
|
+
};
|
|
8633
|
+
}
|
|
8634
|
+
var useLayoutEffect22 = globalThis?.document ? React67.useLayoutEffect : () => {
|
|
8635
|
+
};
|
|
8636
|
+
var useInsertionEffect2 = React67[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
8637
|
+
function useControllableState2({
|
|
8638
|
+
prop,
|
|
8639
|
+
defaultProp,
|
|
8640
|
+
onChange = () => {
|
|
8641
|
+
},
|
|
8642
|
+
caller
|
|
8643
|
+
}) {
|
|
8644
|
+
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState2({
|
|
8645
|
+
defaultProp,
|
|
8646
|
+
onChange
|
|
8647
|
+
});
|
|
8648
|
+
const isControlled = prop !== void 0;
|
|
8649
|
+
const value = isControlled ? prop : uncontrolledProp;
|
|
8650
|
+
{
|
|
8651
|
+
const isControlledRef = React67.useRef(prop !== void 0);
|
|
8652
|
+
React67.useEffect(() => {
|
|
8653
|
+
const wasControlled = isControlledRef.current;
|
|
8654
|
+
if (wasControlled !== isControlled) {
|
|
8655
|
+
const from2 = wasControlled ? "controlled" : "uncontrolled";
|
|
8656
|
+
const to = isControlled ? "controlled" : "uncontrolled";
|
|
8657
|
+
console.warn(
|
|
8658
|
+
`${caller} is changing from ${from2} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
8659
|
+
);
|
|
8660
|
+
}
|
|
8661
|
+
isControlledRef.current = isControlled;
|
|
8662
|
+
}, [isControlled, caller]);
|
|
8663
|
+
}
|
|
8664
|
+
const setValue = React67.useCallback(
|
|
8665
|
+
(nextValue) => {
|
|
8666
|
+
if (isControlled) {
|
|
8667
|
+
const value2 = isFunction2(nextValue) ? nextValue(prop) : nextValue;
|
|
8668
|
+
if (value2 !== prop) {
|
|
8669
|
+
onChangeRef.current?.(value2);
|
|
8670
|
+
}
|
|
8671
|
+
} else {
|
|
8672
|
+
setUncontrolledProp(nextValue);
|
|
8673
|
+
}
|
|
8674
|
+
},
|
|
8675
|
+
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
8676
|
+
);
|
|
8677
|
+
return [value, setValue];
|
|
8678
|
+
}
|
|
8679
|
+
function useUncontrolledState2({
|
|
8680
|
+
defaultProp,
|
|
8681
|
+
onChange
|
|
8682
|
+
}) {
|
|
8683
|
+
const [value, setValue] = React67.useState(defaultProp);
|
|
8684
|
+
const prevValueRef = React67.useRef(value);
|
|
8685
|
+
const onChangeRef = React67.useRef(onChange);
|
|
8686
|
+
useInsertionEffect2(() => {
|
|
8687
|
+
onChangeRef.current = onChange;
|
|
8688
|
+
}, [onChange]);
|
|
8689
|
+
React67.useEffect(() => {
|
|
8690
|
+
if (prevValueRef.current !== value) {
|
|
8691
|
+
onChangeRef.current?.(value);
|
|
8692
|
+
prevValueRef.current = value;
|
|
8693
|
+
}
|
|
8694
|
+
}, [value, prevValueRef]);
|
|
8695
|
+
return [value, setValue, onChangeRef];
|
|
8696
|
+
}
|
|
8697
|
+
function isFunction2(value) {
|
|
8698
|
+
return typeof value === "function";
|
|
8699
|
+
}
|
|
8532
8700
|
var NAME = "Toggle";
|
|
8533
|
-
var Toggle =
|
|
8701
|
+
var Toggle = React67.forwardRef((props, forwardedRef) => {
|
|
8534
8702
|
const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;
|
|
8535
|
-
const [pressed, setPressed] =
|
|
8703
|
+
const [pressed, setPressed] = useControllableState2({
|
|
8536
8704
|
prop: pressedProp,
|
|
8537
8705
|
onChange: onPressedChange,
|
|
8538
8706
|
defaultProp: defaultPressed ?? false,
|
|
8539
8707
|
caller: NAME
|
|
8540
8708
|
});
|
|
8541
8709
|
return /* @__PURE__ */ jsx(
|
|
8542
|
-
|
|
8710
|
+
Primitive2.button,
|
|
8543
8711
|
{
|
|
8544
8712
|
type: "button",
|
|
8545
8713
|
"aria-pressed": pressed,
|
|
@@ -8547,7 +8715,7 @@ var Toggle = React60.forwardRef((props, forwardedRef) => {
|
|
|
8547
8715
|
"data-disabled": props.disabled ? "" : void 0,
|
|
8548
8716
|
...buttonProps,
|
|
8549
8717
|
ref: forwardedRef,
|
|
8550
|
-
onClick:
|
|
8718
|
+
onClick: composeEventHandlers2(props.onClick, () => {
|
|
8551
8719
|
if (!props.disabled) {
|
|
8552
8720
|
setPressed(!pressed);
|
|
8553
8721
|
}
|
|
@@ -8594,7 +8762,7 @@ var MoonUItoggleVariantsPro = cva(
|
|
|
8594
8762
|
}
|
|
8595
8763
|
}
|
|
8596
8764
|
);
|
|
8597
|
-
var MoonUITogglePro =
|
|
8765
|
+
var MoonUITogglePro = React67.forwardRef(({ className, variant, size: size4, shape, loading, badge, badgeVariant = "default", iconOn, iconOff, iconPosition = "left", children, pressed, onPressedChange, defaultPressed, ...props }, ref) => {
|
|
8598
8766
|
const icon = pressed ? iconOn : iconOff;
|
|
8599
8767
|
return /* @__PURE__ */ jsx(
|
|
8600
8768
|
Root19,
|
|
@@ -8627,6 +8795,40 @@ var MoonUITogglePro = React60.forwardRef(({ className, variant, size: size4, sha
|
|
|
8627
8795
|
);
|
|
8628
8796
|
});
|
|
8629
8797
|
MoonUITogglePro.displayName = Root19.displayName;
|
|
8798
|
+
function setRef2(ref, value) {
|
|
8799
|
+
if (typeof ref === "function") {
|
|
8800
|
+
return ref(value);
|
|
8801
|
+
} else if (ref !== null && ref !== void 0) {
|
|
8802
|
+
ref.current = value;
|
|
8803
|
+
}
|
|
8804
|
+
}
|
|
8805
|
+
function composeRefs2(...refs) {
|
|
8806
|
+
return (node) => {
|
|
8807
|
+
let hasCleanup = false;
|
|
8808
|
+
const cleanups = refs.map((ref) => {
|
|
8809
|
+
const cleanup = setRef2(ref, node);
|
|
8810
|
+
if (!hasCleanup && typeof cleanup == "function") {
|
|
8811
|
+
hasCleanup = true;
|
|
8812
|
+
}
|
|
8813
|
+
return cleanup;
|
|
8814
|
+
});
|
|
8815
|
+
if (hasCleanup) {
|
|
8816
|
+
return () => {
|
|
8817
|
+
for (let i = 0; i < cleanups.length; i++) {
|
|
8818
|
+
const cleanup = cleanups[i];
|
|
8819
|
+
if (typeof cleanup == "function") {
|
|
8820
|
+
cleanup();
|
|
8821
|
+
} else {
|
|
8822
|
+
setRef2(refs[i], null);
|
|
8823
|
+
}
|
|
8824
|
+
}
|
|
8825
|
+
};
|
|
8826
|
+
}
|
|
8827
|
+
};
|
|
8828
|
+
}
|
|
8829
|
+
function useComposedRefs2(...refs) {
|
|
8830
|
+
return React67.useCallback(composeRefs2(...refs), refs);
|
|
8831
|
+
}
|
|
8630
8832
|
|
|
8631
8833
|
// ../../node_modules/@floating-ui/utils/dist/floating-ui.utils.mjs
|
|
8632
8834
|
var sides = ["top", "right", "bottom", "left"];
|
|
@@ -10291,7 +10493,7 @@ function roundByDPR(element, value) {
|
|
|
10291
10493
|
return Math.round(value * dpr) / dpr;
|
|
10292
10494
|
}
|
|
10293
10495
|
function useLatestRef(value) {
|
|
10294
|
-
const ref =
|
|
10496
|
+
const ref = React67.useRef(value);
|
|
10295
10497
|
index(() => {
|
|
10296
10498
|
ref.current = value;
|
|
10297
10499
|
});
|
|
@@ -10314,7 +10516,7 @@ function useFloating(options) {
|
|
|
10314
10516
|
whileElementsMounted,
|
|
10315
10517
|
open
|
|
10316
10518
|
} = options;
|
|
10317
|
-
const [data, setData] =
|
|
10519
|
+
const [data, setData] = React67.useState({
|
|
10318
10520
|
x: 0,
|
|
10319
10521
|
y: 0,
|
|
10320
10522
|
strategy,
|
|
@@ -10322,19 +10524,19 @@ function useFloating(options) {
|
|
|
10322
10524
|
middlewareData: {},
|
|
10323
10525
|
isPositioned: false
|
|
10324
10526
|
});
|
|
10325
|
-
const [latestMiddleware, setLatestMiddleware] =
|
|
10527
|
+
const [latestMiddleware, setLatestMiddleware] = React67.useState(middleware);
|
|
10326
10528
|
if (!deepEqual(latestMiddleware, middleware)) {
|
|
10327
10529
|
setLatestMiddleware(middleware);
|
|
10328
10530
|
}
|
|
10329
|
-
const [_reference, _setReference] =
|
|
10330
|
-
const [_floating, _setFloating] =
|
|
10331
|
-
const setReference =
|
|
10531
|
+
const [_reference, _setReference] = React67.useState(null);
|
|
10532
|
+
const [_floating, _setFloating] = React67.useState(null);
|
|
10533
|
+
const setReference = React67.useCallback((node) => {
|
|
10332
10534
|
if (node !== referenceRef.current) {
|
|
10333
10535
|
referenceRef.current = node;
|
|
10334
10536
|
_setReference(node);
|
|
10335
10537
|
}
|
|
10336
10538
|
}, []);
|
|
10337
|
-
const setFloating =
|
|
10539
|
+
const setFloating = React67.useCallback((node) => {
|
|
10338
10540
|
if (node !== floatingRef.current) {
|
|
10339
10541
|
floatingRef.current = node;
|
|
10340
10542
|
_setFloating(node);
|
|
@@ -10342,14 +10544,14 @@ function useFloating(options) {
|
|
|
10342
10544
|
}, []);
|
|
10343
10545
|
const referenceEl = externalReference || _reference;
|
|
10344
10546
|
const floatingEl = externalFloating || _floating;
|
|
10345
|
-
const referenceRef =
|
|
10346
|
-
const floatingRef =
|
|
10347
|
-
const dataRef =
|
|
10547
|
+
const referenceRef = React67.useRef(null);
|
|
10548
|
+
const floatingRef = React67.useRef(null);
|
|
10549
|
+
const dataRef = React67.useRef(data);
|
|
10348
10550
|
const hasWhileElementsMounted = whileElementsMounted != null;
|
|
10349
10551
|
const whileElementsMountedRef = useLatestRef(whileElementsMounted);
|
|
10350
10552
|
const platformRef = useLatestRef(platform2);
|
|
10351
10553
|
const openRef = useLatestRef(open);
|
|
10352
|
-
const update =
|
|
10554
|
+
const update = React67.useCallback(() => {
|
|
10353
10555
|
if (!referenceRef.current || !floatingRef.current) {
|
|
10354
10556
|
return;
|
|
10355
10557
|
}
|
|
@@ -10372,7 +10574,7 @@ function useFloating(options) {
|
|
|
10372
10574
|
};
|
|
10373
10575
|
if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {
|
|
10374
10576
|
dataRef.current = fullData;
|
|
10375
|
-
|
|
10577
|
+
ReactDOM2.flushSync(() => {
|
|
10376
10578
|
setData(fullData);
|
|
10377
10579
|
});
|
|
10378
10580
|
}
|
|
@@ -10387,7 +10589,7 @@ function useFloating(options) {
|
|
|
10387
10589
|
}));
|
|
10388
10590
|
}
|
|
10389
10591
|
}, [open]);
|
|
10390
|
-
const isMountedRef =
|
|
10592
|
+
const isMountedRef = React67.useRef(false);
|
|
10391
10593
|
index(() => {
|
|
10392
10594
|
isMountedRef.current = true;
|
|
10393
10595
|
return () => {
|
|
@@ -10406,17 +10608,17 @@ function useFloating(options) {
|
|
|
10406
10608
|
update();
|
|
10407
10609
|
}
|
|
10408
10610
|
}, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);
|
|
10409
|
-
const refs =
|
|
10611
|
+
const refs = React67.useMemo(() => ({
|
|
10410
10612
|
reference: referenceRef,
|
|
10411
10613
|
floating: floatingRef,
|
|
10412
10614
|
setReference,
|
|
10413
10615
|
setFloating
|
|
10414
10616
|
}), [setReference, setFloating]);
|
|
10415
|
-
const elements =
|
|
10617
|
+
const elements = React67.useMemo(() => ({
|
|
10416
10618
|
reference: referenceEl,
|
|
10417
10619
|
floating: floatingEl
|
|
10418
10620
|
}), [referenceEl, floatingEl]);
|
|
10419
|
-
const floatingStyles =
|
|
10621
|
+
const floatingStyles = React67.useMemo(() => {
|
|
10420
10622
|
const initialStyles = {
|
|
10421
10623
|
position: strategy,
|
|
10422
10624
|
left: 0,
|
|
@@ -10442,7 +10644,7 @@ function useFloating(options) {
|
|
|
10442
10644
|
top: y
|
|
10443
10645
|
};
|
|
10444
10646
|
}, [strategy, transform, elements.floating, data.x, data.y]);
|
|
10445
|
-
return
|
|
10647
|
+
return React67.useMemo(() => ({
|
|
10446
10648
|
...data,
|
|
10447
10649
|
update,
|
|
10448
10650
|
refs,
|
|
@@ -10510,10 +10712,10 @@ var arrow3 = (options, deps) => ({
|
|
|
10510
10712
|
options: [options, deps]
|
|
10511
10713
|
});
|
|
10512
10714
|
var NAME2 = "Arrow";
|
|
10513
|
-
var Arrow2 =
|
|
10715
|
+
var Arrow2 = React67.forwardRef((props, forwardedRef) => {
|
|
10514
10716
|
const { children, width = 10, height = 5, ...arrowProps } = props;
|
|
10515
10717
|
return /* @__PURE__ */ jsx(
|
|
10516
|
-
|
|
10718
|
+
Primitive2.svg,
|
|
10517
10719
|
{
|
|
10518
10720
|
...arrowProps,
|
|
10519
10721
|
ref: forwardedRef,
|
|
@@ -10528,15 +10730,15 @@ var Arrow2 = React60.forwardRef((props, forwardedRef) => {
|
|
|
10528
10730
|
Arrow2.displayName = NAME2;
|
|
10529
10731
|
var Root20 = Arrow2;
|
|
10530
10732
|
function useCallbackRef(callback) {
|
|
10531
|
-
const callbackRef =
|
|
10532
|
-
|
|
10733
|
+
const callbackRef = React67.useRef(callback);
|
|
10734
|
+
React67.useEffect(() => {
|
|
10533
10735
|
callbackRef.current = callback;
|
|
10534
10736
|
});
|
|
10535
|
-
return
|
|
10737
|
+
return React67.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
10536
10738
|
}
|
|
10537
10739
|
function useSize(element) {
|
|
10538
|
-
const [size4, setSize] =
|
|
10539
|
-
|
|
10740
|
+
const [size4, setSize] = React67.useState(void 0);
|
|
10741
|
+
useLayoutEffect22(() => {
|
|
10540
10742
|
if (element) {
|
|
10541
10743
|
setSize({ width: element.offsetWidth, height: element.offsetHeight });
|
|
10542
10744
|
const resizeObserver = new ResizeObserver((entries) => {
|
|
@@ -10569,31 +10771,31 @@ function useSize(element) {
|
|
|
10569
10771
|
return size4;
|
|
10570
10772
|
}
|
|
10571
10773
|
var POPPER_NAME = "Popper";
|
|
10572
|
-
var [createPopperContext, createPopperScope] =
|
|
10774
|
+
var [createPopperContext, createPopperScope] = createContextScope2(POPPER_NAME);
|
|
10573
10775
|
var [PopperProvider, usePopperContext] = createPopperContext(POPPER_NAME);
|
|
10574
10776
|
var Popper = (props) => {
|
|
10575
10777
|
const { __scopePopper, children } = props;
|
|
10576
|
-
const [anchor, setAnchor] =
|
|
10778
|
+
const [anchor, setAnchor] = React67.useState(null);
|
|
10577
10779
|
return /* @__PURE__ */ jsx(PopperProvider, { scope: __scopePopper, anchor, onAnchorChange: setAnchor, children });
|
|
10578
10780
|
};
|
|
10579
10781
|
Popper.displayName = POPPER_NAME;
|
|
10580
10782
|
var ANCHOR_NAME = "PopperAnchor";
|
|
10581
|
-
var PopperAnchor =
|
|
10783
|
+
var PopperAnchor = React67.forwardRef(
|
|
10582
10784
|
(props, forwardedRef) => {
|
|
10583
10785
|
const { __scopePopper, virtualRef, ...anchorProps } = props;
|
|
10584
10786
|
const context = usePopperContext(ANCHOR_NAME, __scopePopper);
|
|
10585
|
-
const ref =
|
|
10586
|
-
const composedRefs =
|
|
10587
|
-
|
|
10787
|
+
const ref = React67.useRef(null);
|
|
10788
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
10789
|
+
React67.useEffect(() => {
|
|
10588
10790
|
context.onAnchorChange(virtualRef?.current || ref.current);
|
|
10589
10791
|
});
|
|
10590
|
-
return virtualRef ? null : /* @__PURE__ */ jsx(
|
|
10792
|
+
return virtualRef ? null : /* @__PURE__ */ jsx(Primitive2.div, { ...anchorProps, ref: composedRefs });
|
|
10591
10793
|
}
|
|
10592
10794
|
);
|
|
10593
10795
|
PopperAnchor.displayName = ANCHOR_NAME;
|
|
10594
10796
|
var CONTENT_NAME2 = "PopperContent";
|
|
10595
10797
|
var [PopperContentProvider, useContentContext] = createPopperContext(CONTENT_NAME2);
|
|
10596
|
-
var PopperContent =
|
|
10798
|
+
var PopperContent = React67.forwardRef(
|
|
10597
10799
|
(props, forwardedRef) => {
|
|
10598
10800
|
const {
|
|
10599
10801
|
__scopePopper,
|
|
@@ -10612,9 +10814,9 @@ var PopperContent = React60.forwardRef(
|
|
|
10612
10814
|
...contentProps
|
|
10613
10815
|
} = props;
|
|
10614
10816
|
const context = usePopperContext(CONTENT_NAME2, __scopePopper);
|
|
10615
|
-
const [content, setContent2] =
|
|
10616
|
-
const composedRefs =
|
|
10617
|
-
const [arrow6, setArrow] =
|
|
10817
|
+
const [content, setContent2] = React67.useState(null);
|
|
10818
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node) => setContent2(node));
|
|
10819
|
+
const [arrow6, setArrow] = React67.useState(null);
|
|
10618
10820
|
const arrowSize = useSize(arrow6);
|
|
10619
10821
|
const arrowWidth = arrowSize?.width ?? 0;
|
|
10620
10822
|
const arrowHeight = arrowSize?.height ?? 0;
|
|
@@ -10668,7 +10870,7 @@ var PopperContent = React60.forwardRef(
|
|
|
10668
10870
|
});
|
|
10669
10871
|
const [placedSide, placedAlign] = getSideAndAlignFromPlacement(placement);
|
|
10670
10872
|
const handlePlaced = useCallbackRef(onPlaced);
|
|
10671
|
-
|
|
10873
|
+
useLayoutEffect22(() => {
|
|
10672
10874
|
if (isPositioned) {
|
|
10673
10875
|
handlePlaced?.();
|
|
10674
10876
|
}
|
|
@@ -10676,8 +10878,8 @@ var PopperContent = React60.forwardRef(
|
|
|
10676
10878
|
const arrowX = middlewareData.arrow?.x;
|
|
10677
10879
|
const arrowY = middlewareData.arrow?.y;
|
|
10678
10880
|
const cannotCenterArrow = middlewareData.arrow?.centerOffset !== 0;
|
|
10679
|
-
const [contentZIndex, setContentZIndex] =
|
|
10680
|
-
|
|
10881
|
+
const [contentZIndex, setContentZIndex] = React67.useState();
|
|
10882
|
+
useLayoutEffect22(() => {
|
|
10681
10883
|
if (content)
|
|
10682
10884
|
setContentZIndex(window.getComputedStyle(content).zIndex);
|
|
10683
10885
|
}, [content]);
|
|
@@ -10715,7 +10917,7 @@ var PopperContent = React60.forwardRef(
|
|
|
10715
10917
|
arrowY,
|
|
10716
10918
|
shouldHideArrow: cannotCenterArrow,
|
|
10717
10919
|
children: /* @__PURE__ */ jsx(
|
|
10718
|
-
|
|
10920
|
+
Primitive2.div,
|
|
10719
10921
|
{
|
|
10720
10922
|
"data-side": placedSide,
|
|
10721
10923
|
"data-align": placedAlign,
|
|
@@ -10743,7 +10945,7 @@ var OPPOSITE_SIDE = {
|
|
|
10743
10945
|
bottom: "top",
|
|
10744
10946
|
left: "right"
|
|
10745
10947
|
};
|
|
10746
|
-
var PopperArrow =
|
|
10948
|
+
var PopperArrow = React67.forwardRef(function PopperArrow2(props, forwardedRef) {
|
|
10747
10949
|
const { __scopePopper, ...arrowProps } = props;
|
|
10748
10950
|
const contentContext = useContentContext(ARROW_NAME, __scopePopper);
|
|
10749
10951
|
const baseSide = OPPOSITE_SIDE[contentContext.placedSide];
|
|
@@ -10834,17 +11036,139 @@ var Anchor2 = PopperAnchor;
|
|
|
10834
11036
|
var Content11 = PopperContent;
|
|
10835
11037
|
var Arrow3 = PopperArrow;
|
|
10836
11038
|
var PORTAL_NAME = "Portal";
|
|
10837
|
-
var Portal5 =
|
|
11039
|
+
var Portal5 = React67.forwardRef((props, forwardedRef) => {
|
|
10838
11040
|
const { container: containerProp, ...portalProps } = props;
|
|
10839
|
-
const [mounted, setMounted] =
|
|
10840
|
-
|
|
11041
|
+
const [mounted, setMounted] = React67.useState(false);
|
|
11042
|
+
useLayoutEffect22(() => setMounted(true), []);
|
|
10841
11043
|
const container = containerProp || mounted && globalThis?.document?.body;
|
|
10842
|
-
return container ?
|
|
11044
|
+
return container ? ReactDOM2__default.createPortal(/* @__PURE__ */ jsx(Primitive2.div, { ...portalProps, ref: forwardedRef }), container) : null;
|
|
10843
11045
|
});
|
|
10844
11046
|
Portal5.displayName = PORTAL_NAME;
|
|
11047
|
+
function useStateMachine2(initialState, machine) {
|
|
11048
|
+
return React67.useReducer((state, event) => {
|
|
11049
|
+
const nextState = machine[state][event];
|
|
11050
|
+
return nextState ?? state;
|
|
11051
|
+
}, initialState);
|
|
11052
|
+
}
|
|
11053
|
+
var Presence2 = (props) => {
|
|
11054
|
+
const { present, children } = props;
|
|
11055
|
+
const presence = usePresence2(present);
|
|
11056
|
+
const child = typeof children === "function" ? children({ present: presence.isPresent }) : React67.Children.only(children);
|
|
11057
|
+
const ref = useComposedRefs2(presence.ref, getElementRef2(child));
|
|
11058
|
+
const forceMount = typeof children === "function";
|
|
11059
|
+
return forceMount || presence.isPresent ? React67.cloneElement(child, { ref }) : null;
|
|
11060
|
+
};
|
|
11061
|
+
Presence2.displayName = "Presence";
|
|
11062
|
+
function usePresence2(present) {
|
|
11063
|
+
const [node, setNode2] = React67.useState();
|
|
11064
|
+
const stylesRef = React67.useRef(null);
|
|
11065
|
+
const prevPresentRef = React67.useRef(present);
|
|
11066
|
+
const prevAnimationNameRef = React67.useRef("none");
|
|
11067
|
+
const initialState = present ? "mounted" : "unmounted";
|
|
11068
|
+
const [state, send] = useStateMachine2(initialState, {
|
|
11069
|
+
mounted: {
|
|
11070
|
+
UNMOUNT: "unmounted",
|
|
11071
|
+
ANIMATION_OUT: "unmountSuspended"
|
|
11072
|
+
},
|
|
11073
|
+
unmountSuspended: {
|
|
11074
|
+
MOUNT: "mounted",
|
|
11075
|
+
ANIMATION_END: "unmounted"
|
|
11076
|
+
},
|
|
11077
|
+
unmounted: {
|
|
11078
|
+
MOUNT: "mounted"
|
|
11079
|
+
}
|
|
11080
|
+
});
|
|
11081
|
+
React67.useEffect(() => {
|
|
11082
|
+
const currentAnimationName = getAnimationName2(stylesRef.current);
|
|
11083
|
+
prevAnimationNameRef.current = state === "mounted" ? currentAnimationName : "none";
|
|
11084
|
+
}, [state]);
|
|
11085
|
+
useLayoutEffect22(() => {
|
|
11086
|
+
const styles = stylesRef.current;
|
|
11087
|
+
const wasPresent = prevPresentRef.current;
|
|
11088
|
+
const hasPresentChanged = wasPresent !== present;
|
|
11089
|
+
if (hasPresentChanged) {
|
|
11090
|
+
const prevAnimationName = prevAnimationNameRef.current;
|
|
11091
|
+
const currentAnimationName = getAnimationName2(styles);
|
|
11092
|
+
if (present) {
|
|
11093
|
+
send("MOUNT");
|
|
11094
|
+
} else if (currentAnimationName === "none" || styles?.display === "none") {
|
|
11095
|
+
send("UNMOUNT");
|
|
11096
|
+
} else {
|
|
11097
|
+
const isAnimating = prevAnimationName !== currentAnimationName;
|
|
11098
|
+
if (wasPresent && isAnimating) {
|
|
11099
|
+
send("ANIMATION_OUT");
|
|
11100
|
+
} else {
|
|
11101
|
+
send("UNMOUNT");
|
|
11102
|
+
}
|
|
11103
|
+
}
|
|
11104
|
+
prevPresentRef.current = present;
|
|
11105
|
+
}
|
|
11106
|
+
}, [present, send]);
|
|
11107
|
+
useLayoutEffect22(() => {
|
|
11108
|
+
if (node) {
|
|
11109
|
+
let timeoutId;
|
|
11110
|
+
const ownerWindow = node.ownerDocument.defaultView ?? window;
|
|
11111
|
+
const handleAnimationEnd = (event) => {
|
|
11112
|
+
const currentAnimationName = getAnimationName2(stylesRef.current);
|
|
11113
|
+
const isCurrentAnimation = currentAnimationName.includes(event.animationName);
|
|
11114
|
+
if (event.target === node && isCurrentAnimation) {
|
|
11115
|
+
send("ANIMATION_END");
|
|
11116
|
+
if (!prevPresentRef.current) {
|
|
11117
|
+
const currentFillMode = node.style.animationFillMode;
|
|
11118
|
+
node.style.animationFillMode = "forwards";
|
|
11119
|
+
timeoutId = ownerWindow.setTimeout(() => {
|
|
11120
|
+
if (node.style.animationFillMode === "forwards") {
|
|
11121
|
+
node.style.animationFillMode = currentFillMode;
|
|
11122
|
+
}
|
|
11123
|
+
});
|
|
11124
|
+
}
|
|
11125
|
+
}
|
|
11126
|
+
};
|
|
11127
|
+
const handleAnimationStart = (event) => {
|
|
11128
|
+
if (event.target === node) {
|
|
11129
|
+
prevAnimationNameRef.current = getAnimationName2(stylesRef.current);
|
|
11130
|
+
}
|
|
11131
|
+
};
|
|
11132
|
+
node.addEventListener("animationstart", handleAnimationStart);
|
|
11133
|
+
node.addEventListener("animationcancel", handleAnimationEnd);
|
|
11134
|
+
node.addEventListener("animationend", handleAnimationEnd);
|
|
11135
|
+
return () => {
|
|
11136
|
+
ownerWindow.clearTimeout(timeoutId);
|
|
11137
|
+
node.removeEventListener("animationstart", handleAnimationStart);
|
|
11138
|
+
node.removeEventListener("animationcancel", handleAnimationEnd);
|
|
11139
|
+
node.removeEventListener("animationend", handleAnimationEnd);
|
|
11140
|
+
};
|
|
11141
|
+
} else {
|
|
11142
|
+
send("ANIMATION_END");
|
|
11143
|
+
}
|
|
11144
|
+
}, [node, send]);
|
|
11145
|
+
return {
|
|
11146
|
+
isPresent: ["mounted", "unmountSuspended"].includes(state),
|
|
11147
|
+
ref: React67.useCallback((node2) => {
|
|
11148
|
+
stylesRef.current = node2 ? getComputedStyle(node2) : null;
|
|
11149
|
+
setNode2(node2);
|
|
11150
|
+
}, [])
|
|
11151
|
+
};
|
|
11152
|
+
}
|
|
11153
|
+
function getAnimationName2(styles) {
|
|
11154
|
+
return styles?.animationName || "none";
|
|
11155
|
+
}
|
|
11156
|
+
function getElementRef2(element) {
|
|
11157
|
+
let getter = Object.getOwnPropertyDescriptor(element.props, "ref")?.get;
|
|
11158
|
+
let mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
11159
|
+
if (mayWarn) {
|
|
11160
|
+
return element.ref;
|
|
11161
|
+
}
|
|
11162
|
+
getter = Object.getOwnPropertyDescriptor(element, "ref")?.get;
|
|
11163
|
+
mayWarn = getter && "isReactWarning" in getter && getter.isReactWarning;
|
|
11164
|
+
if (mayWarn) {
|
|
11165
|
+
return element.props.ref;
|
|
11166
|
+
}
|
|
11167
|
+
return element.props.ref || element.ref;
|
|
11168
|
+
}
|
|
10845
11169
|
function useEscapeKeydown(onEscapeKeyDownProp, ownerDocument = globalThis?.document) {
|
|
10846
11170
|
const onEscapeKeyDown = useCallbackRef(onEscapeKeyDownProp);
|
|
10847
|
-
|
|
11171
|
+
React67.useEffect(() => {
|
|
10848
11172
|
const handleKeyDown3 = (event) => {
|
|
10849
11173
|
if (event.key === "Escape") {
|
|
10850
11174
|
onEscapeKeyDown(event);
|
|
@@ -10859,12 +11183,12 @@ var CONTEXT_UPDATE = "dismissableLayer.update";
|
|
|
10859
11183
|
var POINTER_DOWN_OUTSIDE = "dismissableLayer.pointerDownOutside";
|
|
10860
11184
|
var FOCUS_OUTSIDE = "dismissableLayer.focusOutside";
|
|
10861
11185
|
var originalBodyPointerEvents;
|
|
10862
|
-
var DismissableLayerContext =
|
|
11186
|
+
var DismissableLayerContext = React67.createContext({
|
|
10863
11187
|
layers: /* @__PURE__ */ new Set(),
|
|
10864
11188
|
layersWithOutsidePointerEventsDisabled: /* @__PURE__ */ new Set(),
|
|
10865
11189
|
branches: /* @__PURE__ */ new Set()
|
|
10866
11190
|
});
|
|
10867
|
-
var DismissableLayer =
|
|
11191
|
+
var DismissableLayer = React67.forwardRef(
|
|
10868
11192
|
(props, forwardedRef) => {
|
|
10869
11193
|
const {
|
|
10870
11194
|
disableOutsidePointerEvents = false,
|
|
@@ -10875,11 +11199,11 @@ var DismissableLayer = React60.forwardRef(
|
|
|
10875
11199
|
onDismiss,
|
|
10876
11200
|
...layerProps
|
|
10877
11201
|
} = props;
|
|
10878
|
-
const context =
|
|
10879
|
-
const [node, setNode2] =
|
|
11202
|
+
const context = React67.useContext(DismissableLayerContext);
|
|
11203
|
+
const [node, setNode2] = React67.useState(null);
|
|
10880
11204
|
const ownerDocument = node?.ownerDocument ?? globalThis?.document;
|
|
10881
|
-
const [, force] =
|
|
10882
|
-
const composedRefs =
|
|
11205
|
+
const [, force] = React67.useState({});
|
|
11206
|
+
const composedRefs = useComposedRefs2(forwardedRef, (node2) => setNode2(node2));
|
|
10883
11207
|
const layers = Array.from(context.layers);
|
|
10884
11208
|
const [highestLayerWithOutsidePointerEventsDisabled] = [...context.layersWithOutsidePointerEventsDisabled].slice(-1);
|
|
10885
11209
|
const highestLayerWithOutsidePointerEventsDisabledIndex = layers.indexOf(highestLayerWithOutsidePointerEventsDisabled);
|
|
@@ -10916,7 +11240,7 @@ var DismissableLayer = React60.forwardRef(
|
|
|
10916
11240
|
onDismiss();
|
|
10917
11241
|
}
|
|
10918
11242
|
}, ownerDocument);
|
|
10919
|
-
|
|
11243
|
+
React67.useEffect(() => {
|
|
10920
11244
|
if (!node)
|
|
10921
11245
|
return;
|
|
10922
11246
|
if (disableOutsidePointerEvents) {
|
|
@@ -10934,7 +11258,7 @@ var DismissableLayer = React60.forwardRef(
|
|
|
10934
11258
|
}
|
|
10935
11259
|
};
|
|
10936
11260
|
}, [node, ownerDocument, disableOutsidePointerEvents, context]);
|
|
10937
|
-
|
|
11261
|
+
React67.useEffect(() => {
|
|
10938
11262
|
return () => {
|
|
10939
11263
|
if (!node)
|
|
10940
11264
|
return;
|
|
@@ -10943,13 +11267,13 @@ var DismissableLayer = React60.forwardRef(
|
|
|
10943
11267
|
dispatchUpdate();
|
|
10944
11268
|
};
|
|
10945
11269
|
}, [node, context]);
|
|
10946
|
-
|
|
11270
|
+
React67.useEffect(() => {
|
|
10947
11271
|
const handleUpdate = () => force({});
|
|
10948
11272
|
document.addEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
10949
11273
|
return () => document.removeEventListener(CONTEXT_UPDATE, handleUpdate);
|
|
10950
11274
|
}, []);
|
|
10951
11275
|
return /* @__PURE__ */ jsx(
|
|
10952
|
-
|
|
11276
|
+
Primitive2.div,
|
|
10953
11277
|
{
|
|
10954
11278
|
...layerProps,
|
|
10955
11279
|
ref: composedRefs,
|
|
@@ -10957,9 +11281,9 @@ var DismissableLayer = React60.forwardRef(
|
|
|
10957
11281
|
pointerEvents: isBodyPointerEventsDisabled ? isPointerEventsEnabled ? "auto" : "none" : void 0,
|
|
10958
11282
|
...props.style
|
|
10959
11283
|
},
|
|
10960
|
-
onFocusCapture:
|
|
10961
|
-
onBlurCapture:
|
|
10962
|
-
onPointerDownCapture:
|
|
11284
|
+
onFocusCapture: composeEventHandlers2(props.onFocusCapture, focusOutside.onFocusCapture),
|
|
11285
|
+
onBlurCapture: composeEventHandlers2(props.onBlurCapture, focusOutside.onBlurCapture),
|
|
11286
|
+
onPointerDownCapture: composeEventHandlers2(
|
|
10963
11287
|
props.onPointerDownCapture,
|
|
10964
11288
|
pointerDownOutside.onPointerDownCapture
|
|
10965
11289
|
)
|
|
@@ -10969,11 +11293,11 @@ var DismissableLayer = React60.forwardRef(
|
|
|
10969
11293
|
);
|
|
10970
11294
|
DismissableLayer.displayName = DISMISSABLE_LAYER_NAME;
|
|
10971
11295
|
var BRANCH_NAME = "DismissableLayerBranch";
|
|
10972
|
-
var DismissableLayerBranch =
|
|
10973
|
-
const context =
|
|
10974
|
-
const ref =
|
|
10975
|
-
const composedRefs =
|
|
10976
|
-
|
|
11296
|
+
var DismissableLayerBranch = React67.forwardRef((props, forwardedRef) => {
|
|
11297
|
+
const context = React67.useContext(DismissableLayerContext);
|
|
11298
|
+
const ref = React67.useRef(null);
|
|
11299
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
11300
|
+
React67.useEffect(() => {
|
|
10977
11301
|
const node = ref.current;
|
|
10978
11302
|
if (node) {
|
|
10979
11303
|
context.branches.add(node);
|
|
@@ -10982,15 +11306,15 @@ var DismissableLayerBranch = React60.forwardRef((props, forwardedRef) => {
|
|
|
10982
11306
|
};
|
|
10983
11307
|
}
|
|
10984
11308
|
}, [context.branches]);
|
|
10985
|
-
return /* @__PURE__ */ jsx(
|
|
11309
|
+
return /* @__PURE__ */ jsx(Primitive2.div, { ...props, ref: composedRefs });
|
|
10986
11310
|
});
|
|
10987
11311
|
DismissableLayerBranch.displayName = BRANCH_NAME;
|
|
10988
11312
|
function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?.document) {
|
|
10989
11313
|
const handlePointerDownOutside = useCallbackRef(onPointerDownOutside);
|
|
10990
|
-
const isPointerInsideReactTreeRef =
|
|
10991
|
-
const handleClickRef =
|
|
11314
|
+
const isPointerInsideReactTreeRef = React67.useRef(false);
|
|
11315
|
+
const handleClickRef = React67.useRef(() => {
|
|
10992
11316
|
});
|
|
10993
|
-
|
|
11317
|
+
React67.useEffect(() => {
|
|
10994
11318
|
const handlePointerDown = (event) => {
|
|
10995
11319
|
if (event.target && !isPointerInsideReactTreeRef.current) {
|
|
10996
11320
|
let handleAndDispatchPointerDownOutsideEvent2 = function() {
|
|
@@ -11030,8 +11354,8 @@ function usePointerDownOutside(onPointerDownOutside, ownerDocument = globalThis?
|
|
|
11030
11354
|
}
|
|
11031
11355
|
function useFocusOutside(onFocusOutside, ownerDocument = globalThis?.document) {
|
|
11032
11356
|
const handleFocusOutside = useCallbackRef(onFocusOutside);
|
|
11033
|
-
const isFocusInsideReactTreeRef =
|
|
11034
|
-
|
|
11357
|
+
const isFocusInsideReactTreeRef = React67.useRef(false);
|
|
11358
|
+
React67.useEffect(() => {
|
|
11035
11359
|
const handleFocus = (event) => {
|
|
11036
11360
|
if (event.target && !isFocusInsideReactTreeRef.current) {
|
|
11037
11361
|
const eventDetail = { originalEvent: event };
|
|
@@ -11065,7 +11389,7 @@ function handleAndDispatchCustomEvent(name, handler, detail, { discrete }) {
|
|
|
11065
11389
|
}
|
|
11066
11390
|
var originalBodyUserSelect;
|
|
11067
11391
|
var HOVERCARD_NAME = "HoverCard";
|
|
11068
|
-
var [createHoverCardContext, createHoverCardScope] =
|
|
11392
|
+
var [createHoverCardContext, createHoverCardScope] = createContextScope2(HOVERCARD_NAME, [
|
|
11069
11393
|
createPopperScope
|
|
11070
11394
|
]);
|
|
11071
11395
|
var usePopperScope = createPopperScope();
|
|
@@ -11081,28 +11405,28 @@ var HoverCard = (props) => {
|
|
|
11081
11405
|
closeDelay = 300
|
|
11082
11406
|
} = props;
|
|
11083
11407
|
const popperScope = usePopperScope(__scopeHoverCard);
|
|
11084
|
-
const openTimerRef =
|
|
11085
|
-
const closeTimerRef =
|
|
11086
|
-
const hasSelectionRef =
|
|
11087
|
-
const isPointerDownOnContentRef =
|
|
11088
|
-
const [open, setOpen] =
|
|
11408
|
+
const openTimerRef = React67.useRef(0);
|
|
11409
|
+
const closeTimerRef = React67.useRef(0);
|
|
11410
|
+
const hasSelectionRef = React67.useRef(false);
|
|
11411
|
+
const isPointerDownOnContentRef = React67.useRef(false);
|
|
11412
|
+
const [open, setOpen] = useControllableState2({
|
|
11089
11413
|
prop: openProp,
|
|
11090
11414
|
defaultProp: defaultOpen ?? false,
|
|
11091
11415
|
onChange: onOpenChange,
|
|
11092
11416
|
caller: HOVERCARD_NAME
|
|
11093
11417
|
});
|
|
11094
|
-
const handleOpen =
|
|
11418
|
+
const handleOpen = React67.useCallback(() => {
|
|
11095
11419
|
clearTimeout(closeTimerRef.current);
|
|
11096
11420
|
openTimerRef.current = window.setTimeout(() => setOpen(true), openDelay);
|
|
11097
11421
|
}, [openDelay, setOpen]);
|
|
11098
|
-
const handleClose =
|
|
11422
|
+
const handleClose = React67.useCallback(() => {
|
|
11099
11423
|
clearTimeout(openTimerRef.current);
|
|
11100
11424
|
if (!hasSelectionRef.current && !isPointerDownOnContentRef.current) {
|
|
11101
11425
|
closeTimerRef.current = window.setTimeout(() => setOpen(false), closeDelay);
|
|
11102
11426
|
}
|
|
11103
11427
|
}, [closeDelay, setOpen]);
|
|
11104
|
-
const handleDismiss =
|
|
11105
|
-
|
|
11428
|
+
const handleDismiss = React67.useCallback(() => setOpen(false), [setOpen]);
|
|
11429
|
+
React67.useEffect(() => {
|
|
11106
11430
|
return () => {
|
|
11107
11431
|
clearTimeout(openTimerRef.current);
|
|
11108
11432
|
clearTimeout(closeTimerRef.current);
|
|
@@ -11125,22 +11449,22 @@ var HoverCard = (props) => {
|
|
|
11125
11449
|
};
|
|
11126
11450
|
HoverCard.displayName = HOVERCARD_NAME;
|
|
11127
11451
|
var TRIGGER_NAME2 = "HoverCardTrigger";
|
|
11128
|
-
var HoverCardTrigger =
|
|
11452
|
+
var HoverCardTrigger = React67.forwardRef(
|
|
11129
11453
|
(props, forwardedRef) => {
|
|
11130
11454
|
const { __scopeHoverCard, ...triggerProps } = props;
|
|
11131
11455
|
const context = useHoverCardContext(TRIGGER_NAME2, __scopeHoverCard);
|
|
11132
11456
|
const popperScope = usePopperScope(__scopeHoverCard);
|
|
11133
11457
|
return /* @__PURE__ */ jsx(Anchor2, { asChild: true, ...popperScope, children: /* @__PURE__ */ jsx(
|
|
11134
|
-
|
|
11458
|
+
Primitive2.a,
|
|
11135
11459
|
{
|
|
11136
11460
|
"data-state": context.open ? "open" : "closed",
|
|
11137
11461
|
...triggerProps,
|
|
11138
11462
|
ref: forwardedRef,
|
|
11139
|
-
onPointerEnter:
|
|
11140
|
-
onPointerLeave:
|
|
11141
|
-
onFocus:
|
|
11142
|
-
onBlur:
|
|
11143
|
-
onTouchStart:
|
|
11463
|
+
onPointerEnter: composeEventHandlers2(props.onPointerEnter, excludeTouch(context.onOpen)),
|
|
11464
|
+
onPointerLeave: composeEventHandlers2(props.onPointerLeave, excludeTouch(context.onClose)),
|
|
11465
|
+
onFocus: composeEventHandlers2(props.onFocus, context.onOpen),
|
|
11466
|
+
onBlur: composeEventHandlers2(props.onBlur, context.onClose),
|
|
11467
|
+
onTouchStart: composeEventHandlers2(props.onTouchStart, (event) => event.preventDefault())
|
|
11144
11468
|
}
|
|
11145
11469
|
) });
|
|
11146
11470
|
}
|
|
@@ -11151,25 +11475,25 @@ var [PortalProvider, usePortalContext] = createHoverCardContext(PORTAL_NAME2, {
|
|
|
11151
11475
|
forceMount: void 0
|
|
11152
11476
|
});
|
|
11153
11477
|
var CONTENT_NAME3 = "HoverCardContent";
|
|
11154
|
-
var HoverCardContent =
|
|
11478
|
+
var HoverCardContent = React67.forwardRef(
|
|
11155
11479
|
(props, forwardedRef) => {
|
|
11156
11480
|
const portalContext = usePortalContext(CONTENT_NAME3, props.__scopeHoverCard);
|
|
11157
11481
|
const { forceMount = portalContext.forceMount, ...contentProps } = props;
|
|
11158
11482
|
const context = useHoverCardContext(CONTENT_NAME3, props.__scopeHoverCard);
|
|
11159
|
-
return /* @__PURE__ */ jsx(
|
|
11483
|
+
return /* @__PURE__ */ jsx(Presence2, { present: forceMount || context.open, children: /* @__PURE__ */ jsx(
|
|
11160
11484
|
HoverCardContentImpl,
|
|
11161
11485
|
{
|
|
11162
11486
|
"data-state": context.open ? "open" : "closed",
|
|
11163
11487
|
...contentProps,
|
|
11164
|
-
onPointerEnter:
|
|
11165
|
-
onPointerLeave:
|
|
11488
|
+
onPointerEnter: composeEventHandlers2(props.onPointerEnter, excludeTouch(context.onOpen)),
|
|
11489
|
+
onPointerLeave: composeEventHandlers2(props.onPointerLeave, excludeTouch(context.onClose)),
|
|
11166
11490
|
ref: forwardedRef
|
|
11167
11491
|
}
|
|
11168
11492
|
) });
|
|
11169
11493
|
}
|
|
11170
11494
|
);
|
|
11171
11495
|
HoverCardContent.displayName = CONTENT_NAME3;
|
|
11172
|
-
var HoverCardContentImpl =
|
|
11496
|
+
var HoverCardContentImpl = React67.forwardRef((props, forwardedRef) => {
|
|
11173
11497
|
const {
|
|
11174
11498
|
__scopeHoverCard,
|
|
11175
11499
|
onEscapeKeyDown,
|
|
@@ -11180,10 +11504,10 @@ var HoverCardContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11180
11504
|
} = props;
|
|
11181
11505
|
const context = useHoverCardContext(CONTENT_NAME3, __scopeHoverCard);
|
|
11182
11506
|
const popperScope = usePopperScope(__scopeHoverCard);
|
|
11183
|
-
const ref =
|
|
11184
|
-
const composedRefs =
|
|
11185
|
-
const [containSelection, setContainSelection] =
|
|
11186
|
-
|
|
11507
|
+
const ref = React67.useRef(null);
|
|
11508
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
11509
|
+
const [containSelection, setContainSelection] = React67.useState(false);
|
|
11510
|
+
React67.useEffect(() => {
|
|
11187
11511
|
if (containSelection) {
|
|
11188
11512
|
const body = document.body;
|
|
11189
11513
|
originalBodyUserSelect = body.style.userSelect || body.style.webkitUserSelect;
|
|
@@ -11195,7 +11519,7 @@ var HoverCardContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11195
11519
|
};
|
|
11196
11520
|
}
|
|
11197
11521
|
}, [containSelection]);
|
|
11198
|
-
|
|
11522
|
+
React67.useEffect(() => {
|
|
11199
11523
|
if (ref.current) {
|
|
11200
11524
|
const handlePointerUp = () => {
|
|
11201
11525
|
setContainSelection(false);
|
|
@@ -11214,7 +11538,7 @@ var HoverCardContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11214
11538
|
};
|
|
11215
11539
|
}
|
|
11216
11540
|
}, [context.isPointerDownOnContentRef, context.hasSelectionRef]);
|
|
11217
|
-
|
|
11541
|
+
React67.useEffect(() => {
|
|
11218
11542
|
if (ref.current) {
|
|
11219
11543
|
const tabbables = getTabbableNodes(ref.current);
|
|
11220
11544
|
tabbables.forEach((tabbable) => tabbable.setAttribute("tabindex", "-1"));
|
|
@@ -11228,7 +11552,7 @@ var HoverCardContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11228
11552
|
onInteractOutside,
|
|
11229
11553
|
onEscapeKeyDown,
|
|
11230
11554
|
onPointerDownOutside,
|
|
11231
|
-
onFocusOutside:
|
|
11555
|
+
onFocusOutside: composeEventHandlers2(onFocusOutside, (event) => {
|
|
11232
11556
|
event.preventDefault();
|
|
11233
11557
|
}),
|
|
11234
11558
|
onDismiss: context.onDismiss,
|
|
@@ -11237,7 +11561,7 @@ var HoverCardContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11237
11561
|
{
|
|
11238
11562
|
...popperScope,
|
|
11239
11563
|
...contentProps,
|
|
11240
|
-
onPointerDown:
|
|
11564
|
+
onPointerDown: composeEventHandlers2(contentProps.onPointerDown, (event) => {
|
|
11241
11565
|
if (event.currentTarget.contains(event.target)) {
|
|
11242
11566
|
setContainSelection(true);
|
|
11243
11567
|
}
|
|
@@ -11265,7 +11589,7 @@ var HoverCardContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11265
11589
|
);
|
|
11266
11590
|
});
|
|
11267
11591
|
var ARROW_NAME2 = "HoverCardArrow";
|
|
11268
|
-
var HoverCardArrow =
|
|
11592
|
+
var HoverCardArrow = React67.forwardRef(
|
|
11269
11593
|
(props, forwardedRef) => {
|
|
11270
11594
|
const { __scopeHoverCard, ...arrowProps } = props;
|
|
11271
11595
|
const popperScope = usePopperScope(__scopeHoverCard);
|
|
@@ -11292,7 +11616,7 @@ var Trigger11 = HoverCardTrigger;
|
|
|
11292
11616
|
var Content22 = HoverCardContent;
|
|
11293
11617
|
var HoverCard2 = Root23;
|
|
11294
11618
|
var HoverCardTrigger2 = Trigger11;
|
|
11295
|
-
var HoverCardContent2 =
|
|
11619
|
+
var HoverCardContent2 = React67.forwardRef(({ className, align = "center", sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
11296
11620
|
Content22,
|
|
11297
11621
|
{
|
|
11298
11622
|
ref,
|
|
@@ -11306,32 +11630,42 @@ var HoverCardContent2 = React60.forwardRef(({ className, align = "center", sideO
|
|
|
11306
11630
|
}
|
|
11307
11631
|
));
|
|
11308
11632
|
HoverCardContent2.displayName = Content22.displayName;
|
|
11309
|
-
var DirectionContext =
|
|
11633
|
+
var DirectionContext = React67.createContext(void 0);
|
|
11310
11634
|
function useDirection(localDir) {
|
|
11311
|
-
const globalDir =
|
|
11635
|
+
const globalDir = React67.useContext(DirectionContext);
|
|
11312
11636
|
return localDir || globalDir || "ltr";
|
|
11313
11637
|
}
|
|
11638
|
+
var useReactId2 = React67[" useId ".trim().toString()] || (() => void 0);
|
|
11639
|
+
var count2 = 0;
|
|
11640
|
+
function useId4(deterministicId) {
|
|
11641
|
+
const [id, setId] = React67.useState(useReactId2());
|
|
11642
|
+
useLayoutEffect22(() => {
|
|
11643
|
+
if (!deterministicId)
|
|
11644
|
+
setId((reactId) => reactId ?? String(count2++));
|
|
11645
|
+
}, [deterministicId]);
|
|
11646
|
+
return deterministicId || (id ? `radix-${id}` : "");
|
|
11647
|
+
}
|
|
11314
11648
|
function createCollection(name) {
|
|
11315
11649
|
const PROVIDER_NAME = name + "CollectionProvider";
|
|
11316
|
-
const [createCollectionContext, createCollectionScope2] =
|
|
11650
|
+
const [createCollectionContext, createCollectionScope2] = createContextScope2(PROVIDER_NAME);
|
|
11317
11651
|
const [CollectionProviderImpl, useCollectionContext] = createCollectionContext(
|
|
11318
11652
|
PROVIDER_NAME,
|
|
11319
11653
|
{ collectionRef: { current: null }, itemMap: /* @__PURE__ */ new Map() }
|
|
11320
11654
|
);
|
|
11321
11655
|
const CollectionProvider = (props) => {
|
|
11322
11656
|
const { scope, children } = props;
|
|
11323
|
-
const ref =
|
|
11324
|
-
const itemMap =
|
|
11657
|
+
const ref = React67__default.useRef(null);
|
|
11658
|
+
const itemMap = React67__default.useRef(/* @__PURE__ */ new Map()).current;
|
|
11325
11659
|
return /* @__PURE__ */ jsx(CollectionProviderImpl, { scope, itemMap, collectionRef: ref, children });
|
|
11326
11660
|
};
|
|
11327
11661
|
CollectionProvider.displayName = PROVIDER_NAME;
|
|
11328
11662
|
const COLLECTION_SLOT_NAME = name + "CollectionSlot";
|
|
11329
11663
|
const CollectionSlotImpl = createSlot(COLLECTION_SLOT_NAME);
|
|
11330
|
-
const CollectionSlot =
|
|
11664
|
+
const CollectionSlot = React67__default.forwardRef(
|
|
11331
11665
|
(props, forwardedRef) => {
|
|
11332
11666
|
const { scope, children } = props;
|
|
11333
11667
|
const context = useCollectionContext(COLLECTION_SLOT_NAME, scope);
|
|
11334
|
-
const composedRefs =
|
|
11668
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.collectionRef);
|
|
11335
11669
|
return /* @__PURE__ */ jsx(CollectionSlotImpl, { ref: composedRefs, children });
|
|
11336
11670
|
}
|
|
11337
11671
|
);
|
|
@@ -11339,13 +11673,13 @@ function createCollection(name) {
|
|
|
11339
11673
|
const ITEM_SLOT_NAME = name + "CollectionItemSlot";
|
|
11340
11674
|
const ITEM_DATA_ATTR = "data-radix-collection-item";
|
|
11341
11675
|
const CollectionItemSlotImpl = createSlot(ITEM_SLOT_NAME);
|
|
11342
|
-
const CollectionItemSlot =
|
|
11676
|
+
const CollectionItemSlot = React67__default.forwardRef(
|
|
11343
11677
|
(props, forwardedRef) => {
|
|
11344
11678
|
const { scope, children, ...itemData } = props;
|
|
11345
|
-
const ref =
|
|
11346
|
-
const composedRefs =
|
|
11679
|
+
const ref = React67__default.useRef(null);
|
|
11680
|
+
const composedRefs = useComposedRefs2(forwardedRef, ref);
|
|
11347
11681
|
const context = useCollectionContext(ITEM_SLOT_NAME, scope);
|
|
11348
|
-
|
|
11682
|
+
React67__default.useEffect(() => {
|
|
11349
11683
|
context.itemMap.set(ref, { ref, ...itemData });
|
|
11350
11684
|
return () => void context.itemMap.delete(ref);
|
|
11351
11685
|
});
|
|
@@ -11355,7 +11689,7 @@ function createCollection(name) {
|
|
|
11355
11689
|
CollectionItemSlot.displayName = ITEM_SLOT_NAME;
|
|
11356
11690
|
function useCollection2(scope) {
|
|
11357
11691
|
const context = useCollectionContext(name + "CollectionConsumer", scope);
|
|
11358
|
-
const getItems =
|
|
11692
|
+
const getItems = React67__default.useCallback(() => {
|
|
11359
11693
|
const collectionNode = context.collectionRef.current;
|
|
11360
11694
|
if (!collectionNode)
|
|
11361
11695
|
return [];
|
|
@@ -11375,8 +11709,8 @@ function createCollection(name) {
|
|
|
11375
11709
|
];
|
|
11376
11710
|
}
|
|
11377
11711
|
function usePrevious(value) {
|
|
11378
|
-
const ref =
|
|
11379
|
-
return
|
|
11712
|
+
const ref = React67.useRef({ value, previous: value });
|
|
11713
|
+
return React67.useMemo(() => {
|
|
11380
11714
|
if (ref.current.value !== value) {
|
|
11381
11715
|
ref.current.previous = ref.current.value;
|
|
11382
11716
|
ref.current.value = value;
|
|
@@ -11398,10 +11732,10 @@ var VISUALLY_HIDDEN_STYLES = Object.freeze({
|
|
|
11398
11732
|
wordWrap: "normal"
|
|
11399
11733
|
});
|
|
11400
11734
|
var NAME3 = "VisuallyHidden";
|
|
11401
|
-
var VisuallyHidden =
|
|
11735
|
+
var VisuallyHidden = React67.forwardRef(
|
|
11402
11736
|
(props, forwardedRef) => {
|
|
11403
11737
|
return /* @__PURE__ */ jsx(
|
|
11404
|
-
|
|
11738
|
+
Primitive2.span,
|
|
11405
11739
|
{
|
|
11406
11740
|
...props,
|
|
11407
11741
|
ref: forwardedRef,
|
|
@@ -11415,13 +11749,13 @@ var Root21 = VisuallyHidden;
|
|
|
11415
11749
|
var NAVIGATION_MENU_NAME = "NavigationMenu";
|
|
11416
11750
|
var [Collection, useCollection, createCollectionScope] = createCollection(NAVIGATION_MENU_NAME);
|
|
11417
11751
|
var [FocusGroupCollection, useFocusGroupCollection, createFocusGroupCollectionScope] = createCollection(NAVIGATION_MENU_NAME);
|
|
11418
|
-
var [createNavigationMenuContext, createNavigationMenuScope] =
|
|
11752
|
+
var [createNavigationMenuContext, createNavigationMenuScope] = createContextScope2(
|
|
11419
11753
|
NAVIGATION_MENU_NAME,
|
|
11420
11754
|
[createCollectionScope, createFocusGroupCollectionScope]
|
|
11421
11755
|
);
|
|
11422
11756
|
var [NavigationMenuProviderImpl, useNavigationMenuContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME);
|
|
11423
11757
|
var [ViewportContentProvider, useViewportContentContext] = createNavigationMenuContext(NAVIGATION_MENU_NAME);
|
|
11424
|
-
var NavigationMenu =
|
|
11758
|
+
var NavigationMenu = React67.forwardRef(
|
|
11425
11759
|
(props, forwardedRef) => {
|
|
11426
11760
|
const {
|
|
11427
11761
|
__scopeNavigationMenu,
|
|
@@ -11434,14 +11768,14 @@ var NavigationMenu = React60.forwardRef(
|
|
|
11434
11768
|
dir,
|
|
11435
11769
|
...NavigationMenuProps
|
|
11436
11770
|
} = props;
|
|
11437
|
-
const [navigationMenu, setNavigationMenu] =
|
|
11438
|
-
const composedRef =
|
|
11771
|
+
const [navigationMenu, setNavigationMenu] = React67.useState(null);
|
|
11772
|
+
const composedRef = useComposedRefs2(forwardedRef, (node) => setNavigationMenu(node));
|
|
11439
11773
|
const direction = useDirection(dir);
|
|
11440
|
-
const openTimerRef =
|
|
11441
|
-
const closeTimerRef =
|
|
11442
|
-
const skipDelayTimerRef =
|
|
11443
|
-
const [isOpenDelayed, setIsOpenDelayed] =
|
|
11444
|
-
const [value, setValue] =
|
|
11774
|
+
const openTimerRef = React67.useRef(0);
|
|
11775
|
+
const closeTimerRef = React67.useRef(0);
|
|
11776
|
+
const skipDelayTimerRef = React67.useRef(0);
|
|
11777
|
+
const [isOpenDelayed, setIsOpenDelayed] = React67.useState(true);
|
|
11778
|
+
const [value, setValue] = useControllableState2({
|
|
11445
11779
|
prop: valueProp,
|
|
11446
11780
|
onChange: (value2) => {
|
|
11447
11781
|
const isOpen = value2 !== "";
|
|
@@ -11462,18 +11796,18 @@ var NavigationMenu = React60.forwardRef(
|
|
|
11462
11796
|
defaultProp: defaultValue2 ?? "",
|
|
11463
11797
|
caller: NAVIGATION_MENU_NAME
|
|
11464
11798
|
});
|
|
11465
|
-
const startCloseTimer =
|
|
11799
|
+
const startCloseTimer = React67.useCallback(() => {
|
|
11466
11800
|
window.clearTimeout(closeTimerRef.current);
|
|
11467
11801
|
closeTimerRef.current = window.setTimeout(() => setValue(""), 150);
|
|
11468
11802
|
}, [setValue]);
|
|
11469
|
-
const handleOpen =
|
|
11803
|
+
const handleOpen = React67.useCallback(
|
|
11470
11804
|
(itemValue) => {
|
|
11471
11805
|
window.clearTimeout(closeTimerRef.current);
|
|
11472
11806
|
setValue(itemValue);
|
|
11473
11807
|
},
|
|
11474
11808
|
[setValue]
|
|
11475
11809
|
);
|
|
11476
|
-
const handleDelayedOpen =
|
|
11810
|
+
const handleDelayedOpen = React67.useCallback(
|
|
11477
11811
|
(itemValue) => {
|
|
11478
11812
|
const isOpenItem = value === itemValue;
|
|
11479
11813
|
if (isOpenItem) {
|
|
@@ -11487,7 +11821,7 @@ var NavigationMenu = React60.forwardRef(
|
|
|
11487
11821
|
},
|
|
11488
11822
|
[value, setValue, delayDuration]
|
|
11489
11823
|
);
|
|
11490
|
-
|
|
11824
|
+
React67.useEffect(() => {
|
|
11491
11825
|
return () => {
|
|
11492
11826
|
window.clearTimeout(openTimerRef.current);
|
|
11493
11827
|
window.clearTimeout(closeTimerRef.current);
|
|
@@ -11521,7 +11855,7 @@ var NavigationMenu = React60.forwardRef(
|
|
|
11521
11855
|
},
|
|
11522
11856
|
onItemDismiss: () => setValue(""),
|
|
11523
11857
|
children: /* @__PURE__ */ jsx(
|
|
11524
|
-
|
|
11858
|
+
Primitive2.nav,
|
|
11525
11859
|
{
|
|
11526
11860
|
"aria-label": "Main",
|
|
11527
11861
|
"data-orientation": orientation,
|
|
@@ -11536,7 +11870,7 @@ var NavigationMenu = React60.forwardRef(
|
|
|
11536
11870
|
);
|
|
11537
11871
|
NavigationMenu.displayName = NAVIGATION_MENU_NAME;
|
|
11538
11872
|
var SUB_NAME = "NavigationMenuSub";
|
|
11539
|
-
var NavigationMenuSub =
|
|
11873
|
+
var NavigationMenuSub = React67.forwardRef(
|
|
11540
11874
|
(props, forwardedRef) => {
|
|
11541
11875
|
const {
|
|
11542
11876
|
__scopeNavigationMenu,
|
|
@@ -11547,7 +11881,7 @@ var NavigationMenuSub = React60.forwardRef(
|
|
|
11547
11881
|
...subProps
|
|
11548
11882
|
} = props;
|
|
11549
11883
|
const context = useNavigationMenuContext(SUB_NAME, __scopeNavigationMenu);
|
|
11550
|
-
const [value, setValue] =
|
|
11884
|
+
const [value, setValue] = useControllableState2({
|
|
11551
11885
|
prop: valueProp,
|
|
11552
11886
|
onChange: onValueChange,
|
|
11553
11887
|
defaultProp: defaultValue2 ?? "",
|
|
@@ -11565,7 +11899,7 @@ var NavigationMenuSub = React60.forwardRef(
|
|
|
11565
11899
|
onTriggerEnter: (itemValue) => setValue(itemValue),
|
|
11566
11900
|
onItemSelect: (itemValue) => setValue(itemValue),
|
|
11567
11901
|
onItemDismiss: () => setValue(""),
|
|
11568
|
-
children: /* @__PURE__ */ jsx(
|
|
11902
|
+
children: /* @__PURE__ */ jsx(Primitive2.div, { "data-orientation": orientation, ...subProps, ref: forwardedRef })
|
|
11569
11903
|
}
|
|
11570
11904
|
);
|
|
11571
11905
|
}
|
|
@@ -11587,9 +11921,9 @@ var NavigationMenuProvider = (props) => {
|
|
|
11587
11921
|
onContentEnter,
|
|
11588
11922
|
onContentLeave
|
|
11589
11923
|
} = props;
|
|
11590
|
-
const [viewport, setViewport] =
|
|
11591
|
-
const [viewportContent, setViewportContent] =
|
|
11592
|
-
const [indicatorTrack, setIndicatorTrack] =
|
|
11924
|
+
const [viewport, setViewport] = React67.useState(null);
|
|
11925
|
+
const [viewportContent, setViewportContent] = React67.useState(/* @__PURE__ */ new Map());
|
|
11926
|
+
const [indicatorTrack, setIndicatorTrack] = React67.useState(null);
|
|
11593
11927
|
return /* @__PURE__ */ jsx(
|
|
11594
11928
|
NavigationMenuProviderImpl,
|
|
11595
11929
|
{
|
|
@@ -11598,7 +11932,7 @@ var NavigationMenuProvider = (props) => {
|
|
|
11598
11932
|
rootNavigationMenu,
|
|
11599
11933
|
value,
|
|
11600
11934
|
previousValue: usePrevious(value),
|
|
11601
|
-
baseId:
|
|
11935
|
+
baseId: useId4(),
|
|
11602
11936
|
dir,
|
|
11603
11937
|
orientation,
|
|
11604
11938
|
viewport,
|
|
@@ -11611,13 +11945,13 @@ var NavigationMenuProvider = (props) => {
|
|
|
11611
11945
|
onContentLeave: useCallbackRef(onContentLeave),
|
|
11612
11946
|
onItemSelect: useCallbackRef(onItemSelect),
|
|
11613
11947
|
onItemDismiss: useCallbackRef(onItemDismiss),
|
|
11614
|
-
onViewportContentChange:
|
|
11948
|
+
onViewportContentChange: React67.useCallback((contentValue, contentData) => {
|
|
11615
11949
|
setViewportContent((prevContent) => {
|
|
11616
11950
|
prevContent.set(contentValue, contentData);
|
|
11617
11951
|
return new Map(prevContent);
|
|
11618
11952
|
});
|
|
11619
11953
|
}, []),
|
|
11620
|
-
onViewportContentRemove:
|
|
11954
|
+
onViewportContentRemove: React67.useCallback((contentValue) => {
|
|
11621
11955
|
setViewportContent((prevContent) => {
|
|
11622
11956
|
if (!prevContent.has(contentValue))
|
|
11623
11957
|
return prevContent;
|
|
@@ -11630,29 +11964,29 @@ var NavigationMenuProvider = (props) => {
|
|
|
11630
11964
|
);
|
|
11631
11965
|
};
|
|
11632
11966
|
var LIST_NAME = "NavigationMenuList";
|
|
11633
|
-
var NavigationMenuList =
|
|
11967
|
+
var NavigationMenuList = React67.forwardRef(
|
|
11634
11968
|
(props, forwardedRef) => {
|
|
11635
11969
|
const { __scopeNavigationMenu, ...listProps } = props;
|
|
11636
11970
|
const context = useNavigationMenuContext(LIST_NAME, __scopeNavigationMenu);
|
|
11637
|
-
const list = /* @__PURE__ */ jsx(
|
|
11638
|
-
return /* @__PURE__ */ jsx(
|
|
11971
|
+
const list = /* @__PURE__ */ jsx(Primitive2.ul, { "data-orientation": context.orientation, ...listProps, ref: forwardedRef });
|
|
11972
|
+
return /* @__PURE__ */ jsx(Primitive2.div, { style: { position: "relative" }, ref: context.onIndicatorTrackChange, children: /* @__PURE__ */ jsx(Collection.Slot, { scope: __scopeNavigationMenu, children: context.isRootMenu ? /* @__PURE__ */ jsx(FocusGroup, { asChild: true, children: list }) : list }) });
|
|
11639
11973
|
}
|
|
11640
11974
|
);
|
|
11641
11975
|
NavigationMenuList.displayName = LIST_NAME;
|
|
11642
11976
|
var ITEM_NAME = "NavigationMenuItem";
|
|
11643
11977
|
var [NavigationMenuItemContextProvider, useNavigationMenuItemContext] = createNavigationMenuContext(ITEM_NAME);
|
|
11644
|
-
var NavigationMenuItem =
|
|
11978
|
+
var NavigationMenuItem = React67.forwardRef(
|
|
11645
11979
|
(props, forwardedRef) => {
|
|
11646
11980
|
const { __scopeNavigationMenu, value: valueProp, ...itemProps } = props;
|
|
11647
|
-
const autoValue =
|
|
11981
|
+
const autoValue = useId4();
|
|
11648
11982
|
const value = valueProp || autoValue || "LEGACY_REACT_AUTO_VALUE";
|
|
11649
|
-
const contentRef =
|
|
11650
|
-
const triggerRef =
|
|
11651
|
-
const focusProxyRef =
|
|
11652
|
-
const restoreContentTabOrderRef =
|
|
11983
|
+
const contentRef = React67.useRef(null);
|
|
11984
|
+
const triggerRef = React67.useRef(null);
|
|
11985
|
+
const focusProxyRef = React67.useRef(null);
|
|
11986
|
+
const restoreContentTabOrderRef = React67.useRef(() => {
|
|
11653
11987
|
});
|
|
11654
|
-
const wasEscapeCloseRef =
|
|
11655
|
-
const handleContentEntry =
|
|
11988
|
+
const wasEscapeCloseRef = React67.useRef(false);
|
|
11989
|
+
const handleContentEntry = React67.useCallback((side = "start") => {
|
|
11656
11990
|
if (contentRef.current) {
|
|
11657
11991
|
restoreContentTabOrderRef.current();
|
|
11658
11992
|
const candidates = getTabbableCandidates(contentRef.current);
|
|
@@ -11660,7 +11994,7 @@ var NavigationMenuItem = React60.forwardRef(
|
|
|
11660
11994
|
focusFirst(side === "start" ? candidates : candidates.reverse());
|
|
11661
11995
|
}
|
|
11662
11996
|
}, []);
|
|
11663
|
-
const handleContentExit =
|
|
11997
|
+
const handleContentExit = React67.useCallback(() => {
|
|
11664
11998
|
if (contentRef.current) {
|
|
11665
11999
|
const candidates = getTabbableCandidates(contentRef.current);
|
|
11666
12000
|
if (candidates.length)
|
|
@@ -11680,27 +12014,27 @@ var NavigationMenuItem = React60.forwardRef(
|
|
|
11680
12014
|
onFocusProxyEnter: handleContentEntry,
|
|
11681
12015
|
onRootContentClose: handleContentExit,
|
|
11682
12016
|
onContentFocusOutside: handleContentExit,
|
|
11683
|
-
children: /* @__PURE__ */ jsx(
|
|
12017
|
+
children: /* @__PURE__ */ jsx(Primitive2.li, { ...itemProps, ref: forwardedRef })
|
|
11684
12018
|
}
|
|
11685
12019
|
);
|
|
11686
12020
|
}
|
|
11687
12021
|
);
|
|
11688
12022
|
NavigationMenuItem.displayName = ITEM_NAME;
|
|
11689
12023
|
var TRIGGER_NAME3 = "NavigationMenuTrigger";
|
|
11690
|
-
var NavigationMenuTrigger =
|
|
12024
|
+
var NavigationMenuTrigger = React67.forwardRef((props, forwardedRef) => {
|
|
11691
12025
|
const { __scopeNavigationMenu, disabled, ...triggerProps } = props;
|
|
11692
12026
|
const context = useNavigationMenuContext(TRIGGER_NAME3, props.__scopeNavigationMenu);
|
|
11693
12027
|
const itemContext = useNavigationMenuItemContext(TRIGGER_NAME3, props.__scopeNavigationMenu);
|
|
11694
|
-
const ref =
|
|
11695
|
-
const composedRefs =
|
|
12028
|
+
const ref = React67.useRef(null);
|
|
12029
|
+
const composedRefs = useComposedRefs2(ref, itemContext.triggerRef, forwardedRef);
|
|
11696
12030
|
const triggerId = makeTriggerId(context.baseId, itemContext.value);
|
|
11697
12031
|
const contentId = makeContentId(context.baseId, itemContext.value);
|
|
11698
|
-
const hasPointerMoveOpenedRef =
|
|
11699
|
-
const wasClickCloseRef =
|
|
12032
|
+
const hasPointerMoveOpenedRef = React67.useRef(false);
|
|
12033
|
+
const wasClickCloseRef = React67.useRef(false);
|
|
11700
12034
|
const open = itemContext.value === context.value;
|
|
11701
12035
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
11702
12036
|
/* @__PURE__ */ jsx(Collection.ItemSlot, { scope: __scopeNavigationMenu, value: itemContext.value, children: /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
11703
|
-
|
|
12037
|
+
Primitive2.button,
|
|
11704
12038
|
{
|
|
11705
12039
|
id: triggerId,
|
|
11706
12040
|
disabled,
|
|
@@ -11710,11 +12044,11 @@ var NavigationMenuTrigger = React60.forwardRef((props, forwardedRef) => {
|
|
|
11710
12044
|
"aria-controls": contentId,
|
|
11711
12045
|
...triggerProps,
|
|
11712
12046
|
ref: composedRefs,
|
|
11713
|
-
onPointerEnter:
|
|
12047
|
+
onPointerEnter: composeEventHandlers2(props.onPointerEnter, () => {
|
|
11714
12048
|
wasClickCloseRef.current = false;
|
|
11715
12049
|
itemContext.wasEscapeCloseRef.current = false;
|
|
11716
12050
|
}),
|
|
11717
|
-
onPointerMove:
|
|
12051
|
+
onPointerMove: composeEventHandlers2(
|
|
11718
12052
|
props.onPointerMove,
|
|
11719
12053
|
whenMouse(() => {
|
|
11720
12054
|
if (disabled || wasClickCloseRef.current || itemContext.wasEscapeCloseRef.current || hasPointerMoveOpenedRef.current)
|
|
@@ -11723,7 +12057,7 @@ var NavigationMenuTrigger = React60.forwardRef((props, forwardedRef) => {
|
|
|
11723
12057
|
hasPointerMoveOpenedRef.current = true;
|
|
11724
12058
|
})
|
|
11725
12059
|
),
|
|
11726
|
-
onPointerLeave:
|
|
12060
|
+
onPointerLeave: composeEventHandlers2(
|
|
11727
12061
|
props.onPointerLeave,
|
|
11728
12062
|
whenMouse(() => {
|
|
11729
12063
|
if (disabled)
|
|
@@ -11732,11 +12066,11 @@ var NavigationMenuTrigger = React60.forwardRef((props, forwardedRef) => {
|
|
|
11732
12066
|
hasPointerMoveOpenedRef.current = false;
|
|
11733
12067
|
})
|
|
11734
12068
|
),
|
|
11735
|
-
onClick:
|
|
12069
|
+
onClick: composeEventHandlers2(props.onClick, () => {
|
|
11736
12070
|
context.onItemSelect(itemContext.value);
|
|
11737
12071
|
wasClickCloseRef.current = open;
|
|
11738
12072
|
}),
|
|
11739
|
-
onKeyDown:
|
|
12073
|
+
onKeyDown: composeEventHandlers2(props.onKeyDown, (event) => {
|
|
11740
12074
|
const verticalEntryKey = context.dir === "rtl" ? "ArrowLeft" : "ArrowRight";
|
|
11741
12075
|
const entryKey = { horizontal: "ArrowDown", vertical: verticalEntryKey }[context.orientation];
|
|
11742
12076
|
if (open && event.key === entryKey) {
|
|
@@ -11771,17 +12105,17 @@ var NavigationMenuTrigger = React60.forwardRef((props, forwardedRef) => {
|
|
|
11771
12105
|
NavigationMenuTrigger.displayName = TRIGGER_NAME3;
|
|
11772
12106
|
var LINK_NAME = "NavigationMenuLink";
|
|
11773
12107
|
var LINK_SELECT = "navigationMenu.linkSelect";
|
|
11774
|
-
var NavigationMenuLink =
|
|
12108
|
+
var NavigationMenuLink = React67.forwardRef(
|
|
11775
12109
|
(props, forwardedRef) => {
|
|
11776
12110
|
const { __scopeNavigationMenu, active, onSelect, ...linkProps } = props;
|
|
11777
12111
|
return /* @__PURE__ */ jsx(FocusGroupItem, { asChild: true, children: /* @__PURE__ */ jsx(
|
|
11778
|
-
|
|
12112
|
+
Primitive2.a,
|
|
11779
12113
|
{
|
|
11780
12114
|
"data-active": active ? "" : void 0,
|
|
11781
12115
|
"aria-current": active ? "page" : void 0,
|
|
11782
12116
|
...linkProps,
|
|
11783
12117
|
ref: forwardedRef,
|
|
11784
|
-
onClick:
|
|
12118
|
+
onClick: composeEventHandlers2(
|
|
11785
12119
|
props.onClick,
|
|
11786
12120
|
(event) => {
|
|
11787
12121
|
const target = event.target;
|
|
@@ -11807,27 +12141,27 @@ var NavigationMenuLink = React60.forwardRef(
|
|
|
11807
12141
|
);
|
|
11808
12142
|
NavigationMenuLink.displayName = LINK_NAME;
|
|
11809
12143
|
var INDICATOR_NAME2 = "NavigationMenuIndicator";
|
|
11810
|
-
var NavigationMenuIndicator =
|
|
12144
|
+
var NavigationMenuIndicator = React67.forwardRef((props, forwardedRef) => {
|
|
11811
12145
|
const { forceMount, ...indicatorProps } = props;
|
|
11812
12146
|
const context = useNavigationMenuContext(INDICATOR_NAME2, props.__scopeNavigationMenu);
|
|
11813
12147
|
const isVisible = Boolean(context.value);
|
|
11814
|
-
return context.indicatorTrack ?
|
|
11815
|
-
/* @__PURE__ */ jsx(
|
|
12148
|
+
return context.indicatorTrack ? ReactDOM2__default.createPortal(
|
|
12149
|
+
/* @__PURE__ */ jsx(Presence2, { present: forceMount || isVisible, children: /* @__PURE__ */ jsx(NavigationMenuIndicatorImpl, { ...indicatorProps, ref: forwardedRef }) }),
|
|
11816
12150
|
context.indicatorTrack
|
|
11817
12151
|
) : null;
|
|
11818
12152
|
});
|
|
11819
12153
|
NavigationMenuIndicator.displayName = INDICATOR_NAME2;
|
|
11820
|
-
var NavigationMenuIndicatorImpl =
|
|
12154
|
+
var NavigationMenuIndicatorImpl = React67.forwardRef((props, forwardedRef) => {
|
|
11821
12155
|
const { __scopeNavigationMenu, ...indicatorProps } = props;
|
|
11822
12156
|
const context = useNavigationMenuContext(INDICATOR_NAME2, __scopeNavigationMenu);
|
|
11823
12157
|
const getItems = useCollection(__scopeNavigationMenu);
|
|
11824
|
-
const [activeTrigger, setActiveTrigger] =
|
|
12158
|
+
const [activeTrigger, setActiveTrigger] = React67.useState(
|
|
11825
12159
|
null
|
|
11826
12160
|
);
|
|
11827
|
-
const [position, setPosition] =
|
|
12161
|
+
const [position, setPosition] = React67.useState(null);
|
|
11828
12162
|
const isHorizontal = context.orientation === "horizontal";
|
|
11829
12163
|
const isVisible = Boolean(context.value);
|
|
11830
|
-
|
|
12164
|
+
React67.useEffect(() => {
|
|
11831
12165
|
const items = getItems();
|
|
11832
12166
|
const triggerNode = items.find((item) => item.value === context.value)?.ref.current;
|
|
11833
12167
|
if (triggerNode)
|
|
@@ -11844,7 +12178,7 @@ var NavigationMenuIndicatorImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11844
12178
|
useResizeObserver(activeTrigger, handlePositionChange);
|
|
11845
12179
|
useResizeObserver(context.indicatorTrack, handlePositionChange);
|
|
11846
12180
|
return position ? /* @__PURE__ */ jsx(
|
|
11847
|
-
|
|
12181
|
+
Primitive2.div,
|
|
11848
12182
|
{
|
|
11849
12183
|
"aria-hidden": true,
|
|
11850
12184
|
"data-state": isVisible ? "visible" : "hidden",
|
|
@@ -11868,11 +12202,11 @@ var NavigationMenuIndicatorImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11868
12202
|
) : null;
|
|
11869
12203
|
});
|
|
11870
12204
|
var CONTENT_NAME4 = "NavigationMenuContent";
|
|
11871
|
-
var NavigationMenuContent =
|
|
12205
|
+
var NavigationMenuContent = React67.forwardRef((props, forwardedRef) => {
|
|
11872
12206
|
const { forceMount, ...contentProps } = props;
|
|
11873
12207
|
const context = useNavigationMenuContext(CONTENT_NAME4, props.__scopeNavigationMenu);
|
|
11874
12208
|
const itemContext = useNavigationMenuItemContext(CONTENT_NAME4, props.__scopeNavigationMenu);
|
|
11875
|
-
const composedRefs =
|
|
12209
|
+
const composedRefs = useComposedRefs2(itemContext.contentRef, forwardedRef);
|
|
11876
12210
|
const open = itemContext.value === context.value;
|
|
11877
12211
|
const commonProps = {
|
|
11878
12212
|
value: itemContext.value,
|
|
@@ -11883,14 +12217,14 @@ var NavigationMenuContent = React60.forwardRef((props, forwardedRef) => {
|
|
|
11883
12217
|
onRootContentClose: itemContext.onRootContentClose,
|
|
11884
12218
|
...contentProps
|
|
11885
12219
|
};
|
|
11886
|
-
return !context.viewport ? /* @__PURE__ */ jsx(
|
|
12220
|
+
return !context.viewport ? /* @__PURE__ */ jsx(Presence2, { present: forceMount || open, children: /* @__PURE__ */ jsx(
|
|
11887
12221
|
NavigationMenuContentImpl,
|
|
11888
12222
|
{
|
|
11889
12223
|
"data-state": getOpenState(open),
|
|
11890
12224
|
...commonProps,
|
|
11891
12225
|
ref: composedRefs,
|
|
11892
|
-
onPointerEnter:
|
|
11893
|
-
onPointerLeave:
|
|
12226
|
+
onPointerEnter: composeEventHandlers2(props.onPointerEnter, context.onContentEnter),
|
|
12227
|
+
onPointerLeave: composeEventHandlers2(
|
|
11894
12228
|
props.onPointerLeave,
|
|
11895
12229
|
whenMouse(context.onContentLeave)
|
|
11896
12230
|
),
|
|
@@ -11903,22 +12237,22 @@ var NavigationMenuContent = React60.forwardRef((props, forwardedRef) => {
|
|
|
11903
12237
|
) }) : /* @__PURE__ */ jsx(ViewportContentMounter, { forceMount, ...commonProps, ref: composedRefs });
|
|
11904
12238
|
});
|
|
11905
12239
|
NavigationMenuContent.displayName = CONTENT_NAME4;
|
|
11906
|
-
var ViewportContentMounter =
|
|
12240
|
+
var ViewportContentMounter = React67.forwardRef((props, forwardedRef) => {
|
|
11907
12241
|
const context = useNavigationMenuContext(CONTENT_NAME4, props.__scopeNavigationMenu);
|
|
11908
12242
|
const { onViewportContentChange, onViewportContentRemove } = context;
|
|
11909
|
-
|
|
12243
|
+
useLayoutEffect22(() => {
|
|
11910
12244
|
onViewportContentChange(props.value, {
|
|
11911
12245
|
ref: forwardedRef,
|
|
11912
12246
|
...props
|
|
11913
12247
|
});
|
|
11914
12248
|
}, [props, forwardedRef, onViewportContentChange]);
|
|
11915
|
-
|
|
12249
|
+
useLayoutEffect22(() => {
|
|
11916
12250
|
return () => onViewportContentRemove(props.value);
|
|
11917
12251
|
}, [props.value, onViewportContentRemove]);
|
|
11918
12252
|
return null;
|
|
11919
12253
|
});
|
|
11920
12254
|
var ROOT_CONTENT_DISMISS = "navigationMenu.rootContentDismiss";
|
|
11921
|
-
var NavigationMenuContentImpl =
|
|
12255
|
+
var NavigationMenuContentImpl = React67.forwardRef((props, forwardedRef) => {
|
|
11922
12256
|
const {
|
|
11923
12257
|
__scopeNavigationMenu,
|
|
11924
12258
|
value,
|
|
@@ -11930,14 +12264,14 @@ var NavigationMenuContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11930
12264
|
...contentProps
|
|
11931
12265
|
} = props;
|
|
11932
12266
|
const context = useNavigationMenuContext(CONTENT_NAME4, __scopeNavigationMenu);
|
|
11933
|
-
const ref =
|
|
11934
|
-
const composedRefs =
|
|
12267
|
+
const ref = React67.useRef(null);
|
|
12268
|
+
const composedRefs = useComposedRefs2(ref, forwardedRef);
|
|
11935
12269
|
const triggerId = makeTriggerId(context.baseId, value);
|
|
11936
12270
|
const contentId = makeContentId(context.baseId, value);
|
|
11937
12271
|
const getItems = useCollection(__scopeNavigationMenu);
|
|
11938
|
-
const prevMotionAttributeRef =
|
|
12272
|
+
const prevMotionAttributeRef = React67.useRef(null);
|
|
11939
12273
|
const { onItemDismiss } = context;
|
|
11940
|
-
|
|
12274
|
+
React67.useEffect(() => {
|
|
11941
12275
|
const content = ref.current;
|
|
11942
12276
|
if (context.isRootMenu && content) {
|
|
11943
12277
|
const handleClose = () => {
|
|
@@ -11950,7 +12284,7 @@ var NavigationMenuContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11950
12284
|
return () => content.removeEventListener(ROOT_CONTENT_DISMISS, handleClose);
|
|
11951
12285
|
}
|
|
11952
12286
|
}, [context.isRootMenu, props.value, triggerRef, onItemDismiss, onRootContentClose]);
|
|
11953
|
-
const motionAttribute =
|
|
12287
|
+
const motionAttribute = React67.useMemo(() => {
|
|
11954
12288
|
const items = getItems();
|
|
11955
12289
|
const values = items.map((item) => item.value);
|
|
11956
12290
|
if (context.dir === "rtl")
|
|
@@ -11990,20 +12324,20 @@ var NavigationMenuContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
11990
12324
|
});
|
|
11991
12325
|
ref.current?.dispatchEvent(rootContentDismissEvent);
|
|
11992
12326
|
},
|
|
11993
|
-
onFocusOutside:
|
|
12327
|
+
onFocusOutside: composeEventHandlers2(props.onFocusOutside, (event) => {
|
|
11994
12328
|
onContentFocusOutside();
|
|
11995
12329
|
const target = event.target;
|
|
11996
12330
|
if (context.rootNavigationMenu?.contains(target))
|
|
11997
12331
|
event.preventDefault();
|
|
11998
12332
|
}),
|
|
11999
|
-
onPointerDownOutside:
|
|
12333
|
+
onPointerDownOutside: composeEventHandlers2(props.onPointerDownOutside, (event) => {
|
|
12000
12334
|
const target = event.target;
|
|
12001
12335
|
const isTrigger = getItems().some((item) => item.ref.current?.contains(target));
|
|
12002
12336
|
const isRootViewport = context.isRootMenu && context.viewport?.contains(target);
|
|
12003
12337
|
if (isTrigger || isRootViewport || !context.isRootMenu)
|
|
12004
12338
|
event.preventDefault();
|
|
12005
12339
|
}),
|
|
12006
|
-
onKeyDown:
|
|
12340
|
+
onKeyDown: composeEventHandlers2(props.onKeyDown, (event) => {
|
|
12007
12341
|
const isMetaKey = event.altKey || event.ctrlKey || event.metaKey;
|
|
12008
12342
|
const isTabKey = event.key === "Tab" && !isMetaKey;
|
|
12009
12343
|
if (isTabKey) {
|
|
@@ -12019,30 +12353,30 @@ var NavigationMenuContentImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
12019
12353
|
}
|
|
12020
12354
|
}
|
|
12021
12355
|
}),
|
|
12022
|
-
onEscapeKeyDown:
|
|
12356
|
+
onEscapeKeyDown: composeEventHandlers2(props.onEscapeKeyDown, (_event) => {
|
|
12023
12357
|
wasEscapeCloseRef.current = true;
|
|
12024
12358
|
})
|
|
12025
12359
|
}
|
|
12026
12360
|
) });
|
|
12027
12361
|
});
|
|
12028
12362
|
var VIEWPORT_NAME = "NavigationMenuViewport";
|
|
12029
|
-
var NavigationMenuViewport =
|
|
12363
|
+
var NavigationMenuViewport = React67.forwardRef((props, forwardedRef) => {
|
|
12030
12364
|
const { forceMount, ...viewportProps } = props;
|
|
12031
12365
|
const context = useNavigationMenuContext(VIEWPORT_NAME, props.__scopeNavigationMenu);
|
|
12032
12366
|
const open = Boolean(context.value);
|
|
12033
|
-
return /* @__PURE__ */ jsx(
|
|
12367
|
+
return /* @__PURE__ */ jsx(Presence2, { present: forceMount || open, children: /* @__PURE__ */ jsx(NavigationMenuViewportImpl, { ...viewportProps, ref: forwardedRef }) });
|
|
12034
12368
|
});
|
|
12035
12369
|
NavigationMenuViewport.displayName = VIEWPORT_NAME;
|
|
12036
|
-
var NavigationMenuViewportImpl =
|
|
12370
|
+
var NavigationMenuViewportImpl = React67.forwardRef((props, forwardedRef) => {
|
|
12037
12371
|
const { __scopeNavigationMenu, children, ...viewportImplProps } = props;
|
|
12038
12372
|
const context = useNavigationMenuContext(VIEWPORT_NAME, __scopeNavigationMenu);
|
|
12039
|
-
const composedRefs =
|
|
12373
|
+
const composedRefs = useComposedRefs2(forwardedRef, context.onViewportChange);
|
|
12040
12374
|
const viewportContentContext = useViewportContentContext(
|
|
12041
12375
|
CONTENT_NAME4,
|
|
12042
12376
|
props.__scopeNavigationMenu
|
|
12043
12377
|
);
|
|
12044
|
-
const [size4, setSize] =
|
|
12045
|
-
const [content, setContent2] =
|
|
12378
|
+
const [size4, setSize] = React67.useState(null);
|
|
12379
|
+
const [content, setContent2] = React67.useState(null);
|
|
12046
12380
|
const viewportWidth = size4 ? size4?.width + "px" : void 0;
|
|
12047
12381
|
const viewportHeight = size4 ? size4?.height + "px" : void 0;
|
|
12048
12382
|
const open = Boolean(context.value);
|
|
@@ -12053,7 +12387,7 @@ var NavigationMenuViewportImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
12053
12387
|
};
|
|
12054
12388
|
useResizeObserver(content, handleSizeChange);
|
|
12055
12389
|
return /* @__PURE__ */ jsx(
|
|
12056
|
-
|
|
12390
|
+
Primitive2.div,
|
|
12057
12391
|
{
|
|
12058
12392
|
"data-state": getOpenState(open),
|
|
12059
12393
|
"data-orientation": context.orientation,
|
|
@@ -12066,15 +12400,15 @@ var NavigationMenuViewportImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
12066
12400
|
["--radix-navigation-menu-viewport-height"]: viewportHeight,
|
|
12067
12401
|
...viewportImplProps.style
|
|
12068
12402
|
},
|
|
12069
|
-
onPointerEnter:
|
|
12070
|
-
onPointerLeave:
|
|
12403
|
+
onPointerEnter: composeEventHandlers2(props.onPointerEnter, context.onContentEnter),
|
|
12404
|
+
onPointerLeave: composeEventHandlers2(props.onPointerLeave, whenMouse(context.onContentLeave)),
|
|
12071
12405
|
children: Array.from(viewportContentContext.items).map(([value, { ref, forceMount, ...props2 }]) => {
|
|
12072
12406
|
const isActive2 = activeContentValue === value;
|
|
12073
|
-
return /* @__PURE__ */ jsx(
|
|
12407
|
+
return /* @__PURE__ */ jsx(Presence2, { present: forceMount || isActive2, children: /* @__PURE__ */ jsx(
|
|
12074
12408
|
NavigationMenuContentImpl,
|
|
12075
12409
|
{
|
|
12076
12410
|
...props2,
|
|
12077
|
-
ref:
|
|
12411
|
+
ref: composeRefs2(ref, (node) => {
|
|
12078
12412
|
if (isActive2 && node)
|
|
12079
12413
|
setContent2(node);
|
|
12080
12414
|
})
|
|
@@ -12085,26 +12419,26 @@ var NavigationMenuViewportImpl = React60.forwardRef((props, forwardedRef) => {
|
|
|
12085
12419
|
);
|
|
12086
12420
|
});
|
|
12087
12421
|
var FOCUS_GROUP_NAME = "FocusGroup";
|
|
12088
|
-
var FocusGroup =
|
|
12422
|
+
var FocusGroup = React67.forwardRef(
|
|
12089
12423
|
(props, forwardedRef) => {
|
|
12090
12424
|
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
12091
12425
|
const context = useNavigationMenuContext(FOCUS_GROUP_NAME, __scopeNavigationMenu);
|
|
12092
|
-
return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(
|
|
12426
|
+
return /* @__PURE__ */ jsx(FocusGroupCollection.Provider, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(FocusGroupCollection.Slot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(Primitive2.div, { dir: context.dir, ...groupProps, ref: forwardedRef }) }) });
|
|
12093
12427
|
}
|
|
12094
12428
|
);
|
|
12095
12429
|
var ARROW_KEYS = ["ArrowRight", "ArrowLeft", "ArrowUp", "ArrowDown"];
|
|
12096
12430
|
var FOCUS_GROUP_ITEM_NAME = "FocusGroupItem";
|
|
12097
|
-
var FocusGroupItem =
|
|
12431
|
+
var FocusGroupItem = React67.forwardRef(
|
|
12098
12432
|
(props, forwardedRef) => {
|
|
12099
12433
|
const { __scopeNavigationMenu, ...groupProps } = props;
|
|
12100
12434
|
const getItems = useFocusGroupCollection(__scopeNavigationMenu);
|
|
12101
12435
|
const context = useNavigationMenuContext(FOCUS_GROUP_ITEM_NAME, __scopeNavigationMenu);
|
|
12102
12436
|
return /* @__PURE__ */ jsx(FocusGroupCollection.ItemSlot, { scope: __scopeNavigationMenu, children: /* @__PURE__ */ jsx(
|
|
12103
|
-
|
|
12437
|
+
Primitive2.button,
|
|
12104
12438
|
{
|
|
12105
12439
|
...groupProps,
|
|
12106
12440
|
ref: forwardedRef,
|
|
12107
|
-
onKeyDown:
|
|
12441
|
+
onKeyDown: composeEventHandlers2(props.onKeyDown, (event) => {
|
|
12108
12442
|
const isFocusNavigationKey = ["Home", "End", ...ARROW_KEYS].includes(event.key);
|
|
12109
12443
|
if (isFocusNavigationKey) {
|
|
12110
12444
|
let candidateNodes = getItems().map((item) => item.ref.current);
|
|
@@ -12161,7 +12495,7 @@ function removeFromTabOrder(candidates) {
|
|
|
12161
12495
|
}
|
|
12162
12496
|
function useResizeObserver(element, onResize) {
|
|
12163
12497
|
const handleResize = useCallbackRef(onResize);
|
|
12164
|
-
|
|
12498
|
+
useLayoutEffect22(() => {
|
|
12165
12499
|
let rAF = 0;
|
|
12166
12500
|
if (element) {
|
|
12167
12501
|
const resizeObserver = new ResizeObserver(() => {
|
|
@@ -12196,7 +12530,7 @@ var Link = NavigationMenuLink;
|
|
|
12196
12530
|
var Indicator3 = NavigationMenuIndicator;
|
|
12197
12531
|
var Content12 = NavigationMenuContent;
|
|
12198
12532
|
var Viewport4 = NavigationMenuViewport;
|
|
12199
|
-
var NavigationMenu2 =
|
|
12533
|
+
var NavigationMenu2 = React67.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
12200
12534
|
Root24,
|
|
12201
12535
|
{
|
|
12202
12536
|
ref,
|
|
@@ -12212,7 +12546,7 @@ var NavigationMenu2 = React60.forwardRef(({ className, children, ...props }, ref
|
|
|
12212
12546
|
}
|
|
12213
12547
|
));
|
|
12214
12548
|
NavigationMenu2.displayName = Root24.displayName;
|
|
12215
|
-
var NavigationMenuList2 =
|
|
12549
|
+
var NavigationMenuList2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12216
12550
|
List3,
|
|
12217
12551
|
{
|
|
12218
12552
|
ref,
|
|
@@ -12228,7 +12562,7 @@ var NavigationMenuItem2 = Item4;
|
|
|
12228
12562
|
var navigationMenuTriggerStyle = cva(
|
|
12229
12563
|
"group inline-flex h-10 w-max items-center justify-center rounded-md bg-background px-4 py-2 text-sm font-medium transition-colors hover:bg-accent hover:text-accent-foreground focus:bg-accent focus:text-accent-foreground focus:outline-none disabled:pointer-events-none disabled:opacity-50 data-[active]:bg-accent/50 data-[state=open]:bg-accent/50"
|
|
12230
12564
|
);
|
|
12231
|
-
var NavigationMenuTrigger2 =
|
|
12565
|
+
var NavigationMenuTrigger2 = React67.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
12232
12566
|
Trigger12,
|
|
12233
12567
|
{
|
|
12234
12568
|
ref,
|
|
@@ -12248,7 +12582,7 @@ var NavigationMenuTrigger2 = React60.forwardRef(({ className, children, ...props
|
|
|
12248
12582
|
}
|
|
12249
12583
|
));
|
|
12250
12584
|
NavigationMenuTrigger2.displayName = Trigger12.displayName;
|
|
12251
|
-
var NavigationMenuContent2 =
|
|
12585
|
+
var NavigationMenuContent2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12252
12586
|
Content12,
|
|
12253
12587
|
{
|
|
12254
12588
|
ref,
|
|
@@ -12261,7 +12595,7 @@ var NavigationMenuContent2 = React60.forwardRef(({ className, ...props }, ref) =
|
|
|
12261
12595
|
));
|
|
12262
12596
|
NavigationMenuContent2.displayName = Content12.displayName;
|
|
12263
12597
|
var NavigationMenuLink2 = Link;
|
|
12264
|
-
var NavigationMenuViewport2 =
|
|
12598
|
+
var NavigationMenuViewport2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { className: cn("absolute left-0 top-full flex justify-center"), children: /* @__PURE__ */ jsx(
|
|
12265
12599
|
Viewport4,
|
|
12266
12600
|
{
|
|
12267
12601
|
className: cn(
|
|
@@ -12273,7 +12607,7 @@ var NavigationMenuViewport2 = React60.forwardRef(({ className, ...props }, ref)
|
|
|
12273
12607
|
}
|
|
12274
12608
|
) }));
|
|
12275
12609
|
NavigationMenuViewport2.displayName = Viewport4.displayName;
|
|
12276
|
-
var NavigationMenuIndicator2 =
|
|
12610
|
+
var NavigationMenuIndicator2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
12277
12611
|
Indicator3,
|
|
12278
12612
|
{
|
|
12279
12613
|
ref,
|
|
@@ -12490,7 +12824,7 @@ var calculateSnapPoint = (offset4, velocity, snapPoints, direction, viewportSize
|
|
|
12490
12824
|
(prev, curr) => Math.abs(curr - currentPosition) < Math.abs(prev - currentPosition) ? curr : prev
|
|
12491
12825
|
);
|
|
12492
12826
|
};
|
|
12493
|
-
var MoonUIGestureDrawerProComponent =
|
|
12827
|
+
var MoonUIGestureDrawerProComponent = React67__default.forwardRef(({
|
|
12494
12828
|
isOpen,
|
|
12495
12829
|
onOpenChange,
|
|
12496
12830
|
children,
|
|
@@ -12748,7 +13082,7 @@ var MoonUIGestureDrawerProComponent = React60__default.forwardRef(({
|
|
|
12748
13082
|
return drawerContent;
|
|
12749
13083
|
});
|
|
12750
13084
|
MoonUIGestureDrawerProComponent.displayName = "MoonUIGestureDrawerProComponent";
|
|
12751
|
-
var MoonUIGestureDrawerPro =
|
|
13085
|
+
var MoonUIGestureDrawerPro = React67__default.forwardRef((props, ref) => {
|
|
12752
13086
|
const { hasProAccess, isLoading } = useSubscription();
|
|
12753
13087
|
if (!isLoading && !hasProAccess) {
|
|
12754
13088
|
return /* @__PURE__ */ jsx(MoonUICardPro, { className: "w-fit mx-auto", children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-6 text-center", children: /* @__PURE__ */ jsxs("div", { className: "space-y-4", children: [
|
|
@@ -12783,19 +13117,19 @@ var lightboxVariants = cva(
|
|
|
12783
13117
|
}
|
|
12784
13118
|
}
|
|
12785
13119
|
);
|
|
12786
|
-
var LightboxContext =
|
|
13120
|
+
var LightboxContext = React67.createContext(void 0);
|
|
12787
13121
|
function useLightbox() {
|
|
12788
|
-
const context =
|
|
13122
|
+
const context = React67.useContext(LightboxContext);
|
|
12789
13123
|
if (!context) {
|
|
12790
13124
|
throw new Error("useLightbox must be used within a LightboxProvider");
|
|
12791
13125
|
}
|
|
12792
13126
|
return context;
|
|
12793
13127
|
}
|
|
12794
13128
|
function LightboxProvider({ children, items = [], defaultIndex = 0 }) {
|
|
12795
|
-
const [currentIndex, setCurrentIndex] =
|
|
12796
|
-
const [isOpen, setIsOpen] =
|
|
12797
|
-
const [zoom, setZoom] =
|
|
12798
|
-
const value =
|
|
13129
|
+
const [currentIndex, setCurrentIndex] = React67.useState(defaultIndex);
|
|
13130
|
+
const [isOpen, setIsOpen] = React67.useState(false);
|
|
13131
|
+
const [zoom, setZoom] = React67.useState(1);
|
|
13132
|
+
const value = React67.useMemo(
|
|
12799
13133
|
() => ({
|
|
12800
13134
|
items,
|
|
12801
13135
|
currentIndex,
|
|
@@ -12809,7 +13143,7 @@ function LightboxProvider({ children, items = [], defaultIndex = 0 }) {
|
|
|
12809
13143
|
);
|
|
12810
13144
|
return /* @__PURE__ */ jsx(LightboxContext.Provider, { value, children });
|
|
12811
13145
|
}
|
|
12812
|
-
var LightboxTrigger =
|
|
13146
|
+
var LightboxTrigger = React67.forwardRef(
|
|
12813
13147
|
({ index: index2 = 0, asChild, children, onClick, ...props }, ref) => {
|
|
12814
13148
|
const { setCurrentIndex, setIsOpen, setZoom } = useLightbox();
|
|
12815
13149
|
const handleClick2 = (e) => {
|
|
@@ -12821,7 +13155,7 @@ var LightboxTrigger = React60.forwardRef(
|
|
|
12821
13155
|
if (asChild) {
|
|
12822
13156
|
const child = children;
|
|
12823
13157
|
const { onDrag: onDrag2, onDragStart: onDragStart2, onDragEnd: onDragEnd2, onDragOver: onDragOver2, onDrop: onDrop2, ...filteredProps2 } = props;
|
|
12824
|
-
return
|
|
13158
|
+
return React67.cloneElement(child, {
|
|
12825
13159
|
...child.props,
|
|
12826
13160
|
...filteredProps2,
|
|
12827
13161
|
onClick: handleClick2
|
|
@@ -12832,7 +13166,7 @@ var LightboxTrigger = React60.forwardRef(
|
|
|
12832
13166
|
}
|
|
12833
13167
|
);
|
|
12834
13168
|
LightboxTrigger.displayName = "LightboxTrigger";
|
|
12835
|
-
var LightboxContent =
|
|
13169
|
+
var LightboxContent = React67.forwardRef(
|
|
12836
13170
|
({
|
|
12837
13171
|
className,
|
|
12838
13172
|
backdrop,
|
|
@@ -12850,16 +13184,16 @@ var LightboxContent = React60.forwardRef(
|
|
|
12850
13184
|
}, ref) => {
|
|
12851
13185
|
const { onDrag, onDragStart, onDragEnd, onDragOver, onDrop, onAnimationStart, onAnimationEnd, onAnimationIteration, ...props } = restProps;
|
|
12852
13186
|
const { items, currentIndex, setCurrentIndex, isOpen, setIsOpen, zoom, setZoom } = useLightbox();
|
|
12853
|
-
const [isLoading, setIsLoading] =
|
|
12854
|
-
const [isPlaying, setIsPlaying] =
|
|
12855
|
-
const [isMuted, setIsMuted] =
|
|
12856
|
-
const [isFullscreen, setIsFullscreen] =
|
|
12857
|
-
const [position, setPosition] =
|
|
12858
|
-
const [isDragging, setIsDragging] =
|
|
12859
|
-
const containerRef =
|
|
12860
|
-
const videoRef =
|
|
13187
|
+
const [isLoading, setIsLoading] = React67.useState(true);
|
|
13188
|
+
const [isPlaying, setIsPlaying] = React67.useState(false);
|
|
13189
|
+
const [isMuted, setIsMuted] = React67.useState(true);
|
|
13190
|
+
const [isFullscreen, setIsFullscreen] = React67.useState(false);
|
|
13191
|
+
const [position, setPosition] = React67.useState({ x: 0, y: 0 });
|
|
13192
|
+
const [isDragging, setIsDragging] = React67.useState(false);
|
|
13193
|
+
const containerRef = React67.useRef(null);
|
|
13194
|
+
const videoRef = React67.useRef(null);
|
|
12861
13195
|
const currentItem = items[currentIndex];
|
|
12862
|
-
|
|
13196
|
+
React67.useEffect(() => {
|
|
12863
13197
|
if (currentItem?.type === "video" && autoPlayVideo) {
|
|
12864
13198
|
setIsPlaying(true);
|
|
12865
13199
|
setIsMuted(true);
|
|
@@ -12867,7 +13201,7 @@ var LightboxContent = React60.forwardRef(
|
|
|
12867
13201
|
setIsPlaying(false);
|
|
12868
13202
|
}
|
|
12869
13203
|
}, [currentIndex, currentItem, autoPlayVideo]);
|
|
12870
|
-
|
|
13204
|
+
React67.useEffect(() => {
|
|
12871
13205
|
if (!enableKeyboardNavigation || !isOpen)
|
|
12872
13206
|
return;
|
|
12873
13207
|
const handleKeyDown3 = (e) => {
|
|
@@ -12899,7 +13233,7 @@ var LightboxContent = React60.forwardRef(
|
|
|
12899
13233
|
window.addEventListener("keydown", handleKeyDown3);
|
|
12900
13234
|
return () => window.removeEventListener("keydown", handleKeyDown3);
|
|
12901
13235
|
}, [isOpen, currentIndex, isPlaying, enableKeyboardNavigation]);
|
|
12902
|
-
|
|
13236
|
+
React67.useEffect(() => {
|
|
12903
13237
|
if (videoRef.current && currentItem?.type === "video") {
|
|
12904
13238
|
if (isPlaying) {
|
|
12905
13239
|
videoRef.current.play().catch((err) => {
|
|
@@ -13274,7 +13608,7 @@ var galleryItemVariants = cva(
|
|
|
13274
13608
|
}
|
|
13275
13609
|
}
|
|
13276
13610
|
);
|
|
13277
|
-
var MoonUIMediaGalleryPro =
|
|
13611
|
+
var MoonUIMediaGalleryPro = React67.forwardRef(({
|
|
13278
13612
|
className,
|
|
13279
13613
|
items,
|
|
13280
13614
|
layout,
|
|
@@ -13303,13 +13637,13 @@ var MoonUIMediaGalleryPro = React60.forwardRef(({
|
|
|
13303
13637
|
lightboxProps,
|
|
13304
13638
|
...props
|
|
13305
13639
|
}, ref) => {
|
|
13306
|
-
const [activeCategory, setActiveCategory] =
|
|
13307
|
-
const [activeSort, setActiveSort] =
|
|
13308
|
-
const [showFilters, setShowFilters] =
|
|
13309
|
-
const [loadedImages, setLoadedImages] =
|
|
13310
|
-
const observerRef =
|
|
13311
|
-
const loadMoreRef =
|
|
13312
|
-
const filteredItems =
|
|
13640
|
+
const [activeCategory, setActiveCategory] = React67.useState(defaultCategory);
|
|
13641
|
+
const [activeSort, setActiveSort] = React67.useState(defaultSort);
|
|
13642
|
+
const [showFilters, setShowFilters] = React67.useState(false);
|
|
13643
|
+
const [loadedImages, setLoadedImages] = React67.useState(/* @__PURE__ */ new Set());
|
|
13644
|
+
const observerRef = React67.useRef(null);
|
|
13645
|
+
const loadMoreRef = React67.useRef(null);
|
|
13646
|
+
const filteredItems = React67.useMemo(() => {
|
|
13313
13647
|
if (!enableFiltering || activeCategory === "all")
|
|
13314
13648
|
return items;
|
|
13315
13649
|
return items.filter((item) => {
|
|
@@ -13323,7 +13657,7 @@ var MoonUIMediaGalleryPro = React60.forwardRef(({
|
|
|
13323
13657
|
return true;
|
|
13324
13658
|
});
|
|
13325
13659
|
}, [items, activeCategory, enableFiltering]);
|
|
13326
|
-
const sortedItems =
|
|
13660
|
+
const sortedItems = React67.useMemo(() => {
|
|
13327
13661
|
if (!enableSorting || activeSort === "default")
|
|
13328
13662
|
return filteredItems;
|
|
13329
13663
|
const sortOption = sortOptions.find((opt) => opt.id === activeSort);
|
|
@@ -13337,7 +13671,7 @@ var MoonUIMediaGalleryPro = React60.forwardRef(({
|
|
|
13337
13671
|
{ id: "video", label: "Videos", icon: /* @__PURE__ */ jsx(Video, { className: "h-4 w-4" }) }
|
|
13338
13672
|
];
|
|
13339
13673
|
const finalCategories = categories.length > 0 ? categories : defaultCategories;
|
|
13340
|
-
|
|
13674
|
+
React67.useEffect(() => {
|
|
13341
13675
|
if (!lazyLoad)
|
|
13342
13676
|
return;
|
|
13343
13677
|
observerRef.current = new IntersectionObserver(
|
|
@@ -13355,7 +13689,7 @@ var MoonUIMediaGalleryPro = React60.forwardRef(({
|
|
|
13355
13689
|
observerRef.current?.disconnect();
|
|
13356
13690
|
};
|
|
13357
13691
|
}, [lazyLoad]);
|
|
13358
|
-
|
|
13692
|
+
React67.useEffect(() => {
|
|
13359
13693
|
if (!infiniteScroll || !onLoadMore || !hasMore)
|
|
13360
13694
|
return;
|
|
13361
13695
|
const observer = new IntersectionObserver(
|
|
@@ -13532,7 +13866,7 @@ var MoonUIMediaGalleryPro = React60.forwardRef(({
|
|
|
13532
13866
|
className
|
|
13533
13867
|
),
|
|
13534
13868
|
style: layout === "masonry" ? { columnGap: "1rem" } : void 0,
|
|
13535
|
-
children: loadingState ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ jsx(
|
|
13869
|
+
children: loadingState ? /* @__PURE__ */ jsx(Fragment, { children: Array.from({ length: skeletonCount }).map((_, i) => /* @__PURE__ */ jsx(React67.Fragment, { children: renderSkeleton() }, i)) }) : sortedItems.length > 0 ? sortedItems.map((item, index2) => renderGalleryItem(item, index2)) : emptyState || /* @__PURE__ */ jsxs("div", { className: "col-span-full flex flex-col items-center justify-center py-12 text-center", children: [
|
|
13536
13870
|
/* @__PURE__ */ jsx(Image$1, { className: "h-12 w-12 text-muted-foreground mb-4" }),
|
|
13537
13871
|
/* @__PURE__ */ jsx("p", { className: "text-muted-foreground", children: "No media items found" })
|
|
13538
13872
|
] })
|
|
@@ -13549,7 +13883,7 @@ var MoonUIMediaGalleryPro = React60.forwardRef(({
|
|
|
13549
13883
|
return galleryContent;
|
|
13550
13884
|
});
|
|
13551
13885
|
MoonUIMediaGalleryPro.displayName = "MoonUIMediaGalleryPro";
|
|
13552
|
-
var MoonUIGalleryItemPro =
|
|
13886
|
+
var MoonUIGalleryItemPro = React67.forwardRef(({
|
|
13553
13887
|
className,
|
|
13554
13888
|
item,
|
|
13555
13889
|
index: index2 = 0,
|
|
@@ -13562,7 +13896,7 @@ var MoonUIGalleryItemPro = React60.forwardRef(({
|
|
|
13562
13896
|
onLoad,
|
|
13563
13897
|
...props
|
|
13564
13898
|
}, ref) => {
|
|
13565
|
-
const [isLoaded, setIsLoaded] =
|
|
13899
|
+
const [isLoaded, setIsLoaded] = React67.useState(false);
|
|
13566
13900
|
const handleLoad = () => {
|
|
13567
13901
|
setIsLoaded(true);
|
|
13568
13902
|
onLoad?.();
|
|
@@ -13638,7 +13972,7 @@ var moonUIAnimatedButtonProVariants = cva(
|
|
|
13638
13972
|
}
|
|
13639
13973
|
}
|
|
13640
13974
|
);
|
|
13641
|
-
var MoonUIAnimatedButtonProInternal =
|
|
13975
|
+
var MoonUIAnimatedButtonProInternal = React67__default.forwardRef(
|
|
13642
13976
|
({
|
|
13643
13977
|
className,
|
|
13644
13978
|
variant,
|
|
@@ -13832,9 +14166,9 @@ var MoonUIAnimatedButtonProInternal = React60__default.forwardRef(
|
|
|
13832
14166
|
) : (
|
|
13833
14167
|
// Diğer boyutlar için normal akış
|
|
13834
14168
|
/* @__PURE__ */ jsx(Fragment, { children: currentState === "idle" ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13835
|
-
|
|
14169
|
+
React67__default.isValidElement(children) && React67__default.cloneElement(children),
|
|
13836
14170
|
typeof children === "string" && children,
|
|
13837
|
-
|
|
14171
|
+
React67__default.isValidElement(children) || typeof children === "string" ? null : children
|
|
13838
14172
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
13839
14173
|
getIcon(),
|
|
13840
14174
|
/* @__PURE__ */ jsxs("span", { className: "ml-2", children: [
|
|
@@ -13879,7 +14213,7 @@ var MoonUIAnimatedButtonProInternal = React60__default.forwardRef(
|
|
|
13879
14213
|
}
|
|
13880
14214
|
);
|
|
13881
14215
|
MoonUIAnimatedButtonProInternal.displayName = "MoonUIAnimatedButtonProInternal";
|
|
13882
|
-
var MoonUIAnimatedButtonPro =
|
|
14216
|
+
var MoonUIAnimatedButtonPro = React67__default.forwardRef(
|
|
13883
14217
|
(props, ref) => {
|
|
13884
14218
|
const { hasProAccess, isLoading } = useSubscription();
|
|
13885
14219
|
if (!isLoading && !hasProAccess) {
|
|
@@ -14030,7 +14364,7 @@ function ErrorBoundaryWrapper(props) {
|
|
|
14030
14364
|
return /* @__PURE__ */ jsx(ErrorBoundaryInternal, { ...props });
|
|
14031
14365
|
}
|
|
14032
14366
|
var ErrorBoundary = ErrorBoundaryWrapper;
|
|
14033
|
-
var FloatingActionButtonInternal =
|
|
14367
|
+
var FloatingActionButtonInternal = React67__default.forwardRef(
|
|
14034
14368
|
({
|
|
14035
14369
|
actions = [],
|
|
14036
14370
|
position = "bottom-right",
|
|
@@ -14161,7 +14495,7 @@ var FloatingActionButtonInternal = React60__default.forwardRef(
|
|
|
14161
14495
|
}
|
|
14162
14496
|
);
|
|
14163
14497
|
FloatingActionButtonInternal.displayName = "FloatingActionButtonInternal";
|
|
14164
|
-
var FloatingActionButton =
|
|
14498
|
+
var FloatingActionButton = React67__default.forwardRef(
|
|
14165
14499
|
({ className, ...props }, ref) => {
|
|
14166
14500
|
const { hasProAccess, isLoading } = useSubscription();
|
|
14167
14501
|
if (!isLoading && !hasProAccess) {
|
|
@@ -14213,7 +14547,7 @@ var hoverCard3DVariants = cva(
|
|
|
14213
14547
|
}
|
|
14214
14548
|
}
|
|
14215
14549
|
);
|
|
14216
|
-
var HoverCard3DInternal =
|
|
14550
|
+
var HoverCard3DInternal = React67__default.forwardRef(
|
|
14217
14551
|
({
|
|
14218
14552
|
children,
|
|
14219
14553
|
className,
|
|
@@ -14497,7 +14831,7 @@ var HoverCard3DInternal = React60__default.forwardRef(
|
|
|
14497
14831
|
}
|
|
14498
14832
|
);
|
|
14499
14833
|
HoverCard3DInternal.displayName = "HoverCard3DInternal";
|
|
14500
|
-
var HoverCard3D =
|
|
14834
|
+
var HoverCard3D = React67__default.forwardRef(
|
|
14501
14835
|
(props, ref) => {
|
|
14502
14836
|
const { hasProAccess, isLoading } = useSubscription();
|
|
14503
14837
|
if (!isLoading && !hasProAccess) {
|
|
@@ -14552,7 +14886,7 @@ var magneticButtonVariants = cva(
|
|
|
14552
14886
|
}
|
|
14553
14887
|
}
|
|
14554
14888
|
);
|
|
14555
|
-
var MagneticButtonInternal =
|
|
14889
|
+
var MagneticButtonInternal = React67__default.forwardRef(
|
|
14556
14890
|
({
|
|
14557
14891
|
children,
|
|
14558
14892
|
className,
|
|
@@ -14664,7 +14998,7 @@ var MagneticButtonInternal = React60__default.forwardRef(
|
|
|
14664
14998
|
}
|
|
14665
14999
|
);
|
|
14666
15000
|
MagneticButtonInternal.displayName = "MagneticButtonInternal";
|
|
14667
|
-
var MagneticButton =
|
|
15001
|
+
var MagneticButton = React67__default.forwardRef(
|
|
14668
15002
|
({ className, ...props }, ref) => {
|
|
14669
15003
|
const { hasProAccess, isLoading } = useSubscription();
|
|
14670
15004
|
if (!isLoading && !hasProAccess) {
|
|
@@ -14684,7 +15018,7 @@ var MagneticButton = React60__default.forwardRef(
|
|
|
14684
15018
|
}
|
|
14685
15019
|
);
|
|
14686
15020
|
MagneticButton.displayName = "MagneticButton";
|
|
14687
|
-
var PinchZoomInternal =
|
|
15021
|
+
var PinchZoomInternal = React67__default.forwardRef(
|
|
14688
15022
|
({
|
|
14689
15023
|
children,
|
|
14690
15024
|
minZoom = 0.5,
|
|
@@ -15098,7 +15432,7 @@ var PinchZoomInternal = React60__default.forwardRef(
|
|
|
15098
15432
|
}
|
|
15099
15433
|
);
|
|
15100
15434
|
PinchZoomInternal.displayName = "PinchZoomInternal";
|
|
15101
|
-
var PinchZoom =
|
|
15435
|
+
var PinchZoom = React67__default.forwardRef(
|
|
15102
15436
|
({ className, ...props }, ref) => {
|
|
15103
15437
|
const { hasProAccess, isLoading } = useSubscription();
|
|
15104
15438
|
if (!isLoading && !hasProAccess) {
|
|
@@ -15118,7 +15452,7 @@ var PinchZoom = React60__default.forwardRef(
|
|
|
15118
15452
|
}
|
|
15119
15453
|
);
|
|
15120
15454
|
PinchZoom.displayName = "PinchZoom";
|
|
15121
|
-
var SpotlightCardInternal =
|
|
15455
|
+
var SpotlightCardInternal = React67__default.forwardRef(
|
|
15122
15456
|
({
|
|
15123
15457
|
children,
|
|
15124
15458
|
className,
|
|
@@ -15247,7 +15581,7 @@ var SpotlightCardInternal = React60__default.forwardRef(
|
|
|
15247
15581
|
}
|
|
15248
15582
|
);
|
|
15249
15583
|
SpotlightCardInternal.displayName = "SpotlightCardInternal";
|
|
15250
|
-
var SpotlightCard =
|
|
15584
|
+
var SpotlightCard = React67__default.forwardRef(
|
|
15251
15585
|
({ className, ...props }, ref) => {
|
|
15252
15586
|
const { hasProAccess, isLoading } = useSubscription();
|
|
15253
15587
|
if (!isLoading && !hasProAccess) {
|
|
@@ -15670,22 +16004,22 @@ function CalendarInternal({
|
|
|
15670
16004
|
] })
|
|
15671
16005
|
] }) }) });
|
|
15672
16006
|
}
|
|
15673
|
-
const [currentDate, setCurrentDate] =
|
|
15674
|
-
const [selectedDate, setSelectedDate] =
|
|
15675
|
-
const [view, setView] =
|
|
15676
|
-
const [eventDialogOpen, setEventDialogOpen] =
|
|
15677
|
-
const [eventDialogMode, setEventDialogMode] =
|
|
15678
|
-
const [selectedEvent, setSelectedEvent] =
|
|
15679
|
-
const [draggedEvent, setDraggedEvent] =
|
|
15680
|
-
const [dragTargetDate, setDragTargetDate] =
|
|
15681
|
-
const [searchQuery, setSearchQuery] =
|
|
15682
|
-
const [filterType, setFilterType] =
|
|
15683
|
-
const [filterPriority, setFilterPriority] =
|
|
15684
|
-
|
|
15685
|
-
const [selectedTags, setSelectedTags] =
|
|
15686
|
-
const [miniCalendarDate, setMiniCalendarDate] =
|
|
15687
|
-
const [isSidebarOpen, setIsSidebarOpen] =
|
|
15688
|
-
const [isDesktopSidebarCollapsed, setIsDesktopSidebarCollapsed] =
|
|
16007
|
+
const [currentDate, setCurrentDate] = React67__default.useState(/* @__PURE__ */ new Date());
|
|
16008
|
+
const [selectedDate, setSelectedDate] = React67__default.useState(null);
|
|
16009
|
+
const [view, setView] = React67__default.useState(defaultView);
|
|
16010
|
+
const [eventDialogOpen, setEventDialogOpen] = React67__default.useState(false);
|
|
16011
|
+
const [eventDialogMode, setEventDialogMode] = React67__default.useState("create");
|
|
16012
|
+
const [selectedEvent, setSelectedEvent] = React67__default.useState(null);
|
|
16013
|
+
const [draggedEvent, setDraggedEvent] = React67__default.useState(null);
|
|
16014
|
+
const [dragTargetDate, setDragTargetDate] = React67__default.useState(null);
|
|
16015
|
+
const [searchQuery, setSearchQuery] = React67__default.useState("");
|
|
16016
|
+
const [filterType, setFilterType] = React67__default.useState("all");
|
|
16017
|
+
const [filterPriority, setFilterPriority] = React67__default.useState("all");
|
|
16018
|
+
React67__default.useState(false);
|
|
16019
|
+
const [selectedTags, setSelectedTags] = React67__default.useState([]);
|
|
16020
|
+
const [miniCalendarDate, setMiniCalendarDate] = React67__default.useState(/* @__PURE__ */ new Date());
|
|
16021
|
+
const [isSidebarOpen, setIsSidebarOpen] = React67__default.useState(false);
|
|
16022
|
+
const [isDesktopSidebarCollapsed, setIsDesktopSidebarCollapsed] = React67__default.useState(false);
|
|
15689
16023
|
const today = /* @__PURE__ */ new Date();
|
|
15690
16024
|
const currentMonth = currentDate.getMonth();
|
|
15691
16025
|
const currentYear = currentDate.getFullYear();
|
|
@@ -15703,14 +16037,14 @@ function CalendarInternal({
|
|
|
15703
16037
|
calendarDays.push(new Date(currentDateIterator));
|
|
15704
16038
|
currentDateIterator.setDate(currentDateIterator.getDate() + 1);
|
|
15705
16039
|
}
|
|
15706
|
-
|
|
16040
|
+
React67__default.useMemo(() => {
|
|
15707
16041
|
const tags = /* @__PURE__ */ new Set();
|
|
15708
16042
|
events.forEach((event) => {
|
|
15709
16043
|
event.tags?.forEach((tag) => tags.add(tag));
|
|
15710
16044
|
});
|
|
15711
16045
|
return Array.from(tags);
|
|
15712
16046
|
}, [events]);
|
|
15713
|
-
const filteredEvents =
|
|
16047
|
+
const filteredEvents = React67__default.useMemo(() => {
|
|
15714
16048
|
return events.filter((event) => {
|
|
15715
16049
|
if (searchQuery && !event.title.toLowerCase().includes(searchQuery.toLowerCase()) && !event.description?.toLowerCase().includes(searchQuery.toLowerCase())) {
|
|
15716
16050
|
return false;
|
|
@@ -23426,10 +23760,10 @@ var Fitter = class {
|
|
|
23426
23760
|
this.placed = addToFragment(this.placed, this.frontier.length, add);
|
|
23427
23761
|
}
|
|
23428
23762
|
};
|
|
23429
|
-
function dropFromFragment(fragment, depth,
|
|
23763
|
+
function dropFromFragment(fragment, depth, count3) {
|
|
23430
23764
|
if (depth == 0)
|
|
23431
|
-
return fragment.cutByIndex(
|
|
23432
|
-
return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1,
|
|
23765
|
+
return fragment.cutByIndex(count3, fragment.childCount);
|
|
23766
|
+
return fragment.replaceChild(0, fragment.firstChild.copy(dropFromFragment(fragment.firstChild.content, depth - 1, count3)));
|
|
23433
23767
|
}
|
|
23434
23768
|
function addToFragment(fragment, depth, content) {
|
|
23435
23769
|
if (depth == 0)
|
|
@@ -31144,11 +31478,11 @@ function getHTMLFromFragment(fragment, schema) {
|
|
|
31144
31478
|
container.appendChild(documentFragment);
|
|
31145
31479
|
return container.innerHTML;
|
|
31146
31480
|
}
|
|
31147
|
-
function
|
|
31481
|
+
function isFunction3(value) {
|
|
31148
31482
|
return typeof value === "function";
|
|
31149
31483
|
}
|
|
31150
31484
|
function callOrReturn(value, context = void 0, ...props) {
|
|
31151
|
-
if (
|
|
31485
|
+
if (isFunction3(value)) {
|
|
31152
31486
|
if (context) {
|
|
31153
31487
|
return value.bind(context)(...props);
|
|
31154
31488
|
}
|
|
@@ -34733,7 +35067,7 @@ var Editor = class extends EventEmitter {
|
|
|
34733
35067
|
* @returns The new editor state
|
|
34734
35068
|
*/
|
|
34735
35069
|
registerPlugin(plugin, handlePlugins) {
|
|
34736
|
-
const plugins =
|
|
35070
|
+
const plugins = isFunction3(handlePlugins) ? handlePlugins(plugin, [...this.state.plugins]) : [...this.state.plugins, plugin];
|
|
34737
35071
|
const state = this.state.reconfigure({ plugins });
|
|
34738
35072
|
this.view.updateState(state);
|
|
34739
35073
|
return state;
|
|
@@ -35321,7 +35655,7 @@ function getInstance() {
|
|
|
35321
35655
|
setRenderer(id, renderer) {
|
|
35322
35656
|
renderers = {
|
|
35323
35657
|
...renderers,
|
|
35324
|
-
[id]:
|
|
35658
|
+
[id]: ReactDOM2__default.createPortal(renderer.reactElement, renderer.element, id)
|
|
35325
35659
|
};
|
|
35326
35660
|
subscribers.forEach((subscriber) => subscriber());
|
|
35327
35661
|
},
|
|
@@ -35336,11 +35670,11 @@ function getInstance() {
|
|
|
35336
35670
|
}
|
|
35337
35671
|
};
|
|
35338
35672
|
}
|
|
35339
|
-
var PureEditorContent = class extends
|
|
35673
|
+
var PureEditorContent = class extends React67__default.Component {
|
|
35340
35674
|
constructor(props) {
|
|
35341
35675
|
var _a2;
|
|
35342
35676
|
super(props);
|
|
35343
|
-
this.editorContentRef =
|
|
35677
|
+
this.editorContentRef = React67__default.createRef();
|
|
35344
35678
|
this.initialized = false;
|
|
35345
35679
|
this.state = {
|
|
35346
35680
|
hasContentComponentInitialized: Boolean((_a2 = props.editor) == null ? void 0 : _a2.contentComponent)
|
|
@@ -35418,17 +35752,17 @@ var PureEditorContent = class extends React60__default.Component {
|
|
|
35418
35752
|
};
|
|
35419
35753
|
var EditorContentWithKey = forwardRef(
|
|
35420
35754
|
(props, ref) => {
|
|
35421
|
-
const key =
|
|
35755
|
+
const key = React67__default.useMemo(() => {
|
|
35422
35756
|
return Math.floor(Math.random() * 4294967295).toString();
|
|
35423
35757
|
}, [props.editor]);
|
|
35424
|
-
return
|
|
35758
|
+
return React67__default.createElement(PureEditorContent, {
|
|
35425
35759
|
key,
|
|
35426
35760
|
innerRef: ref,
|
|
35427
35761
|
...props
|
|
35428
35762
|
});
|
|
35429
35763
|
}
|
|
35430
35764
|
);
|
|
35431
|
-
var EditorContent =
|
|
35765
|
+
var EditorContent = React67__default.memo(EditorContentWithKey);
|
|
35432
35766
|
var useIsomorphicLayoutEffect = typeof window !== "undefined" ? useLayoutEffect : useEffect;
|
|
35433
35767
|
var EditorStateManager = class {
|
|
35434
35768
|
constructor(initialEditor) {
|
|
@@ -35772,7 +36106,7 @@ var ReactNodeViewContext = createContext({
|
|
|
35772
36106
|
}
|
|
35773
36107
|
});
|
|
35774
36108
|
var useReactNodeView = () => useContext(ReactNodeViewContext);
|
|
35775
|
-
|
|
36109
|
+
React67__default.forwardRef((props, ref) => {
|
|
35776
36110
|
const { onDragStart } = useReactNodeView();
|
|
35777
36111
|
const Tag5 = props.as || "div";
|
|
35778
36112
|
return (
|
|
@@ -35792,7 +36126,7 @@ React60__default.forwardRef((props, ref) => {
|
|
|
35792
36126
|
)
|
|
35793
36127
|
);
|
|
35794
36128
|
});
|
|
35795
|
-
|
|
36129
|
+
React67__default.createContext({
|
|
35796
36130
|
markViewContentRef: () => {
|
|
35797
36131
|
}
|
|
35798
36132
|
});
|
|
@@ -39435,12 +39769,12 @@ var Branch = class {
|
|
|
39435
39769
|
return branch;
|
|
39436
39770
|
}
|
|
39437
39771
|
emptyItemCount() {
|
|
39438
|
-
let
|
|
39772
|
+
let count3 = 0;
|
|
39439
39773
|
this.items.forEach((item) => {
|
|
39440
39774
|
if (!item.step)
|
|
39441
|
-
|
|
39775
|
+
count3++;
|
|
39442
39776
|
});
|
|
39443
|
-
return
|
|
39777
|
+
return count3;
|
|
39444
39778
|
}
|
|
39445
39779
|
// Compressing a branch means rewriting it to push the air (map-only
|
|
39446
39780
|
// items) out. During collaboration, these naturally accumulate
|
|
@@ -43538,7 +43872,7 @@ function getDecorations({
|
|
|
43538
43872
|
});
|
|
43539
43873
|
return DecorationSet.create(doc3, decorations);
|
|
43540
43874
|
}
|
|
43541
|
-
function
|
|
43875
|
+
function isFunction4(param) {
|
|
43542
43876
|
return typeof param === "function";
|
|
43543
43877
|
}
|
|
43544
43878
|
function LowlightPlugin({
|
|
@@ -43546,7 +43880,7 @@ function LowlightPlugin({
|
|
|
43546
43880
|
lowlight: lowlight2,
|
|
43547
43881
|
defaultLanguage
|
|
43548
43882
|
}) {
|
|
43549
|
-
if (!["highlight", "highlightAuto", "listLanguages"].every((api) =>
|
|
43883
|
+
if (!["highlight", "highlightAuto", "listLanguages"].every((api) => isFunction4(lowlight2[api]))) {
|
|
43550
43884
|
throw Error("You should provide an instance of lowlight to use the code-block-lowlight extension");
|
|
43551
43885
|
}
|
|
43552
43886
|
const lowlightPlugin = new Plugin({
|
|
@@ -57365,7 +57699,7 @@ var EditorColorPicker = ({
|
|
|
57365
57699
|
onColorSelect,
|
|
57366
57700
|
currentColor = "#000000"
|
|
57367
57701
|
}) => {
|
|
57368
|
-
const [showAdvanced, setShowAdvanced] =
|
|
57702
|
+
const [showAdvanced, setShowAdvanced] = React67__default.useState(false);
|
|
57369
57703
|
const quickColors = [
|
|
57370
57704
|
"#000000",
|
|
57371
57705
|
// Black
|
|
@@ -60526,7 +60860,7 @@ function SelectableVirtualList(props) {
|
|
|
60526
60860
|
}
|
|
60527
60861
|
var MoonUIVirtualListPro = VirtualList;
|
|
60528
60862
|
var MoonUISelectableVirtualListPro = SelectableVirtualList;
|
|
60529
|
-
var SwipeableCardInternal =
|
|
60863
|
+
var SwipeableCardInternal = React67__default.forwardRef(
|
|
60530
60864
|
({
|
|
60531
60865
|
children,
|
|
60532
60866
|
onSwipeLeft,
|
|
@@ -60604,7 +60938,7 @@ var SwipeableCardInternal = React60__default.forwardRef(
|
|
|
60604
60938
|
}
|
|
60605
60939
|
);
|
|
60606
60940
|
SwipeableCardInternal.displayName = "SwipeableCardInternal";
|
|
60607
|
-
var SwipeableCard =
|
|
60941
|
+
var SwipeableCard = React67__default.forwardRef(
|
|
60608
60942
|
(props, ref) => {
|
|
60609
60943
|
const { hasProAccess, isLoading } = useSubscription();
|
|
60610
60944
|
if (!isLoading && !hasProAccess) {
|
|
@@ -61641,19 +61975,19 @@ function AdvancedChartInternal({
|
|
|
61641
61975
|
animationDuration = 1500,
|
|
61642
61976
|
theme = "default"
|
|
61643
61977
|
}) {
|
|
61644
|
-
const [isFullscreen, setIsFullscreen] =
|
|
61645
|
-
const [showSettings, setShowSettings] =
|
|
61646
|
-
const [zoomLevel, setZoomLevel] =
|
|
61647
|
-
const [selectedTheme, setSelectedTheme] =
|
|
61648
|
-
const [hoveredDataPoint, setHoveredDataPoint] =
|
|
61649
|
-
const [hiddenSeries, setHiddenSeries] =
|
|
61650
|
-
const chartRef =
|
|
61651
|
-
const containerRef =
|
|
61652
|
-
const themeColors =
|
|
61978
|
+
const [isFullscreen, setIsFullscreen] = React67__default.useState(false);
|
|
61979
|
+
const [showSettings, setShowSettings] = React67__default.useState(false);
|
|
61980
|
+
const [zoomLevel, setZoomLevel] = React67__default.useState(100);
|
|
61981
|
+
const [selectedTheme, setSelectedTheme] = React67__default.useState(theme);
|
|
61982
|
+
const [hoveredDataPoint, setHoveredDataPoint] = React67__default.useState(null);
|
|
61983
|
+
const [hiddenSeries, setHiddenSeries] = React67__default.useState(/* @__PURE__ */ new Set());
|
|
61984
|
+
const chartRef = React67__default.useRef(null);
|
|
61985
|
+
const containerRef = React67__default.useRef(null);
|
|
61986
|
+
const themeColors = React67__default.useMemo(() => {
|
|
61653
61987
|
return COLOR_THEMES[selectedTheme] || DEFAULT_COLORS2;
|
|
61654
61988
|
}, [selectedTheme]);
|
|
61655
|
-
const gradientId =
|
|
61656
|
-
const trend =
|
|
61989
|
+
const gradientId = React67__default.useId();
|
|
61990
|
+
const trend = React67__default.useMemo(() => {
|
|
61657
61991
|
if (!data || !Array.isArray(data) || !data.length || !series || !Array.isArray(series) || !series.length)
|
|
61658
61992
|
return null;
|
|
61659
61993
|
const firstSeries = series[0];
|
|
@@ -62540,9 +62874,9 @@ function MetricCard({
|
|
|
62540
62874
|
interactive = true,
|
|
62541
62875
|
glassmorphism = false
|
|
62542
62876
|
}) {
|
|
62543
|
-
const [isHovered, setIsHovered] =
|
|
62544
|
-
const [isMounted, setIsMounted] =
|
|
62545
|
-
|
|
62877
|
+
const [isHovered, setIsHovered] = React67__default.useState(false);
|
|
62878
|
+
const [isMounted, setIsMounted] = React67__default.useState(false);
|
|
62879
|
+
React67__default.useEffect(() => {
|
|
62546
62880
|
setIsMounted(true);
|
|
62547
62881
|
}, []);
|
|
62548
62882
|
const colorClasses = {
|
|
@@ -62866,8 +63200,8 @@ function ChartWidget({
|
|
|
62866
63200
|
glassmorphism = false,
|
|
62867
63201
|
interactive = true
|
|
62868
63202
|
}) {
|
|
62869
|
-
const [colorScheme, setColorScheme] =
|
|
62870
|
-
const [isFullscreen, setIsFullscreen] =
|
|
63203
|
+
const [colorScheme, setColorScheme] = React67__default.useState("default");
|
|
63204
|
+
const [isFullscreen, setIsFullscreen] = React67__default.useState(false);
|
|
62871
63205
|
const colors = CHART_COLORS[colorScheme];
|
|
62872
63206
|
const CustomTooltip2 = ({ active, payload, label }) => {
|
|
62873
63207
|
if (!active || !payload)
|
|
@@ -63142,14 +63476,14 @@ function ActivityFeed({
|
|
|
63142
63476
|
glassmorphism = false,
|
|
63143
63477
|
realtime = false
|
|
63144
63478
|
}) {
|
|
63145
|
-
const [filter, setFilter] =
|
|
63146
|
-
const [notificationsEnabled, setNotificationsEnabled] =
|
|
63147
|
-
const [newItems, setNewItems] =
|
|
63148
|
-
const [isMounted, setIsMounted] =
|
|
63149
|
-
|
|
63479
|
+
const [filter, setFilter] = React67__default.useState("all");
|
|
63480
|
+
const [notificationsEnabled, setNotificationsEnabled] = React67__default.useState(true);
|
|
63481
|
+
const [newItems, setNewItems] = React67__default.useState([]);
|
|
63482
|
+
const [isMounted, setIsMounted] = React67__default.useState(false);
|
|
63483
|
+
React67__default.useEffect(() => {
|
|
63150
63484
|
setIsMounted(true);
|
|
63151
63485
|
}, []);
|
|
63152
|
-
|
|
63486
|
+
React67__default.useEffect(() => {
|
|
63153
63487
|
if (!realtime)
|
|
63154
63488
|
return;
|
|
63155
63489
|
const interval = setInterval(() => {
|
|
@@ -63372,8 +63706,8 @@ function ProgressWidget({
|
|
|
63372
63706
|
glassmorphism = false
|
|
63373
63707
|
}) {
|
|
63374
63708
|
const items = Array.isArray(data) ? data : [data];
|
|
63375
|
-
const [isMounted, setIsMounted] =
|
|
63376
|
-
|
|
63709
|
+
const [isMounted, setIsMounted] = React67__default.useState(false);
|
|
63710
|
+
React67__default.useEffect(() => {
|
|
63377
63711
|
setIsMounted(true);
|
|
63378
63712
|
}, []);
|
|
63379
63713
|
return /* @__PURE__ */ jsxs(MoonUICardPro, { className: cn(
|
|
@@ -63466,8 +63800,8 @@ function ComparisonWidget({
|
|
|
63466
63800
|
className,
|
|
63467
63801
|
glassmorphism = false
|
|
63468
63802
|
}) {
|
|
63469
|
-
const [isMounted, setIsMounted] =
|
|
63470
|
-
|
|
63803
|
+
const [isMounted, setIsMounted] = React67__default.useState(false);
|
|
63804
|
+
React67__default.useEffect(() => {
|
|
63471
63805
|
setIsMounted(true);
|
|
63472
63806
|
}, []);
|
|
63473
63807
|
const maxValue = Math.max(...data.periods.map((p) => p.value));
|
|
@@ -63586,7 +63920,7 @@ function ComparisonWidget({
|
|
|
63586
63920
|
] });
|
|
63587
63921
|
}
|
|
63588
63922
|
|
|
63589
|
-
//
|
|
63923
|
+
// node_modules/react-resizable/css/styles.css
|
|
63590
63924
|
styleInject(".react-resizable {\n position: relative;\n}\n.react-resizable-handle {\n position: absolute;\n width: 20px;\n height: 20px;\n background-repeat: no-repeat;\n background-origin: content-box;\n box-sizing: border-box;\n background-image: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA2IDYiIHN0eWxlPSJiYWNrZ3JvdW5kLWNvbG9yOiNmZmZmZmYwMCIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSI2cHgiIGhlaWdodD0iNnB4Ij48ZyBvcGFjaXR5PSIwLjMwMiI+PHBhdGggZD0iTSA2IDYgTCAwIDYgTCAwIDQuMiBMIDQgNC4yIEwgNC4yIDQuMiBMIDQuMiAwIEwgNiAwIEwgNiA2IEwgNiA2IFoiIGZpbGw9IiMwMDAwMDAiLz48L2c+PC9zdmc+);\n background-position: bottom right;\n padding: 0 3px 3px 0;\n}\n.react-resizable-handle-sw {\n bottom: 0;\n left: 0;\n cursor: sw-resize;\n transform: rotate(90deg);\n}\n.react-resizable-handle-se {\n bottom: 0;\n right: 0;\n cursor: se-resize;\n}\n.react-resizable-handle-nw {\n top: 0;\n left: 0;\n cursor: nw-resize;\n transform: rotate(180deg);\n}\n.react-resizable-handle-ne {\n top: 0;\n right: 0;\n cursor: ne-resize;\n transform: rotate(270deg);\n}\n.react-resizable-handle-w,\n.react-resizable-handle-e {\n top: 50%;\n margin-top: -10px;\n cursor: ew-resize;\n}\n.react-resizable-handle-w {\n left: 0;\n transform: rotate(135deg);\n}\n.react-resizable-handle-e {\n right: 0;\n transform: rotate(315deg);\n}\n.react-resizable-handle-n,\n.react-resizable-handle-s {\n left: 50%;\n margin-left: -10px;\n cursor: ns-resize;\n}\n.react-resizable-handle-n {\n top: 0;\n transform: rotate(225deg);\n}\n.react-resizable-handle-s {\n bottom: 0;\n transform: rotate(45deg);\n}\n");
|
|
63591
63925
|
var ResponsiveGridLayout = WidthProvider(Responsive);
|
|
63592
63926
|
function DashboardGrid({
|
|
@@ -63603,14 +63937,14 @@ function DashboardGrid({
|
|
|
63603
63937
|
margin = [16, 24],
|
|
63604
63938
|
containerPadding = [0, 0]
|
|
63605
63939
|
}) {
|
|
63606
|
-
const [layouts, setLayouts] =
|
|
63607
|
-
const [currentBreakpoint, setCurrentBreakpoint] =
|
|
63608
|
-
const [lockedWidgets, setLockedWidgets] =
|
|
63609
|
-
const [fullscreenWidget, setFullscreenWidget] =
|
|
63610
|
-
const [containerWidth, setContainerWidth] =
|
|
63611
|
-
const containerRef =
|
|
63612
|
-
const [compactType, setCompactType] =
|
|
63613
|
-
|
|
63940
|
+
const [layouts, setLayouts] = React67__default.useState({});
|
|
63941
|
+
const [currentBreakpoint, setCurrentBreakpoint] = React67__default.useState("lg");
|
|
63942
|
+
const [lockedWidgets, setLockedWidgets] = React67__default.useState(/* @__PURE__ */ new Set());
|
|
63943
|
+
const [fullscreenWidget, setFullscreenWidget] = React67__default.useState(null);
|
|
63944
|
+
const [containerWidth, setContainerWidth] = React67__default.useState(1200);
|
|
63945
|
+
const containerRef = React67__default.useRef(null);
|
|
63946
|
+
const [compactType, setCompactType] = React67__default.useState("vertical");
|
|
63947
|
+
React67__default.useEffect(() => {
|
|
63614
63948
|
const updateWidth = () => {
|
|
63615
63949
|
if (containerRef.current) {
|
|
63616
63950
|
const width = containerRef.current.offsetWidth;
|
|
@@ -64056,12 +64390,12 @@ function TimeRangePicker({
|
|
|
64056
64390
|
showComparison = false,
|
|
64057
64391
|
glassmorphism = false
|
|
64058
64392
|
}) {
|
|
64059
|
-
const [isOpen, setIsOpen] =
|
|
64060
|
-
const [customRange, setCustomRange] =
|
|
64393
|
+
const [isOpen, setIsOpen] = React67__default.useState(false);
|
|
64394
|
+
const [customRange, setCustomRange] = React67__default.useState({
|
|
64061
64395
|
from: void 0,
|
|
64062
64396
|
to: void 0
|
|
64063
64397
|
});
|
|
64064
|
-
const [comparisonEnabled, setComparisonEnabled] =
|
|
64398
|
+
const [comparisonEnabled, setComparisonEnabled] = React67__default.useState(false);
|
|
64065
64399
|
const currentRange = value || PRESET_RANGES[2].getRange();
|
|
64066
64400
|
const formatRange = (range) => {
|
|
64067
64401
|
if (range.preset && range.preset !== "custom") {
|
|
@@ -64406,24 +64740,24 @@ function DashboardInternal({
|
|
|
64406
64740
|
logo,
|
|
64407
64741
|
brandName
|
|
64408
64742
|
}) {
|
|
64409
|
-
const [editMode, setEditMode] =
|
|
64410
|
-
const [widgets, setWidgets] =
|
|
64411
|
-
const [selectedTheme, setSelectedTheme] =
|
|
64412
|
-
const [timeRange, setTimeRange] =
|
|
64413
|
-
const [searchQuery, setSearchQuery] =
|
|
64414
|
-
const [showWidgetLibrary, setShowWidgetLibrary] =
|
|
64415
|
-
const [showTemplates, setShowTemplates] =
|
|
64416
|
-
const [refreshing, setRefreshing] =
|
|
64417
|
-
const [showNotifications, setShowNotifications] =
|
|
64418
|
-
|
|
64743
|
+
const [editMode, setEditMode] = React67__default.useState(false);
|
|
64744
|
+
const [widgets, setWidgets] = React67__default.useState(initialWidgets);
|
|
64745
|
+
const [selectedTheme, setSelectedTheme] = React67__default.useState("analytics");
|
|
64746
|
+
const [timeRange, setTimeRange] = React67__default.useState(propTimeRange);
|
|
64747
|
+
const [searchQuery, setSearchQuery] = React67__default.useState("");
|
|
64748
|
+
const [showWidgetLibrary, setShowWidgetLibrary] = React67__default.useState(false);
|
|
64749
|
+
const [showTemplates, setShowTemplates] = React67__default.useState(false);
|
|
64750
|
+
const [refreshing, setRefreshing] = React67__default.useState(false);
|
|
64751
|
+
const [showNotifications, setShowNotifications] = React67__default.useState(false);
|
|
64752
|
+
React67__default.useEffect(() => {
|
|
64419
64753
|
setWidgets(initialWidgets);
|
|
64420
64754
|
}, [initialWidgets]);
|
|
64421
|
-
|
|
64755
|
+
React67__default.useEffect(() => {
|
|
64422
64756
|
if (propTimeRange) {
|
|
64423
64757
|
setTimeRange(propTimeRange);
|
|
64424
64758
|
}
|
|
64425
64759
|
}, [propTimeRange]);
|
|
64426
|
-
|
|
64760
|
+
React67__default.useEffect(() => {
|
|
64427
64761
|
if (!realtime)
|
|
64428
64762
|
return;
|
|
64429
64763
|
const interval = setInterval(() => {
|
|
@@ -65119,7 +65453,7 @@ function formatPhoneNumber(number) {
|
|
|
65119
65453
|
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8, 10)}`;
|
|
65120
65454
|
}
|
|
65121
65455
|
}
|
|
65122
|
-
var MoonUIPhoneNumberInputSimple =
|
|
65456
|
+
var MoonUIPhoneNumberInputSimple = React67__default.forwardRef(({
|
|
65123
65457
|
value = "",
|
|
65124
65458
|
onChange,
|
|
65125
65459
|
label,
|
|
@@ -65275,7 +65609,7 @@ function toInternationalFormat(countryCode, phoneNumber) {
|
|
|
65275
65609
|
return `${country.dialCode}${cleaned}`;
|
|
65276
65610
|
}
|
|
65277
65611
|
var defaultValue = { country: "US", number: "" };
|
|
65278
|
-
var PhoneNumberInputInternal =
|
|
65612
|
+
var PhoneNumberInputInternal = React67__default.forwardRef(({
|
|
65279
65613
|
value,
|
|
65280
65614
|
onChange,
|
|
65281
65615
|
defaultCountry = "US",
|
|
@@ -65298,7 +65632,7 @@ var PhoneNumberInputInternal = React60__default.forwardRef(({
|
|
|
65298
65632
|
allowInternationalFormat = true,
|
|
65299
65633
|
...props
|
|
65300
65634
|
}, ref) => {
|
|
65301
|
-
const phoneValue =
|
|
65635
|
+
const phoneValue = React67__default.useMemo(() => {
|
|
65302
65636
|
return value || defaultValue;
|
|
65303
65637
|
}, [value]);
|
|
65304
65638
|
const [isFocused, setIsFocused] = useState(false);
|
|
@@ -65465,7 +65799,7 @@ var PhoneNumberInputInternal = React60__default.forwardRef(({
|
|
|
65465
65799
|
] });
|
|
65466
65800
|
});
|
|
65467
65801
|
PhoneNumberInputInternal.displayName = "PhoneNumberInputInternal";
|
|
65468
|
-
var MoonUIPhoneNumberInputPro =
|
|
65802
|
+
var MoonUIPhoneNumberInputPro = React67__default.forwardRef(
|
|
65469
65803
|
(props, ref) => {
|
|
65470
65804
|
const { hasProAccess, isLoading } = useSubscription();
|
|
65471
65805
|
if (!isLoading && !hasProAccess) {
|
|
@@ -66080,25 +66414,25 @@ async function fetchContributorsCount(owner, repo, token) {
|
|
|
66080
66414
|
if (linkHeader) {
|
|
66081
66415
|
const match = linkHeader.match(/page=(\d+)>; rel="last"/);
|
|
66082
66416
|
if (match) {
|
|
66083
|
-
const
|
|
66417
|
+
const count4 = parseInt(match[1]);
|
|
66084
66418
|
cache.set(cacheKey, {
|
|
66085
|
-
data:
|
|
66419
|
+
data: count4,
|
|
66086
66420
|
timestamp: Date.now(),
|
|
66087
66421
|
expiresAt: Date.now() + getCacheDuration(36e5)
|
|
66088
66422
|
// 30 minutes in docs mode
|
|
66089
66423
|
});
|
|
66090
|
-
return
|
|
66424
|
+
return count4;
|
|
66091
66425
|
}
|
|
66092
66426
|
}
|
|
66093
66427
|
const contributors = await response.json();
|
|
66094
|
-
const
|
|
66428
|
+
const count3 = contributors.length;
|
|
66095
66429
|
cache.set(cacheKey, {
|
|
66096
|
-
data:
|
|
66430
|
+
data: count3,
|
|
66097
66431
|
timestamp: Date.now(),
|
|
66098
66432
|
expiresAt: Date.now() + getCacheDuration(36e5)
|
|
66099
66433
|
// 30 minutes in docs mode
|
|
66100
66434
|
});
|
|
66101
|
-
return
|
|
66435
|
+
return count3;
|
|
66102
66436
|
} catch (error) {
|
|
66103
66437
|
console.error("Failed to fetch contributors:", error);
|
|
66104
66438
|
return 0;
|
|
@@ -66121,10 +66455,10 @@ function calculateStats(repositories) {
|
|
|
66121
66455
|
}
|
|
66122
66456
|
});
|
|
66123
66457
|
const totalRepos = repositories.length;
|
|
66124
|
-
const languages = Array.from(languageMap.entries()).map(([language,
|
|
66458
|
+
const languages = Array.from(languageMap.entries()).map(([language, count3]) => ({
|
|
66125
66459
|
language,
|
|
66126
|
-
count:
|
|
66127
|
-
percentage:
|
|
66460
|
+
count: count3,
|
|
66461
|
+
percentage: count3 / totalRepos * 100,
|
|
66128
66462
|
color: LANGUAGE_COLORS[language] || "#6b7280"
|
|
66129
66463
|
})).sort((a, b) => b.count - a.count);
|
|
66130
66464
|
const recentActivity = repositories.slice(0, 5).map((repo) => ({
|
|
@@ -67133,7 +67467,7 @@ var GitHubStarsInternal = ({
|
|
|
67133
67467
|
const effectiveNotifications = isDocsMode2 ? false : enableNotifications;
|
|
67134
67468
|
const effectiveRefreshInterval = isDocsMode2 ? 36e5 : refreshInterval;
|
|
67135
67469
|
const { notify } = useGitHubNotifications(effectiveNotifications);
|
|
67136
|
-
const handleMilestoneReached =
|
|
67470
|
+
const handleMilestoneReached = React67__default.useCallback((milestone) => {
|
|
67137
67471
|
if (celebrateAt?.includes(milestone.count)) {
|
|
67138
67472
|
confetti({
|
|
67139
67473
|
particleCount: 100,
|
|
@@ -67175,7 +67509,7 @@ var GitHubStarsInternal = ({
|
|
|
67175
67509
|
forceMockData: useMockData
|
|
67176
67510
|
// Force mock data if true
|
|
67177
67511
|
});
|
|
67178
|
-
const handleExport =
|
|
67512
|
+
const handleExport = React67__default.useCallback((format6) => {
|
|
67179
67513
|
if (!enableExport)
|
|
67180
67514
|
return;
|
|
67181
67515
|
const timestamp = (/* @__PURE__ */ new Date()).toISOString().split("T")[0];
|
|
@@ -67188,7 +67522,7 @@ var GitHubStarsInternal = ({
|
|
|
67188
67522
|
exportAsCSV(repos, `github-stars-${username}-${timestamp}.csv`);
|
|
67189
67523
|
}
|
|
67190
67524
|
}, [enableExport, repos, stats, username]);
|
|
67191
|
-
const handleDetailedExport =
|
|
67525
|
+
const handleDetailedExport = React67__default.useCallback((e) => {
|
|
67192
67526
|
if (!enableExport)
|
|
67193
67527
|
return;
|
|
67194
67528
|
const dropdown = document.createElement("div");
|
|
@@ -69861,7 +70195,7 @@ var FilePreviewModal = ({
|
|
|
69861
70195
|
] })
|
|
69862
70196
|
] }) });
|
|
69863
70197
|
};
|
|
69864
|
-
var MoonUIFileUploadPro =
|
|
70198
|
+
var MoonUIFileUploadPro = React67__default.forwardRef(
|
|
69865
70199
|
({
|
|
69866
70200
|
accept = "*",
|
|
69867
70201
|
multiple = true,
|
|
@@ -70834,11 +71168,11 @@ var FileUploadItem = ({
|
|
|
70834
71168
|
};
|
|
70835
71169
|
MoonUIFileUploadPro.displayName = "MoonUIFileUploadPro";
|
|
70836
71170
|
function DataTableColumnToggle({ table, trigger }) {
|
|
70837
|
-
const [search, setSearch] =
|
|
71171
|
+
const [search, setSearch] = React67__default.useState("");
|
|
70838
71172
|
const columns = table.getAllColumns().filter(
|
|
70839
71173
|
(column) => column.getCanHide() && column.id !== "select" && column.id !== "actions" && column.id !== "expander"
|
|
70840
71174
|
);
|
|
70841
|
-
const filteredColumns =
|
|
71175
|
+
const filteredColumns = React67__default.useMemo(() => {
|
|
70842
71176
|
if (!search)
|
|
70843
71177
|
return columns;
|
|
70844
71178
|
return columns.filter((column) => {
|
|
@@ -70940,7 +71274,7 @@ function DataTableColumnToggle({ table, trigger }) {
|
|
|
70940
71274
|
] });
|
|
70941
71275
|
}
|
|
70942
71276
|
var ROOT_NAME = "AlertDialog";
|
|
70943
|
-
var [createAlertDialogContext, createAlertDialogScope] =
|
|
71277
|
+
var [createAlertDialogContext, createAlertDialogScope] = createContextScope2(ROOT_NAME, [
|
|
70944
71278
|
createDialogScope
|
|
70945
71279
|
]);
|
|
70946
71280
|
var useDialogScope = createDialogScope();
|
|
@@ -70951,7 +71285,7 @@ var AlertDialog = (props) => {
|
|
|
70951
71285
|
};
|
|
70952
71286
|
AlertDialog.displayName = ROOT_NAME;
|
|
70953
71287
|
var TRIGGER_NAME4 = "AlertDialogTrigger";
|
|
70954
|
-
var AlertDialogTrigger =
|
|
71288
|
+
var AlertDialogTrigger = React67.forwardRef(
|
|
70955
71289
|
(props, forwardedRef) => {
|
|
70956
71290
|
const { __scopeAlertDialog, ...triggerProps } = props;
|
|
70957
71291
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
@@ -70967,7 +71301,7 @@ var AlertDialogPortal = (props) => {
|
|
|
70967
71301
|
};
|
|
70968
71302
|
AlertDialogPortal.displayName = PORTAL_NAME3;
|
|
70969
71303
|
var OVERLAY_NAME = "AlertDialogOverlay";
|
|
70970
|
-
var AlertDialogOverlay =
|
|
71304
|
+
var AlertDialogOverlay = React67.forwardRef(
|
|
70971
71305
|
(props, forwardedRef) => {
|
|
70972
71306
|
const { __scopeAlertDialog, ...overlayProps } = props;
|
|
70973
71307
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
@@ -70978,13 +71312,13 @@ AlertDialogOverlay.displayName = OVERLAY_NAME;
|
|
|
70978
71312
|
var CONTENT_NAME5 = "AlertDialogContent";
|
|
70979
71313
|
var [AlertDialogContentProvider, useAlertDialogContentContext] = createAlertDialogContext(CONTENT_NAME5);
|
|
70980
71314
|
var Slottable = createSlottable("AlertDialogContent");
|
|
70981
|
-
var AlertDialogContent =
|
|
71315
|
+
var AlertDialogContent = React67.forwardRef(
|
|
70982
71316
|
(props, forwardedRef) => {
|
|
70983
71317
|
const { __scopeAlertDialog, children, ...contentProps } = props;
|
|
70984
71318
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
70985
|
-
const contentRef =
|
|
70986
|
-
const composedRefs =
|
|
70987
|
-
const cancelRef =
|
|
71319
|
+
const contentRef = React67.useRef(null);
|
|
71320
|
+
const composedRefs = useComposedRefs2(forwardedRef, contentRef);
|
|
71321
|
+
const cancelRef = React67.useRef(null);
|
|
70988
71322
|
return /* @__PURE__ */ jsx(
|
|
70989
71323
|
DialogPrimitive.WarningProvider,
|
|
70990
71324
|
{
|
|
@@ -70998,7 +71332,7 @@ var AlertDialogContent = React60.forwardRef(
|
|
|
70998
71332
|
...dialogScope,
|
|
70999
71333
|
...contentProps,
|
|
71000
71334
|
ref: composedRefs,
|
|
71001
|
-
onOpenAutoFocus:
|
|
71335
|
+
onOpenAutoFocus: composeEventHandlers2(contentProps.onOpenAutoFocus, (event) => {
|
|
71002
71336
|
event.preventDefault();
|
|
71003
71337
|
cancelRef.current?.focus({ preventScroll: true });
|
|
71004
71338
|
}),
|
|
@@ -71016,7 +71350,7 @@ var AlertDialogContent = React60.forwardRef(
|
|
|
71016
71350
|
);
|
|
71017
71351
|
AlertDialogContent.displayName = CONTENT_NAME5;
|
|
71018
71352
|
var TITLE_NAME = "AlertDialogTitle";
|
|
71019
|
-
var AlertDialogTitle =
|
|
71353
|
+
var AlertDialogTitle = React67.forwardRef(
|
|
71020
71354
|
(props, forwardedRef) => {
|
|
71021
71355
|
const { __scopeAlertDialog, ...titleProps } = props;
|
|
71022
71356
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
@@ -71025,14 +71359,14 @@ var AlertDialogTitle = React60.forwardRef(
|
|
|
71025
71359
|
);
|
|
71026
71360
|
AlertDialogTitle.displayName = TITLE_NAME;
|
|
71027
71361
|
var DESCRIPTION_NAME = "AlertDialogDescription";
|
|
71028
|
-
var AlertDialogDescription =
|
|
71362
|
+
var AlertDialogDescription = React67.forwardRef((props, forwardedRef) => {
|
|
71029
71363
|
const { __scopeAlertDialog, ...descriptionProps } = props;
|
|
71030
71364
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
71031
71365
|
return /* @__PURE__ */ jsx(DialogPrimitive.Description, { ...dialogScope, ...descriptionProps, ref: forwardedRef });
|
|
71032
71366
|
});
|
|
71033
71367
|
AlertDialogDescription.displayName = DESCRIPTION_NAME;
|
|
71034
71368
|
var ACTION_NAME = "AlertDialogAction";
|
|
71035
|
-
var AlertDialogAction =
|
|
71369
|
+
var AlertDialogAction = React67.forwardRef(
|
|
71036
71370
|
(props, forwardedRef) => {
|
|
71037
71371
|
const { __scopeAlertDialog, ...actionProps } = props;
|
|
71038
71372
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
@@ -71041,12 +71375,12 @@ var AlertDialogAction = React60.forwardRef(
|
|
|
71041
71375
|
);
|
|
71042
71376
|
AlertDialogAction.displayName = ACTION_NAME;
|
|
71043
71377
|
var CANCEL_NAME = "AlertDialogCancel";
|
|
71044
|
-
var AlertDialogCancel =
|
|
71378
|
+
var AlertDialogCancel = React67.forwardRef(
|
|
71045
71379
|
(props, forwardedRef) => {
|
|
71046
71380
|
const { __scopeAlertDialog, ...cancelProps } = props;
|
|
71047
71381
|
const { cancelRef } = useAlertDialogContentContext(CANCEL_NAME, __scopeAlertDialog);
|
|
71048
71382
|
const dialogScope = useDialogScope(__scopeAlertDialog);
|
|
71049
|
-
const ref =
|
|
71383
|
+
const ref = useComposedRefs2(forwardedRef, cancelRef);
|
|
71050
71384
|
return /* @__PURE__ */ jsx(DialogPrimitive.Close, { ...dialogScope, ...cancelProps, ref });
|
|
71051
71385
|
}
|
|
71052
71386
|
);
|
|
@@ -71059,7 +71393,7 @@ You can add a description to the \`${CONTENT_NAME5}\` by passing a \`${DESCRIPTI
|
|
|
71059
71393
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${CONTENT_NAME5}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
71060
71394
|
|
|
71061
71395
|
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;
|
|
71062
|
-
|
|
71396
|
+
React67.useEffect(() => {
|
|
71063
71397
|
const hasDescription = document.getElementById(
|
|
71064
71398
|
contentRef.current?.getAttribute("aria-describedby")
|
|
71065
71399
|
);
|
|
@@ -71078,7 +71412,7 @@ var Title22 = AlertDialogTitle;
|
|
|
71078
71412
|
var Description22 = AlertDialogDescription;
|
|
71079
71413
|
var AlertDialog2 = Root27;
|
|
71080
71414
|
var AlertDialogPortal2 = Portal22;
|
|
71081
|
-
var AlertDialogOverlay2 =
|
|
71415
|
+
var AlertDialogOverlay2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
71082
71416
|
Overlay22,
|
|
71083
71417
|
{
|
|
71084
71418
|
className: cn(
|
|
@@ -71090,7 +71424,7 @@ var AlertDialogOverlay2 = React60.forwardRef(({ className, ...props }, ref) => /
|
|
|
71090
71424
|
}
|
|
71091
71425
|
));
|
|
71092
71426
|
AlertDialogOverlay2.displayName = Overlay22.displayName;
|
|
71093
|
-
var AlertDialogContent2 =
|
|
71427
|
+
var AlertDialogContent2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs(AlertDialogPortal2, { children: [
|
|
71094
71428
|
/* @__PURE__ */ jsx(AlertDialogOverlay2, {}),
|
|
71095
71429
|
/* @__PURE__ */ jsx(
|
|
71096
71430
|
Content23,
|
|
@@ -71133,7 +71467,7 @@ var AlertDialogFooter = ({
|
|
|
71133
71467
|
}
|
|
71134
71468
|
);
|
|
71135
71469
|
AlertDialogFooter.displayName = "AlertDialogFooter";
|
|
71136
|
-
var AlertDialogTitle2 =
|
|
71470
|
+
var AlertDialogTitle2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
71137
71471
|
Title22,
|
|
71138
71472
|
{
|
|
71139
71473
|
ref,
|
|
@@ -71142,7 +71476,7 @@ var AlertDialogTitle2 = React60.forwardRef(({ className, ...props }, ref) => /*
|
|
|
71142
71476
|
}
|
|
71143
71477
|
));
|
|
71144
71478
|
AlertDialogTitle2.displayName = Title22.displayName;
|
|
71145
|
-
var AlertDialogDescription2 =
|
|
71479
|
+
var AlertDialogDescription2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
71146
71480
|
Description22,
|
|
71147
71481
|
{
|
|
71148
71482
|
ref,
|
|
@@ -71151,7 +71485,7 @@ var AlertDialogDescription2 = React60.forwardRef(({ className, ...props }, ref)
|
|
|
71151
71485
|
}
|
|
71152
71486
|
));
|
|
71153
71487
|
AlertDialogDescription2.displayName = Description22.displayName;
|
|
71154
|
-
var AlertDialogAction2 =
|
|
71488
|
+
var AlertDialogAction2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
71155
71489
|
Action2,
|
|
71156
71490
|
{
|
|
71157
71491
|
ref,
|
|
@@ -71160,7 +71494,7 @@ var AlertDialogAction2 = React60.forwardRef(({ className, ...props }, ref) => /*
|
|
|
71160
71494
|
}
|
|
71161
71495
|
));
|
|
71162
71496
|
AlertDialogAction2.displayName = Action2.displayName;
|
|
71163
|
-
var AlertDialogCancel2 =
|
|
71497
|
+
var AlertDialogCancel2 = React67.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
71164
71498
|
Cancel,
|
|
71165
71499
|
{
|
|
71166
71500
|
ref,
|
|
@@ -71179,8 +71513,8 @@ function DataTableBulkActions({
|
|
|
71179
71513
|
onClearSelection,
|
|
71180
71514
|
className
|
|
71181
71515
|
}) {
|
|
71182
|
-
const [isLoading, setIsLoading] =
|
|
71183
|
-
const [pendingAction, setPendingAction] =
|
|
71516
|
+
const [isLoading, setIsLoading] = React67__default.useState(false);
|
|
71517
|
+
const [pendingAction, setPendingAction] = React67__default.useState(null);
|
|
71184
71518
|
const selectedCount = selectedRows.length;
|
|
71185
71519
|
const handleAction = async (action) => {
|
|
71186
71520
|
if (action.confirmMessage) {
|
|
@@ -71719,7 +72053,7 @@ function DataTable({
|
|
|
71719
72053
|
onColumnFiltersChange,
|
|
71720
72054
|
state: externalState
|
|
71721
72055
|
}) {
|
|
71722
|
-
const columns =
|
|
72056
|
+
const columns = React67__default.useMemo(() => {
|
|
71723
72057
|
return originalColumns.map((col) => {
|
|
71724
72058
|
const { enableHiding, ...restCol } = col;
|
|
71725
72059
|
return {
|
|
@@ -71745,17 +72079,17 @@ function DataTable({
|
|
|
71745
72079
|
] })
|
|
71746
72080
|
] }) }) });
|
|
71747
72081
|
}
|
|
71748
|
-
const [sorting, setSorting] =
|
|
71749
|
-
const [columnFilters, setColumnFilters] =
|
|
71750
|
-
const [columnVisibility, setColumnVisibility] =
|
|
71751
|
-
const [rowSelection, setRowSelection] =
|
|
71752
|
-
const [globalFilter, setGlobalFilter] =
|
|
71753
|
-
const [isPaginationLoading, setIsPaginationLoading] =
|
|
71754
|
-
const [internalExpandedRows, setInternalExpandedRows] =
|
|
71755
|
-
const [filterDrawerOpen, setFilterDrawerOpen] =
|
|
72082
|
+
const [sorting, setSorting] = React67__default.useState([]);
|
|
72083
|
+
const [columnFilters, setColumnFilters] = React67__default.useState([]);
|
|
72084
|
+
const [columnVisibility, setColumnVisibility] = React67__default.useState({});
|
|
72085
|
+
const [rowSelection, setRowSelection] = React67__default.useState({});
|
|
72086
|
+
const [globalFilter, setGlobalFilter] = React67__default.useState("");
|
|
72087
|
+
const [isPaginationLoading, setIsPaginationLoading] = React67__default.useState(false);
|
|
72088
|
+
const [internalExpandedRows, setInternalExpandedRows] = React67__default.useState(/* @__PURE__ */ new Set());
|
|
72089
|
+
const [filterDrawerOpen, setFilterDrawerOpen] = React67__default.useState(false);
|
|
71756
72090
|
const expandedRows = controlledExpandedRows || internalExpandedRows;
|
|
71757
72091
|
const actualPageSize = defaultPageSize || pageSize;
|
|
71758
|
-
const stableData =
|
|
72092
|
+
const stableData = React67__default.useMemo(() => data, [data]);
|
|
71759
72093
|
const table = useReactTable({
|
|
71760
72094
|
data: stableData,
|
|
71761
72095
|
columns,
|
|
@@ -71835,7 +72169,7 @@ function DataTable({
|
|
|
71835
72169
|
autoResetExpanded: false,
|
|
71836
72170
|
getRowId: (row) => row.id || row.orderId || Math.random().toString()
|
|
71837
72171
|
});
|
|
71838
|
-
|
|
72172
|
+
React67__default.useEffect(() => {
|
|
71839
72173
|
if (onRowSelect && selectable) {
|
|
71840
72174
|
const selectedRows = table.getFilteredSelectedRowModel().rows.map((row) => row.original);
|
|
71841
72175
|
onRowSelect(selectedRows);
|
|
@@ -71843,8 +72177,8 @@ function DataTable({
|
|
|
71843
72177
|
}, [rowSelection, onRowSelect, selectable, table]);
|
|
71844
72178
|
table.getState();
|
|
71845
72179
|
const rowModel = table.getRowModel();
|
|
71846
|
-
const rowsRef =
|
|
71847
|
-
|
|
72180
|
+
const rowsRef = React67__default.useRef(rowModel.rows);
|
|
72181
|
+
React67__default.useMemo(() => {
|
|
71848
72182
|
const changed = rowsRef.current !== rowModel.rows;
|
|
71849
72183
|
if (changed) {
|
|
71850
72184
|
rowsRef.current = rowModel.rows;
|
|
@@ -71881,7 +72215,7 @@ function DataTable({
|
|
|
71881
72215
|
includeHeaders: true
|
|
71882
72216
|
});
|
|
71883
72217
|
};
|
|
71884
|
-
const exportFormats =
|
|
72218
|
+
const exportFormats = React67__default.useMemo(() => {
|
|
71885
72219
|
if (!exportable)
|
|
71886
72220
|
return [];
|
|
71887
72221
|
if (exportable === true)
|
|
@@ -72158,8 +72492,8 @@ function getExpandableColumn(expandedRows, onToggle) {
|
|
|
72158
72492
|
};
|
|
72159
72493
|
}
|
|
72160
72494
|
function useExpandableRows(initialExpanded = /* @__PURE__ */ new Set()) {
|
|
72161
|
-
const [expandedRows, setExpandedRows] =
|
|
72162
|
-
const toggleRow =
|
|
72495
|
+
const [expandedRows, setExpandedRows] = React67__default.useState(initialExpanded);
|
|
72496
|
+
const toggleRow = React67__default.useCallback((id) => {
|
|
72163
72497
|
setExpandedRows((prev) => {
|
|
72164
72498
|
const newExpanded = new Set(prev);
|
|
72165
72499
|
if (newExpanded.has(id)) {
|
|
@@ -72170,10 +72504,10 @@ function useExpandableRows(initialExpanded = /* @__PURE__ */ new Set()) {
|
|
|
72170
72504
|
return newExpanded;
|
|
72171
72505
|
});
|
|
72172
72506
|
}, []);
|
|
72173
|
-
const expandAll =
|
|
72507
|
+
const expandAll = React67__default.useCallback((rowIds) => {
|
|
72174
72508
|
setExpandedRows(new Set(rowIds));
|
|
72175
72509
|
}, []);
|
|
72176
|
-
const collapseAll =
|
|
72510
|
+
const collapseAll = React67__default.useCallback(() => {
|
|
72177
72511
|
setExpandedRows(/* @__PURE__ */ new Set());
|
|
72178
72512
|
}, []);
|
|
72179
72513
|
return {
|
|
@@ -72184,7 +72518,7 @@ function useExpandableRows(initialExpanded = /* @__PURE__ */ new Set()) {
|
|
|
72184
72518
|
collapseAll
|
|
72185
72519
|
};
|
|
72186
72520
|
}
|
|
72187
|
-
var TableRow2 =
|
|
72521
|
+
var TableRow2 = React67__default.memo(({
|
|
72188
72522
|
row,
|
|
72189
72523
|
columns,
|
|
72190
72524
|
isExpanded,
|
|
@@ -72235,7 +72569,7 @@ var TableRow2 = React60__default.memo(({
|
|
|
72235
72569
|
});
|
|
72236
72570
|
TableRow2.displayName = "TableRow";
|
|
72237
72571
|
var MoonUIDataTablePro = DataTable;
|
|
72238
|
-
var SearchInput =
|
|
72572
|
+
var SearchInput = React67__default.memo(({
|
|
72239
72573
|
searchInputRef,
|
|
72240
72574
|
searchPlaceholder,
|
|
72241
72575
|
initialValue,
|
|
@@ -72562,7 +72896,7 @@ function SidebarInternal({
|
|
|
72562
72896
|
const hasChildren = item.items && item.items.length > 0;
|
|
72563
72897
|
const isExpanded = expandedSections.includes(item.id);
|
|
72564
72898
|
const shouldShowHoverMenu = collapsed && !isMobile && depth === 0 && (hasChildren || item.title);
|
|
72565
|
-
const ItemWrapper = item.tooltip && !collapsed ? MoonUITooltipTriggerPro :
|
|
72899
|
+
const ItemWrapper = item.tooltip && !collapsed ? MoonUITooltipTriggerPro : React67__default.Fragment;
|
|
72566
72900
|
const itemContent = /* @__PURE__ */ jsxs(
|
|
72567
72901
|
"button",
|
|
72568
72902
|
{
|
|
@@ -72660,7 +72994,7 @@ function SidebarInternal({
|
|
|
72660
72994
|
) })
|
|
72661
72995
|
] }, item.id);
|
|
72662
72996
|
}, [activePath, pinnedItems, expandedSections, collapsed, customStyles, handleItemClick, toggleSection, isMobile, glassmorphism, renderCollapsedHoverContent]);
|
|
72663
|
-
const SidebarHeader =
|
|
72997
|
+
const SidebarHeader = React67__default.memo(() => {
|
|
72664
72998
|
return /* @__PURE__ */ jsxs("div", { className: cn(
|
|
72665
72999
|
"flex items-center gap-3 p-4 border-b",
|
|
72666
73000
|
collapsed && !isMobile && "justify-center px-2"
|
|
@@ -72694,7 +73028,7 @@ function SidebarInternal({
|
|
|
72694
73028
|
)
|
|
72695
73029
|
] });
|
|
72696
73030
|
});
|
|
72697
|
-
const SidebarMenuContent =
|
|
73031
|
+
const SidebarMenuContent = React67__default.memo(() => {
|
|
72698
73032
|
return /* @__PURE__ */ jsx(ScrollArea, { className: "flex-1 overflow-y-auto", children: /* @__PURE__ */ jsxs("div", { className: "p-4 space-y-6", children: [
|
|
72699
73033
|
pinnedItems.length > 0 && (!collapsed || isMobile) && /* @__PURE__ */ jsxs("div", { children: [
|
|
72700
73034
|
/* @__PURE__ */ jsx("h4", { className: "text-xs font-medium text-muted-foreground mb-2", children: "Pinned" }),
|
|
@@ -72710,7 +73044,7 @@ function SidebarInternal({
|
|
|
72710
73044
|
] }, section.id))
|
|
72711
73045
|
] }) });
|
|
72712
73046
|
});
|
|
72713
|
-
const SidebarFooter =
|
|
73047
|
+
const SidebarFooter = React67__default.memo(() => {
|
|
72714
73048
|
return footer ? /* @__PURE__ */ jsxs("div", { className: "border-t p-4", children: [
|
|
72715
73049
|
/* @__PURE__ */ jsx("div", { className: "space-y-1", children: footer.items.map((item) => renderItem(item)) }),
|
|
72716
73050
|
showThemeToggle && (!collapsed || isMobile) && /* @__PURE__ */ jsxs("div", { className: "mt-3 flex items-center justify-between", children: [
|
|
@@ -72739,7 +73073,7 @@ function SidebarInternal({
|
|
|
72739
73073
|
] })
|
|
72740
73074
|
] }) : null;
|
|
72741
73075
|
});
|
|
72742
|
-
const SidebarContent =
|
|
73076
|
+
const SidebarContent = React67__default.memo(() => {
|
|
72743
73077
|
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
72744
73078
|
/* @__PURE__ */ jsx(SidebarMenuContent, {}),
|
|
72745
73079
|
/* @__PURE__ */ jsx(SidebarFooter, {})
|
|
@@ -73113,7 +73447,7 @@ function NavbarInternal({
|
|
|
73113
73447
|
}
|
|
73114
73448
|
)
|
|
73115
73449
|
] }),
|
|
73116
|
-
!isMobile && /* @__PURE__ */ jsx(NavigationMenu2, { className: "hidden md:flex", children: /* @__PURE__ */ jsx(NavigationMenuList2, { children: sections.map((section) => /* @__PURE__ */ jsx(
|
|
73450
|
+
!isMobile && /* @__PURE__ */ jsx(NavigationMenu2, { className: "hidden md:flex", children: /* @__PURE__ */ jsx(NavigationMenuList2, { children: sections.map((section) => /* @__PURE__ */ jsx(React67__default.Fragment, { children: section.items.map((item) => {
|
|
73117
73451
|
const hasChildren = item.items && item.items.length > 0;
|
|
73118
73452
|
const isActive2 = item.href === activePath;
|
|
73119
73453
|
if (hasChildren) {
|
|
@@ -73856,9 +74190,9 @@ var FormWizardStep = ({
|
|
|
73856
74190
|
animationDuration = 0.3
|
|
73857
74191
|
}) => {
|
|
73858
74192
|
const { steps, currentStep, goToNext, goToPrevious, goToStep, updateStepData, stepData, error } = useFormWizard();
|
|
73859
|
-
const [direction, setDirection] =
|
|
73860
|
-
const previousStep =
|
|
73861
|
-
|
|
74193
|
+
const [direction, setDirection] = React67__default.useState(0);
|
|
74194
|
+
const previousStep = React67__default.useRef(currentStep);
|
|
74195
|
+
React67__default.useEffect(() => {
|
|
73862
74196
|
setDirection(currentStep > previousStep.current ? 1 : -1);
|
|
73863
74197
|
previousStep.current = currentStep;
|
|
73864
74198
|
}, [currentStep]);
|
|
@@ -73994,7 +74328,7 @@ var FormWizardNavigation = ({
|
|
|
73994
74328
|
)
|
|
73995
74329
|
] });
|
|
73996
74330
|
};
|
|
73997
|
-
var FormWizardInternal =
|
|
74331
|
+
var FormWizardInternal = React67__default.forwardRef(({
|
|
73998
74332
|
steps,
|
|
73999
74333
|
currentStep = 0,
|
|
74000
74334
|
onStepChange,
|
|
@@ -74073,7 +74407,7 @@ var FormWizardInternal = React60__default.forwardRef(({
|
|
|
74073
74407
|
);
|
|
74074
74408
|
});
|
|
74075
74409
|
FormWizardInternal.displayName = "FormWizardInternal";
|
|
74076
|
-
var MoonUIFormWizardPro =
|
|
74410
|
+
var MoonUIFormWizardPro = React67__default.forwardRef(
|
|
74077
74411
|
(props, ref) => {
|
|
74078
74412
|
const { hasProAccess, isLoading } = useSubscription();
|
|
74079
74413
|
if (!isLoading && !hasProAccess) {
|
|
@@ -74543,7 +74877,7 @@ function validateExpiry(expiry) {
|
|
|
74543
74877
|
const expiryDate = new Date(year, month - 1);
|
|
74544
74878
|
return expiryDate > now;
|
|
74545
74879
|
}
|
|
74546
|
-
var MoonUICreditCardInputPro =
|
|
74880
|
+
var MoonUICreditCardInputPro = React67__default.forwardRef(({
|
|
74547
74881
|
value = { number: "", expiry: "", cvc: "", name: "" },
|
|
74548
74882
|
onChange,
|
|
74549
74883
|
showCardPreview = true,
|
|
@@ -74790,7 +75124,7 @@ var quizFormVariants = cva(
|
|
|
74790
75124
|
}
|
|
74791
75125
|
}
|
|
74792
75126
|
);
|
|
74793
|
-
var MoonUIQuizFormProInternal =
|
|
75127
|
+
var MoonUIQuizFormProInternal = React67__default.forwardRef(({
|
|
74794
75128
|
className,
|
|
74795
75129
|
variant,
|
|
74796
75130
|
size: size4,
|
|
@@ -75372,7 +75706,7 @@ var MoonUIQuizFormProInternal = React60__default.forwardRef(({
|
|
|
75372
75706
|
] });
|
|
75373
75707
|
});
|
|
75374
75708
|
MoonUIQuizFormProInternal.displayName = "MoonUIQuizFormProInternal";
|
|
75375
|
-
var MoonUIQuizFormPro2 =
|
|
75709
|
+
var MoonUIQuizFormPro2 = React67__default.forwardRef((props, ref) => {
|
|
75376
75710
|
const { hasProAccess, isLoading } = useSubscription();
|
|
75377
75711
|
if (!isLoading && !hasProAccess) {
|
|
75378
75712
|
return /* @__PURE__ */ jsx(MoonUICardPro, { className: cn("w-full", props.className), children: /* @__PURE__ */ jsx(MoonUICardContentPro, { className: "py-12 text-center", children: /* @__PURE__ */ jsxs("div", { className: "max-w-md mx-auto space-y-4", children: [
|