@moontra/moonui 2.1.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +433 -2025
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +198 -1896
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -2
- package/src/components/ui/accordion.tsx +9 -6
- package/src/components/ui/alert.tsx +13 -10
- package/src/components/ui/aspect-ratio.tsx +9 -6
- package/src/components/ui/avatar.tsx +10 -7
- package/src/components/ui/badge.tsx +7 -4
- package/src/components/ui/breadcrumb.tsx +31 -29
- package/src/components/ui/calendar.tsx +9 -6
- package/src/components/ui/card.tsx +21 -18
- package/src/components/ui/checkbox.tsx +8 -5
- package/src/components/ui/collapsible.tsx +12 -10
- package/src/components/ui/color-picker.tsx +2 -2
- package/src/components/ui/command.tsx +28 -26
- package/src/components/ui/data-table.tsx +2 -2
- package/src/components/ui/date-picker.tsx +8 -8
- package/src/components/ui/dialog.tsx +23 -21
- package/src/components/ui/dropdown-menu.tsx +36 -34
- package/src/components/ui/file-upload.tsx +3 -3
- package/src/components/ui/input.tsx +9 -6
- package/src/components/ui/label.tsx +7 -4
- package/src/components/ui/locked-component.tsx +1 -1
- package/src/components/ui/moon-logo.tsx +1 -1
- package/src/components/ui/pagination.tsx +7 -5
- package/src/components/ui/popover.tsx +11 -9
- package/src/components/ui/progress.tsx +9 -6
- package/src/components/ui/radio-group.tsx +10 -7
- package/src/components/ui/select.tsx +23 -21
- package/src/components/ui/separator.tsx +8 -5
- package/src/components/ui/simple-editor.tsx +4 -4
- package/src/components/ui/skeleton.tsx +10 -7
- package/src/components/ui/slider.tsx +8 -5
- package/src/components/ui/switch.tsx +6 -3
- package/src/components/ui/table.tsx +31 -29
- package/src/components/ui/tabs.tsx +12 -9
- package/src/components/ui/textarea.tsx +7 -4
- package/src/components/ui/toast.tsx +9 -7
- package/src/components/ui/toggle.tsx +7 -4
- package/src/components/ui/tooltip.tsx +13 -11
- package/src/use-performance-optimizer.ts +1 -1
package/dist/index.mjs
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import * as t from 'react';
|
|
2
2
|
import * as AccordionPrimitive from '@radix-ui/react-accordion';
|
|
3
|
-
import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X,
|
|
3
|
+
import { ChevronDown, Info, AlertCircle, AlertTriangle, Check, X, Loader2, Minus, Search, ChevronRight, Circle, ChevronUp, MoreHorizontal, ChevronLeft, Calendar, Clock } from 'lucide-react';
|
|
4
4
|
import { clsx } from 'clsx';
|
|
5
5
|
import { twMerge } from 'tailwind-merge';
|
|
6
6
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
7
7
|
import { cva } from 'class-variance-authority';
|
|
8
8
|
import * as AvatarPrimitive from '@radix-ui/react-avatar';
|
|
9
|
+
import { format, isSameMonth, isToday, isValid, subMonths, addMonths, isSameDay, startOfMonth, endOfMonth, eachDayOfInterval, getDay, startOfWeek, endOfWeek } from 'date-fns';
|
|
10
|
+
export { format } from 'date-fns';
|
|
9
11
|
import { motion, AnimatePresence } from 'framer-motion';
|
|
10
12
|
import * as CheckboxPrimitive from '@radix-ui/react-checkbox';
|
|
11
13
|
import 'react-dom';
|
|
@@ -71,8 +73,8 @@ function getClientIP(request) {
|
|
|
71
73
|
}
|
|
72
74
|
return "127.0.0.1";
|
|
73
75
|
}
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
+
var MoonUIAccordion = AccordionPrimitive.Root;
|
|
77
|
+
var MoonUIAccordionItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
76
78
|
AccordionPrimitive.Item,
|
|
77
79
|
{
|
|
78
80
|
ref,
|
|
@@ -80,8 +82,8 @@ var AccordionItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
80
82
|
...props
|
|
81
83
|
}
|
|
82
84
|
));
|
|
83
|
-
|
|
84
|
-
var
|
|
85
|
+
MoonUIAccordionItem.displayName = "MoonUIAccordionItem";
|
|
86
|
+
var MoonUIAccordionTrigger = t.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(AccordionPrimitive.Header, { className: "flex", children: /* @__PURE__ */ jsxs(
|
|
85
87
|
AccordionPrimitive.Trigger,
|
|
86
88
|
{
|
|
87
89
|
ref,
|
|
@@ -99,7 +101,7 @@ var AccordionTrigger = t.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
99
101
|
}
|
|
100
102
|
) }));
|
|
101
103
|
AccordionTrigger.displayName = AccordionPrimitive.Trigger.displayName;
|
|
102
|
-
var
|
|
104
|
+
var MoonUIAccordionContent = t.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
103
105
|
AccordionPrimitive.Content,
|
|
104
106
|
{
|
|
105
107
|
ref,
|
|
@@ -113,7 +115,7 @@ var AccordionContent = t.forwardRef(({ className, children, ...props }, ref) =>
|
|
|
113
115
|
}
|
|
114
116
|
));
|
|
115
117
|
AccordionContent.displayName = AccordionPrimitive.Content.displayName;
|
|
116
|
-
|
|
118
|
+
cva(
|
|
117
119
|
"relative w-full flex items-center gap-3 p-4 border text-foreground [&>svg]:shrink-0",
|
|
118
120
|
{
|
|
119
121
|
variants: {
|
|
@@ -149,7 +151,7 @@ var alertVariants = cva(
|
|
|
149
151
|
}
|
|
150
152
|
}
|
|
151
153
|
);
|
|
152
|
-
var
|
|
154
|
+
var MoonUIAlert = t.forwardRef(
|
|
153
155
|
({ className, variant = "default", size, radius, hideIcon = false, closable = false, onClose, children, ...props }, ref) => {
|
|
154
156
|
const Icon2 = t.useMemo(() => {
|
|
155
157
|
switch (variant) {
|
|
@@ -189,8 +191,8 @@ var Alert = t.forwardRef(
|
|
|
189
191
|
);
|
|
190
192
|
}
|
|
191
193
|
);
|
|
192
|
-
|
|
193
|
-
var
|
|
194
|
+
MoonUIAlert.displayName = "MoonUIAlert";
|
|
195
|
+
var MoonUIAlertTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
194
196
|
"h5",
|
|
195
197
|
{
|
|
196
198
|
ref,
|
|
@@ -198,8 +200,8 @@ var AlertTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
198
200
|
...props
|
|
199
201
|
}
|
|
200
202
|
));
|
|
201
|
-
|
|
202
|
-
var
|
|
203
|
+
MoonUIAlertTitle.displayName = "MoonUIAlertTitle";
|
|
204
|
+
var MoonUIAlertDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
203
205
|
"div",
|
|
204
206
|
{
|
|
205
207
|
ref,
|
|
@@ -207,8 +209,8 @@ var AlertDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
207
209
|
...props
|
|
208
210
|
}
|
|
209
211
|
));
|
|
210
|
-
|
|
211
|
-
var
|
|
212
|
+
MoonUIAlertDescription.displayName = "MoonUIAlertDescription";
|
|
213
|
+
var moonUIAspectRatioVariants = cva(
|
|
212
214
|
"relative overflow-hidden",
|
|
213
215
|
{
|
|
214
216
|
variants: {
|
|
@@ -231,7 +233,7 @@ var aspectRatioVariants = cva(
|
|
|
231
233
|
}
|
|
232
234
|
}
|
|
233
235
|
);
|
|
234
|
-
var
|
|
236
|
+
var MoonUIAspectRatio = t.forwardRef(({ className, variant, radius, ratio = 16 / 9, style, children, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
235
237
|
"div",
|
|
236
238
|
{
|
|
237
239
|
ref,
|
|
@@ -245,8 +247,8 @@ var AspectRatio = t.forwardRef(({ className, variant, radius, ratio = 16 / 9, st
|
|
|
245
247
|
children: /* @__PURE__ */ jsx("div", { className: "absolute inset-0", children })
|
|
246
248
|
}
|
|
247
249
|
));
|
|
248
|
-
|
|
249
|
-
|
|
250
|
+
MoonUIAspectRatio.displayName = "MoonUIAspectRatio";
|
|
251
|
+
cva(
|
|
250
252
|
"relative flex shrink-0 overflow-hidden",
|
|
251
253
|
{
|
|
252
254
|
variants: {
|
|
@@ -280,7 +282,7 @@ var avatarVariants = cva(
|
|
|
280
282
|
}
|
|
281
283
|
}
|
|
282
284
|
);
|
|
283
|
-
var
|
|
285
|
+
var MoonUIAvatar = t.forwardRef(({ className, size, radius, variant, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
284
286
|
AvatarPrimitive.Root,
|
|
285
287
|
{
|
|
286
288
|
ref,
|
|
@@ -289,7 +291,7 @@ var Avatar = t.forwardRef(({ className, size, radius, variant, ...props }, ref)
|
|
|
289
291
|
}
|
|
290
292
|
));
|
|
291
293
|
Avatar.displayName = AvatarPrimitive.Root.displayName;
|
|
292
|
-
var
|
|
294
|
+
var MoonUIAvatarImage = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
293
295
|
AvatarPrimitive.Image,
|
|
294
296
|
{
|
|
295
297
|
ref,
|
|
@@ -298,7 +300,7 @@ var AvatarImage = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
298
300
|
}
|
|
299
301
|
));
|
|
300
302
|
AvatarImage.displayName = AvatarPrimitive.Image.displayName;
|
|
301
|
-
var
|
|
303
|
+
var MoonUIAvatarFallback = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
302
304
|
AvatarPrimitive.Fallback,
|
|
303
305
|
{
|
|
304
306
|
ref,
|
|
@@ -350,7 +352,7 @@ var AvatarGroup = t.forwardRef(
|
|
|
350
352
|
}
|
|
351
353
|
);
|
|
352
354
|
AvatarGroup.displayName = "AvatarGroup";
|
|
353
|
-
var
|
|
355
|
+
var moonUIBadgeVariants = cva(
|
|
354
356
|
[
|
|
355
357
|
"inline-flex items-center gap-1.5",
|
|
356
358
|
"font-medium transition-colors duration-200",
|
|
@@ -436,83 +438,6 @@ var badgeVariants = cva(
|
|
|
436
438
|
}
|
|
437
439
|
}
|
|
438
440
|
);
|
|
439
|
-
function Badge({
|
|
440
|
-
className,
|
|
441
|
-
variant,
|
|
442
|
-
size,
|
|
443
|
-
radius,
|
|
444
|
-
withDot,
|
|
445
|
-
dotColor,
|
|
446
|
-
removable,
|
|
447
|
-
onRemove,
|
|
448
|
-
leftIcon,
|
|
449
|
-
rightIcon,
|
|
450
|
-
children,
|
|
451
|
-
...props
|
|
452
|
-
}) {
|
|
453
|
-
let autoLeftIcon = leftIcon;
|
|
454
|
-
let autoChildren = children;
|
|
455
|
-
if (variant === "pro") {
|
|
456
|
-
autoLeftIcon = leftIcon || /* @__PURE__ */ jsxs("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "w-3 h-3", children: [
|
|
457
|
-
/* @__PURE__ */ jsx("path", { d: "M12 0L13.09 8.26L22 9L13.09 9.74L12 18L10.91 9.74L2 9L10.91 8.26L12 0Z", fill: "currentColor" }),
|
|
458
|
-
/* @__PURE__ */ jsx("path", { d: "M19 5L19.5 7L21 7.5L19.5 8L19 10L18.5 8L17 7.5L18.5 7L19 5Z", fill: "currentColor" }),
|
|
459
|
-
/* @__PURE__ */ jsx("path", { d: "M19 15L19.5 17L21 17.5L19.5 18L19 20L18.5 18L17 17.5L18.5 17L19 15Z", fill: "currentColor" })
|
|
460
|
-
] });
|
|
461
|
-
autoChildren = children || "Pro";
|
|
462
|
-
}
|
|
463
|
-
if (variant === "admin") {
|
|
464
|
-
autoLeftIcon = leftIcon || /* @__PURE__ */ jsx("svg", { width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", className: "w-3 h-3", children: /* @__PURE__ */ jsx("path", { d: "M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-2 15l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z", fill: "currentColor" }) });
|
|
465
|
-
autoChildren = children || "Admin Pro";
|
|
466
|
-
}
|
|
467
|
-
return /* @__PURE__ */ jsxs(
|
|
468
|
-
"div",
|
|
469
|
-
{
|
|
470
|
-
className: cn(badgeVariants({ variant, size, radius }), className),
|
|
471
|
-
"data-removable": removable ? "" : void 0,
|
|
472
|
-
...props,
|
|
473
|
-
children: [
|
|
474
|
-
withDot && /* @__PURE__ */ jsx(
|
|
475
|
-
"span",
|
|
476
|
-
{
|
|
477
|
-
className: cn(
|
|
478
|
-
"h-2 w-2 rounded-full",
|
|
479
|
-
dotColor || (variant === "destructive" ? "bg-white" : variant === "success" ? "bg-white" : variant === "warning" ? "bg-white" : variant === "secondary" ? "bg-secondary-foreground" : variant === "outline" ? "bg-foreground" : variant === "ghost" ? "bg-foreground" : variant === "pro" ? "bg-white" : variant === "admin" ? "bg-white" : "bg-primary-foreground")
|
|
480
|
-
),
|
|
481
|
-
"aria-hidden": "true"
|
|
482
|
-
}
|
|
483
|
-
),
|
|
484
|
-
autoLeftIcon && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0", children: autoLeftIcon }),
|
|
485
|
-
/* @__PURE__ */ jsx("span", { className: "truncate", children: autoChildren }),
|
|
486
|
-
rightIcon && /* @__PURE__ */ jsx("span", { className: "inline-flex shrink-0", children: rightIcon }),
|
|
487
|
-
removable && onRemove && /* @__PURE__ */ jsx(
|
|
488
|
-
"button",
|
|
489
|
-
{
|
|
490
|
-
type: "button",
|
|
491
|
-
className: "ml-1 -mr-1 h-3.5 w-3.5 rounded-full inline-flex items-center justify-center hover:bg-black/10 dark:hover:bg-white/10",
|
|
492
|
-
onClick: (e) => {
|
|
493
|
-
e.stopPropagation();
|
|
494
|
-
onRemove();
|
|
495
|
-
},
|
|
496
|
-
"aria-label": "Remove badge",
|
|
497
|
-
children: /* @__PURE__ */ jsx(
|
|
498
|
-
"svg",
|
|
499
|
-
{
|
|
500
|
-
width: "8",
|
|
501
|
-
height: "8",
|
|
502
|
-
viewBox: "0 0 8 8",
|
|
503
|
-
fill: "none",
|
|
504
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
505
|
-
className: "opacity-70",
|
|
506
|
-
"aria-hidden": "true",
|
|
507
|
-
children: /* @__PURE__ */ jsx("path", { d: "M0.799988 7.19999L7.19999 0.799988M0.799988 0.799988L7.19999 7.19999", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })
|
|
508
|
-
}
|
|
509
|
-
)
|
|
510
|
-
}
|
|
511
|
-
)
|
|
512
|
-
]
|
|
513
|
-
}
|
|
514
|
-
);
|
|
515
|
-
}
|
|
516
441
|
var breadcrumbVariants = cva(
|
|
517
442
|
"flex items-center gap-1.5 text-sm",
|
|
518
443
|
{
|
|
@@ -534,7 +459,7 @@ var breadcrumbVariants = cva(
|
|
|
534
459
|
}
|
|
535
460
|
}
|
|
536
461
|
);
|
|
537
|
-
var
|
|
462
|
+
var MoonUIBreadcrumb = t.forwardRef(
|
|
538
463
|
({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
539
464
|
"nav",
|
|
540
465
|
{
|
|
@@ -545,8 +470,8 @@ var Breadcrumb = t.forwardRef(
|
|
|
545
470
|
}
|
|
546
471
|
)
|
|
547
472
|
);
|
|
548
|
-
|
|
549
|
-
var
|
|
473
|
+
MoonUIBreadcrumb.displayName = "MoonUIBreadcrumb";
|
|
474
|
+
var MoonUIBreadcrumbList = t.forwardRef(
|
|
550
475
|
({ className, collapsed, collapsedWidth = 3, ...props }, ref) => {
|
|
551
476
|
const childrenArray = t.Children.toArray(props.children).filter(Boolean);
|
|
552
477
|
const childCount = childrenArray.length;
|
|
@@ -583,8 +508,8 @@ var BreadcrumbList = t.forwardRef(
|
|
|
583
508
|
);
|
|
584
509
|
}
|
|
585
510
|
);
|
|
586
|
-
|
|
587
|
-
var
|
|
511
|
+
MoonUIBreadcrumbList.displayName = "MoonUIBreadcrumbList";
|
|
512
|
+
var MoonUIBreadcrumbItem = t.forwardRef(
|
|
588
513
|
({ className, isCurrent, href, asChild = false, ...props }, ref) => {
|
|
589
514
|
const Comp = asChild ? t.Fragment : href ? "a" : "span";
|
|
590
515
|
const itemProps = asChild ? {} : href ? { href } : {};
|
|
@@ -610,8 +535,8 @@ var BreadcrumbItem = t.forwardRef(
|
|
|
610
535
|
);
|
|
611
536
|
}
|
|
612
537
|
);
|
|
613
|
-
|
|
614
|
-
var
|
|
538
|
+
MoonUIBreadcrumbItem.displayName = "MoonUIBreadcrumbItem";
|
|
539
|
+
var MoonUIBreadcrumbSeparator = ({
|
|
615
540
|
children,
|
|
616
541
|
className,
|
|
617
542
|
...props
|
|
@@ -625,8 +550,8 @@ var BreadcrumbSeparator = ({
|
|
|
625
550
|
children: children || /* @__PURE__ */ jsx(ChevronRight, { className: "h-3.5 w-3.5" })
|
|
626
551
|
}
|
|
627
552
|
);
|
|
628
|
-
|
|
629
|
-
var
|
|
553
|
+
MoonUIBreadcrumbSeparator.displayName = "MoonUIBreadcrumbSeparator";
|
|
554
|
+
var MoonUIBreadcrumbEllipsis = ({
|
|
630
555
|
className,
|
|
631
556
|
...props
|
|
632
557
|
}) => /* @__PURE__ */ jsxs(
|
|
@@ -642,8 +567,8 @@ var BreadcrumbEllipsis = ({
|
|
|
642
567
|
]
|
|
643
568
|
}
|
|
644
569
|
);
|
|
645
|
-
|
|
646
|
-
var
|
|
570
|
+
MoonUIBreadcrumbEllipsis.displayName = "MoonUIBreadcrumbEllipsis";
|
|
571
|
+
var MoonUIBreadcrumbLink = t.forwardRef(
|
|
647
572
|
({ className, href, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
648
573
|
"a",
|
|
649
574
|
{
|
|
@@ -657,8 +582,8 @@ var BreadcrumbLink = t.forwardRef(
|
|
|
657
582
|
}
|
|
658
583
|
)
|
|
659
584
|
);
|
|
660
|
-
|
|
661
|
-
var
|
|
585
|
+
MoonUIBreadcrumbLink.displayName = "MoonUIBreadcrumbLink";
|
|
586
|
+
var MoonUIBreadcrumbPage = t.forwardRef(
|
|
662
587
|
({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
663
588
|
"span",
|
|
664
589
|
{
|
|
@@ -671,7 +596,7 @@ var BreadcrumbPage = t.forwardRef(
|
|
|
671
596
|
}
|
|
672
597
|
)
|
|
673
598
|
);
|
|
674
|
-
|
|
599
|
+
MoonUIBreadcrumbPage.displayName = "MoonUIBreadcrumbPage";
|
|
675
600
|
var moonUIButtonVariants = cva(
|
|
676
601
|
[
|
|
677
602
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap",
|
|
@@ -821,7 +746,7 @@ var moonUIButtonVariants = cva(
|
|
|
821
746
|
}
|
|
822
747
|
}
|
|
823
748
|
);
|
|
824
|
-
var
|
|
749
|
+
var MoonUIButton2 = t.forwardRef(
|
|
825
750
|
({
|
|
826
751
|
className,
|
|
827
752
|
variant,
|
|
@@ -855,1631 +780,8 @@ var MoonUIButton = t.forwardRef(
|
|
|
855
780
|
);
|
|
856
781
|
}
|
|
857
782
|
);
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
var millisecondsInDay = 864e5;
|
|
861
|
-
var constructFromSymbol = Symbol.for("constructDateFrom");
|
|
862
|
-
|
|
863
|
-
// ../../node_modules/date-fns/constructFrom.js
|
|
864
|
-
function constructFrom(date, value) {
|
|
865
|
-
if (typeof date === "function")
|
|
866
|
-
return date(value);
|
|
867
|
-
if (date && typeof date === "object" && constructFromSymbol in date)
|
|
868
|
-
return date[constructFromSymbol](value);
|
|
869
|
-
if (date instanceof Date)
|
|
870
|
-
return new date.constructor(value);
|
|
871
|
-
return new Date(value);
|
|
872
|
-
}
|
|
873
|
-
|
|
874
|
-
// ../../node_modules/date-fns/toDate.js
|
|
875
|
-
function toDate(argument, context) {
|
|
876
|
-
return constructFrom(context || argument, argument);
|
|
877
|
-
}
|
|
878
|
-
|
|
879
|
-
// ../../node_modules/date-fns/addMonths.js
|
|
880
|
-
function addMonths(date, amount, options) {
|
|
881
|
-
const _date = toDate(date, options?.in);
|
|
882
|
-
if (isNaN(amount))
|
|
883
|
-
return constructFrom(options?.in || date, NaN);
|
|
884
|
-
if (!amount) {
|
|
885
|
-
return _date;
|
|
886
|
-
}
|
|
887
|
-
const dayOfMonth = _date.getDate();
|
|
888
|
-
const endOfDesiredMonth = constructFrom(options?.in || date, _date.getTime());
|
|
889
|
-
endOfDesiredMonth.setMonth(_date.getMonth() + amount + 1, 0);
|
|
890
|
-
const daysInMonth = endOfDesiredMonth.getDate();
|
|
891
|
-
if (dayOfMonth >= daysInMonth) {
|
|
892
|
-
return endOfDesiredMonth;
|
|
893
|
-
} else {
|
|
894
|
-
_date.setFullYear(
|
|
895
|
-
endOfDesiredMonth.getFullYear(),
|
|
896
|
-
endOfDesiredMonth.getMonth(),
|
|
897
|
-
dayOfMonth
|
|
898
|
-
);
|
|
899
|
-
return _date;
|
|
900
|
-
}
|
|
901
|
-
}
|
|
902
|
-
|
|
903
|
-
// ../../node_modules/date-fns/_lib/defaultOptions.js
|
|
904
|
-
var defaultOptions = {};
|
|
905
|
-
function getDefaultOptions() {
|
|
906
|
-
return defaultOptions;
|
|
907
|
-
}
|
|
908
|
-
|
|
909
|
-
// ../../node_modules/date-fns/startOfWeek.js
|
|
910
|
-
function startOfWeek(date, options) {
|
|
911
|
-
const defaultOptions2 = getDefaultOptions();
|
|
912
|
-
const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
|
|
913
|
-
const _date = toDate(date, options?.in);
|
|
914
|
-
const day = _date.getDay();
|
|
915
|
-
const diff = (day < weekStartsOn ? 7 : 0) + day - weekStartsOn;
|
|
916
|
-
_date.setDate(_date.getDate() - diff);
|
|
917
|
-
_date.setHours(0, 0, 0, 0);
|
|
918
|
-
return _date;
|
|
919
|
-
}
|
|
920
|
-
|
|
921
|
-
// ../../node_modules/date-fns/startOfISOWeek.js
|
|
922
|
-
function startOfISOWeek(date, options) {
|
|
923
|
-
return startOfWeek(date, { ...options, weekStartsOn: 1 });
|
|
924
|
-
}
|
|
925
|
-
|
|
926
|
-
// ../../node_modules/date-fns/getISOWeekYear.js
|
|
927
|
-
function getISOWeekYear(date, options) {
|
|
928
|
-
const _date = toDate(date, options?.in);
|
|
929
|
-
const year = _date.getFullYear();
|
|
930
|
-
const fourthOfJanuaryOfNextYear = constructFrom(_date, 0);
|
|
931
|
-
fourthOfJanuaryOfNextYear.setFullYear(year + 1, 0, 4);
|
|
932
|
-
fourthOfJanuaryOfNextYear.setHours(0, 0, 0, 0);
|
|
933
|
-
const startOfNextYear = startOfISOWeek(fourthOfJanuaryOfNextYear);
|
|
934
|
-
const fourthOfJanuaryOfThisYear = constructFrom(_date, 0);
|
|
935
|
-
fourthOfJanuaryOfThisYear.setFullYear(year, 0, 4);
|
|
936
|
-
fourthOfJanuaryOfThisYear.setHours(0, 0, 0, 0);
|
|
937
|
-
const startOfThisYear = startOfISOWeek(fourthOfJanuaryOfThisYear);
|
|
938
|
-
if (_date.getTime() >= startOfNextYear.getTime()) {
|
|
939
|
-
return year + 1;
|
|
940
|
-
} else if (_date.getTime() >= startOfThisYear.getTime()) {
|
|
941
|
-
return year;
|
|
942
|
-
} else {
|
|
943
|
-
return year - 1;
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
// ../../node_modules/date-fns/_lib/getTimezoneOffsetInMilliseconds.js
|
|
948
|
-
function getTimezoneOffsetInMilliseconds(date) {
|
|
949
|
-
const _date = toDate(date);
|
|
950
|
-
const utcDate = new Date(
|
|
951
|
-
Date.UTC(
|
|
952
|
-
_date.getFullYear(),
|
|
953
|
-
_date.getMonth(),
|
|
954
|
-
_date.getDate(),
|
|
955
|
-
_date.getHours(),
|
|
956
|
-
_date.getMinutes(),
|
|
957
|
-
_date.getSeconds(),
|
|
958
|
-
_date.getMilliseconds()
|
|
959
|
-
)
|
|
960
|
-
);
|
|
961
|
-
utcDate.setUTCFullYear(_date.getFullYear());
|
|
962
|
-
return +date - +utcDate;
|
|
963
|
-
}
|
|
964
|
-
|
|
965
|
-
// ../../node_modules/date-fns/_lib/normalizeDates.js
|
|
966
|
-
function normalizeDates(context, ...dates) {
|
|
967
|
-
const normalize = constructFrom.bind(
|
|
968
|
-
null,
|
|
969
|
-
context || dates.find((date) => typeof date === "object")
|
|
970
|
-
);
|
|
971
|
-
return dates.map(normalize);
|
|
972
|
-
}
|
|
973
|
-
|
|
974
|
-
// ../../node_modules/date-fns/startOfDay.js
|
|
975
|
-
function startOfDay(date, options) {
|
|
976
|
-
const _date = toDate(date, options?.in);
|
|
977
|
-
_date.setHours(0, 0, 0, 0);
|
|
978
|
-
return _date;
|
|
979
|
-
}
|
|
980
|
-
|
|
981
|
-
// ../../node_modules/date-fns/differenceInCalendarDays.js
|
|
982
|
-
function differenceInCalendarDays(laterDate, earlierDate, options) {
|
|
983
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
984
|
-
options?.in,
|
|
985
|
-
laterDate,
|
|
986
|
-
earlierDate
|
|
987
|
-
);
|
|
988
|
-
const laterStartOfDay = startOfDay(laterDate_);
|
|
989
|
-
const earlierStartOfDay = startOfDay(earlierDate_);
|
|
990
|
-
const laterTimestamp = +laterStartOfDay - getTimezoneOffsetInMilliseconds(laterStartOfDay);
|
|
991
|
-
const earlierTimestamp = +earlierStartOfDay - getTimezoneOffsetInMilliseconds(earlierStartOfDay);
|
|
992
|
-
return Math.round((laterTimestamp - earlierTimestamp) / millisecondsInDay);
|
|
993
|
-
}
|
|
994
|
-
|
|
995
|
-
// ../../node_modules/date-fns/startOfISOWeekYear.js
|
|
996
|
-
function startOfISOWeekYear(date, options) {
|
|
997
|
-
const year = getISOWeekYear(date, options);
|
|
998
|
-
const fourthOfJanuary = constructFrom(options?.in || date, 0);
|
|
999
|
-
fourthOfJanuary.setFullYear(year, 0, 4);
|
|
1000
|
-
fourthOfJanuary.setHours(0, 0, 0, 0);
|
|
1001
|
-
return startOfISOWeek(fourthOfJanuary);
|
|
1002
|
-
}
|
|
1003
|
-
|
|
1004
|
-
// ../../node_modules/date-fns/constructNow.js
|
|
1005
|
-
function constructNow(date) {
|
|
1006
|
-
return constructFrom(date, Date.now());
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
// ../../node_modules/date-fns/isSameDay.js
|
|
1010
|
-
function isSameDay(laterDate, earlierDate, options) {
|
|
1011
|
-
const [dateLeft_, dateRight_] = normalizeDates(
|
|
1012
|
-
options?.in,
|
|
1013
|
-
laterDate,
|
|
1014
|
-
earlierDate
|
|
1015
|
-
);
|
|
1016
|
-
return +startOfDay(dateLeft_) === +startOfDay(dateRight_);
|
|
1017
|
-
}
|
|
1018
|
-
|
|
1019
|
-
// ../../node_modules/date-fns/isDate.js
|
|
1020
|
-
function isDate(value) {
|
|
1021
|
-
return value instanceof Date || typeof value === "object" && Object.prototype.toString.call(value) === "[object Date]";
|
|
1022
|
-
}
|
|
1023
|
-
|
|
1024
|
-
// ../../node_modules/date-fns/isValid.js
|
|
1025
|
-
function isValid(date) {
|
|
1026
|
-
return !(!isDate(date) && typeof date !== "number" || isNaN(+toDate(date)));
|
|
1027
|
-
}
|
|
1028
|
-
|
|
1029
|
-
// ../../node_modules/date-fns/endOfMonth.js
|
|
1030
|
-
function endOfMonth(date, options) {
|
|
1031
|
-
const _date = toDate(date, options?.in);
|
|
1032
|
-
const month = _date.getMonth();
|
|
1033
|
-
_date.setFullYear(_date.getFullYear(), month + 1, 0);
|
|
1034
|
-
_date.setHours(23, 59, 59, 999);
|
|
1035
|
-
return _date;
|
|
1036
|
-
}
|
|
1037
|
-
|
|
1038
|
-
// ../../node_modules/date-fns/_lib/normalizeInterval.js
|
|
1039
|
-
function normalizeInterval(context, interval) {
|
|
1040
|
-
const [start, end] = normalizeDates(context, interval.start, interval.end);
|
|
1041
|
-
return { start, end };
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
// ../../node_modules/date-fns/eachDayOfInterval.js
|
|
1045
|
-
function eachDayOfInterval(interval, options) {
|
|
1046
|
-
const { start, end } = normalizeInterval(options?.in, interval);
|
|
1047
|
-
let reversed = +start > +end;
|
|
1048
|
-
const endTime = reversed ? +start : +end;
|
|
1049
|
-
const date = reversed ? end : start;
|
|
1050
|
-
date.setHours(0, 0, 0, 0);
|
|
1051
|
-
let step = options?.step ?? 1;
|
|
1052
|
-
if (!step)
|
|
1053
|
-
return [];
|
|
1054
|
-
if (step < 0) {
|
|
1055
|
-
step = -step;
|
|
1056
|
-
reversed = !reversed;
|
|
1057
|
-
}
|
|
1058
|
-
const dates = [];
|
|
1059
|
-
while (+date <= endTime) {
|
|
1060
|
-
dates.push(constructFrom(start, date));
|
|
1061
|
-
date.setDate(date.getDate() + step);
|
|
1062
|
-
date.setHours(0, 0, 0, 0);
|
|
1063
|
-
}
|
|
1064
|
-
return reversed ? dates.reverse() : dates;
|
|
1065
|
-
}
|
|
1066
|
-
|
|
1067
|
-
// ../../node_modules/date-fns/startOfMonth.js
|
|
1068
|
-
function startOfMonth(date, options) {
|
|
1069
|
-
const _date = toDate(date, options?.in);
|
|
1070
|
-
_date.setDate(1);
|
|
1071
|
-
_date.setHours(0, 0, 0, 0);
|
|
1072
|
-
return _date;
|
|
1073
|
-
}
|
|
1074
|
-
|
|
1075
|
-
// ../../node_modules/date-fns/startOfYear.js
|
|
1076
|
-
function startOfYear(date, options) {
|
|
1077
|
-
const date_ = toDate(date, options?.in);
|
|
1078
|
-
date_.setFullYear(date_.getFullYear(), 0, 1);
|
|
1079
|
-
date_.setHours(0, 0, 0, 0);
|
|
1080
|
-
return date_;
|
|
1081
|
-
}
|
|
1082
|
-
|
|
1083
|
-
// ../../node_modules/date-fns/endOfWeek.js
|
|
1084
|
-
function endOfWeek(date, options) {
|
|
1085
|
-
const defaultOptions2 = getDefaultOptions();
|
|
1086
|
-
const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
|
|
1087
|
-
const _date = toDate(date, options?.in);
|
|
1088
|
-
const day = _date.getDay();
|
|
1089
|
-
const diff = (day < weekStartsOn ? -7 : 0) + 6 - (day - weekStartsOn);
|
|
1090
|
-
_date.setDate(_date.getDate() + diff);
|
|
1091
|
-
_date.setHours(23, 59, 59, 999);
|
|
1092
|
-
return _date;
|
|
1093
|
-
}
|
|
1094
|
-
|
|
1095
|
-
// ../../node_modules/date-fns/locale/en-US/_lib/formatDistance.js
|
|
1096
|
-
var formatDistanceLocale = {
|
|
1097
|
-
lessThanXSeconds: {
|
|
1098
|
-
one: "less than a second",
|
|
1099
|
-
other: "less than {{count}} seconds"
|
|
1100
|
-
},
|
|
1101
|
-
xSeconds: {
|
|
1102
|
-
one: "1 second",
|
|
1103
|
-
other: "{{count}} seconds"
|
|
1104
|
-
},
|
|
1105
|
-
halfAMinute: "half a minute",
|
|
1106
|
-
lessThanXMinutes: {
|
|
1107
|
-
one: "less than a minute",
|
|
1108
|
-
other: "less than {{count}} minutes"
|
|
1109
|
-
},
|
|
1110
|
-
xMinutes: {
|
|
1111
|
-
one: "1 minute",
|
|
1112
|
-
other: "{{count}} minutes"
|
|
1113
|
-
},
|
|
1114
|
-
aboutXHours: {
|
|
1115
|
-
one: "about 1 hour",
|
|
1116
|
-
other: "about {{count}} hours"
|
|
1117
|
-
},
|
|
1118
|
-
xHours: {
|
|
1119
|
-
one: "1 hour",
|
|
1120
|
-
other: "{{count}} hours"
|
|
1121
|
-
},
|
|
1122
|
-
xDays: {
|
|
1123
|
-
one: "1 day",
|
|
1124
|
-
other: "{{count}} days"
|
|
1125
|
-
},
|
|
1126
|
-
aboutXWeeks: {
|
|
1127
|
-
one: "about 1 week",
|
|
1128
|
-
other: "about {{count}} weeks"
|
|
1129
|
-
},
|
|
1130
|
-
xWeeks: {
|
|
1131
|
-
one: "1 week",
|
|
1132
|
-
other: "{{count}} weeks"
|
|
1133
|
-
},
|
|
1134
|
-
aboutXMonths: {
|
|
1135
|
-
one: "about 1 month",
|
|
1136
|
-
other: "about {{count}} months"
|
|
1137
|
-
},
|
|
1138
|
-
xMonths: {
|
|
1139
|
-
one: "1 month",
|
|
1140
|
-
other: "{{count}} months"
|
|
1141
|
-
},
|
|
1142
|
-
aboutXYears: {
|
|
1143
|
-
one: "about 1 year",
|
|
1144
|
-
other: "about {{count}} years"
|
|
1145
|
-
},
|
|
1146
|
-
xYears: {
|
|
1147
|
-
one: "1 year",
|
|
1148
|
-
other: "{{count}} years"
|
|
1149
|
-
},
|
|
1150
|
-
overXYears: {
|
|
1151
|
-
one: "over 1 year",
|
|
1152
|
-
other: "over {{count}} years"
|
|
1153
|
-
},
|
|
1154
|
-
almostXYears: {
|
|
1155
|
-
one: "almost 1 year",
|
|
1156
|
-
other: "almost {{count}} years"
|
|
1157
|
-
}
|
|
1158
|
-
};
|
|
1159
|
-
var formatDistance = (token, count3, options) => {
|
|
1160
|
-
let result;
|
|
1161
|
-
const tokenValue = formatDistanceLocale[token];
|
|
1162
|
-
if (typeof tokenValue === "string") {
|
|
1163
|
-
result = tokenValue;
|
|
1164
|
-
} else if (count3 === 1) {
|
|
1165
|
-
result = tokenValue.one;
|
|
1166
|
-
} else {
|
|
1167
|
-
result = tokenValue.other.replace("{{count}}", count3.toString());
|
|
1168
|
-
}
|
|
1169
|
-
if (options?.addSuffix) {
|
|
1170
|
-
if (options.comparison && options.comparison > 0) {
|
|
1171
|
-
return "in " + result;
|
|
1172
|
-
} else {
|
|
1173
|
-
return result + " ago";
|
|
1174
|
-
}
|
|
1175
|
-
}
|
|
1176
|
-
return result;
|
|
1177
|
-
};
|
|
1178
|
-
|
|
1179
|
-
// ../../node_modules/date-fns/locale/_lib/buildFormatLongFn.js
|
|
1180
|
-
function buildFormatLongFn(args) {
|
|
1181
|
-
return (options = {}) => {
|
|
1182
|
-
const width = options.width ? String(options.width) : args.defaultWidth;
|
|
1183
|
-
const format2 = args.formats[width] || args.formats[args.defaultWidth];
|
|
1184
|
-
return format2;
|
|
1185
|
-
};
|
|
1186
|
-
}
|
|
1187
|
-
|
|
1188
|
-
// ../../node_modules/date-fns/locale/en-US/_lib/formatLong.js
|
|
1189
|
-
var dateFormats = {
|
|
1190
|
-
full: "EEEE, MMMM do, y",
|
|
1191
|
-
long: "MMMM do, y",
|
|
1192
|
-
medium: "MMM d, y",
|
|
1193
|
-
short: "MM/dd/yyyy"
|
|
1194
|
-
};
|
|
1195
|
-
var timeFormats = {
|
|
1196
|
-
full: "h:mm:ss a zzzz",
|
|
1197
|
-
long: "h:mm:ss a z",
|
|
1198
|
-
medium: "h:mm:ss a",
|
|
1199
|
-
short: "h:mm a"
|
|
1200
|
-
};
|
|
1201
|
-
var dateTimeFormats = {
|
|
1202
|
-
full: "{{date}} 'at' {{time}}",
|
|
1203
|
-
long: "{{date}} 'at' {{time}}",
|
|
1204
|
-
medium: "{{date}}, {{time}}",
|
|
1205
|
-
short: "{{date}}, {{time}}"
|
|
1206
|
-
};
|
|
1207
|
-
var formatLong = {
|
|
1208
|
-
date: buildFormatLongFn({
|
|
1209
|
-
formats: dateFormats,
|
|
1210
|
-
defaultWidth: "full"
|
|
1211
|
-
}),
|
|
1212
|
-
time: buildFormatLongFn({
|
|
1213
|
-
formats: timeFormats,
|
|
1214
|
-
defaultWidth: "full"
|
|
1215
|
-
}),
|
|
1216
|
-
dateTime: buildFormatLongFn({
|
|
1217
|
-
formats: dateTimeFormats,
|
|
1218
|
-
defaultWidth: "full"
|
|
1219
|
-
})
|
|
1220
|
-
};
|
|
1221
|
-
|
|
1222
|
-
// ../../node_modules/date-fns/locale/en-US/_lib/formatRelative.js
|
|
1223
|
-
var formatRelativeLocale = {
|
|
1224
|
-
lastWeek: "'last' eeee 'at' p",
|
|
1225
|
-
yesterday: "'yesterday at' p",
|
|
1226
|
-
today: "'today at' p",
|
|
1227
|
-
tomorrow: "'tomorrow at' p",
|
|
1228
|
-
nextWeek: "eeee 'at' p",
|
|
1229
|
-
other: "P"
|
|
1230
|
-
};
|
|
1231
|
-
var formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];
|
|
1232
|
-
|
|
1233
|
-
// ../../node_modules/date-fns/locale/_lib/buildLocalizeFn.js
|
|
1234
|
-
function buildLocalizeFn(args) {
|
|
1235
|
-
return (value, options) => {
|
|
1236
|
-
const context = options?.context ? String(options.context) : "standalone";
|
|
1237
|
-
let valuesArray;
|
|
1238
|
-
if (context === "formatting" && args.formattingValues) {
|
|
1239
|
-
const defaultWidth = args.defaultFormattingWidth || args.defaultWidth;
|
|
1240
|
-
const width = options?.width ? String(options.width) : defaultWidth;
|
|
1241
|
-
valuesArray = args.formattingValues[width] || args.formattingValues[defaultWidth];
|
|
1242
|
-
} else {
|
|
1243
|
-
const defaultWidth = args.defaultWidth;
|
|
1244
|
-
const width = options?.width ? String(options.width) : args.defaultWidth;
|
|
1245
|
-
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
1246
|
-
}
|
|
1247
|
-
const index = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
1248
|
-
return valuesArray[index];
|
|
1249
|
-
};
|
|
1250
|
-
}
|
|
1251
|
-
|
|
1252
|
-
// ../../node_modules/date-fns/locale/en-US/_lib/localize.js
|
|
1253
|
-
var eraValues = {
|
|
1254
|
-
narrow: ["B", "A"],
|
|
1255
|
-
abbreviated: ["BC", "AD"],
|
|
1256
|
-
wide: ["Before Christ", "Anno Domini"]
|
|
1257
|
-
};
|
|
1258
|
-
var quarterValues = {
|
|
1259
|
-
narrow: ["1", "2", "3", "4"],
|
|
1260
|
-
abbreviated: ["Q1", "Q2", "Q3", "Q4"],
|
|
1261
|
-
wide: ["1st quarter", "2nd quarter", "3rd quarter", "4th quarter"]
|
|
1262
|
-
};
|
|
1263
|
-
var monthValues = {
|
|
1264
|
-
narrow: ["J", "F", "M", "A", "M", "J", "J", "A", "S", "O", "N", "D"],
|
|
1265
|
-
abbreviated: [
|
|
1266
|
-
"Jan",
|
|
1267
|
-
"Feb",
|
|
1268
|
-
"Mar",
|
|
1269
|
-
"Apr",
|
|
1270
|
-
"May",
|
|
1271
|
-
"Jun",
|
|
1272
|
-
"Jul",
|
|
1273
|
-
"Aug",
|
|
1274
|
-
"Sep",
|
|
1275
|
-
"Oct",
|
|
1276
|
-
"Nov",
|
|
1277
|
-
"Dec"
|
|
1278
|
-
],
|
|
1279
|
-
wide: [
|
|
1280
|
-
"January",
|
|
1281
|
-
"February",
|
|
1282
|
-
"March",
|
|
1283
|
-
"April",
|
|
1284
|
-
"May",
|
|
1285
|
-
"June",
|
|
1286
|
-
"July",
|
|
1287
|
-
"August",
|
|
1288
|
-
"September",
|
|
1289
|
-
"October",
|
|
1290
|
-
"November",
|
|
1291
|
-
"December"
|
|
1292
|
-
]
|
|
1293
|
-
};
|
|
1294
|
-
var dayValues = {
|
|
1295
|
-
narrow: ["S", "M", "T", "W", "T", "F", "S"],
|
|
1296
|
-
short: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
|
|
1297
|
-
abbreviated: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
1298
|
-
wide: [
|
|
1299
|
-
"Sunday",
|
|
1300
|
-
"Monday",
|
|
1301
|
-
"Tuesday",
|
|
1302
|
-
"Wednesday",
|
|
1303
|
-
"Thursday",
|
|
1304
|
-
"Friday",
|
|
1305
|
-
"Saturday"
|
|
1306
|
-
]
|
|
1307
|
-
};
|
|
1308
|
-
var dayPeriodValues = {
|
|
1309
|
-
narrow: {
|
|
1310
|
-
am: "a",
|
|
1311
|
-
pm: "p",
|
|
1312
|
-
midnight: "mi",
|
|
1313
|
-
noon: "n",
|
|
1314
|
-
morning: "morning",
|
|
1315
|
-
afternoon: "afternoon",
|
|
1316
|
-
evening: "evening",
|
|
1317
|
-
night: "night"
|
|
1318
|
-
},
|
|
1319
|
-
abbreviated: {
|
|
1320
|
-
am: "AM",
|
|
1321
|
-
pm: "PM",
|
|
1322
|
-
midnight: "midnight",
|
|
1323
|
-
noon: "noon",
|
|
1324
|
-
morning: "morning",
|
|
1325
|
-
afternoon: "afternoon",
|
|
1326
|
-
evening: "evening",
|
|
1327
|
-
night: "night"
|
|
1328
|
-
},
|
|
1329
|
-
wide: {
|
|
1330
|
-
am: "a.m.",
|
|
1331
|
-
pm: "p.m.",
|
|
1332
|
-
midnight: "midnight",
|
|
1333
|
-
noon: "noon",
|
|
1334
|
-
morning: "morning",
|
|
1335
|
-
afternoon: "afternoon",
|
|
1336
|
-
evening: "evening",
|
|
1337
|
-
night: "night"
|
|
1338
|
-
}
|
|
1339
|
-
};
|
|
1340
|
-
var formattingDayPeriodValues = {
|
|
1341
|
-
narrow: {
|
|
1342
|
-
am: "a",
|
|
1343
|
-
pm: "p",
|
|
1344
|
-
midnight: "mi",
|
|
1345
|
-
noon: "n",
|
|
1346
|
-
morning: "in the morning",
|
|
1347
|
-
afternoon: "in the afternoon",
|
|
1348
|
-
evening: "in the evening",
|
|
1349
|
-
night: "at night"
|
|
1350
|
-
},
|
|
1351
|
-
abbreviated: {
|
|
1352
|
-
am: "AM",
|
|
1353
|
-
pm: "PM",
|
|
1354
|
-
midnight: "midnight",
|
|
1355
|
-
noon: "noon",
|
|
1356
|
-
morning: "in the morning",
|
|
1357
|
-
afternoon: "in the afternoon",
|
|
1358
|
-
evening: "in the evening",
|
|
1359
|
-
night: "at night"
|
|
1360
|
-
},
|
|
1361
|
-
wide: {
|
|
1362
|
-
am: "a.m.",
|
|
1363
|
-
pm: "p.m.",
|
|
1364
|
-
midnight: "midnight",
|
|
1365
|
-
noon: "noon",
|
|
1366
|
-
morning: "in the morning",
|
|
1367
|
-
afternoon: "in the afternoon",
|
|
1368
|
-
evening: "in the evening",
|
|
1369
|
-
night: "at night"
|
|
1370
|
-
}
|
|
1371
|
-
};
|
|
1372
|
-
var ordinalNumber = (dirtyNumber, _options) => {
|
|
1373
|
-
const number = Number(dirtyNumber);
|
|
1374
|
-
const rem100 = number % 100;
|
|
1375
|
-
if (rem100 > 20 || rem100 < 10) {
|
|
1376
|
-
switch (rem100 % 10) {
|
|
1377
|
-
case 1:
|
|
1378
|
-
return number + "st";
|
|
1379
|
-
case 2:
|
|
1380
|
-
return number + "nd";
|
|
1381
|
-
case 3:
|
|
1382
|
-
return number + "rd";
|
|
1383
|
-
}
|
|
1384
|
-
}
|
|
1385
|
-
return number + "th";
|
|
1386
|
-
};
|
|
1387
|
-
var localize = {
|
|
1388
|
-
ordinalNumber,
|
|
1389
|
-
era: buildLocalizeFn({
|
|
1390
|
-
values: eraValues,
|
|
1391
|
-
defaultWidth: "wide"
|
|
1392
|
-
}),
|
|
1393
|
-
quarter: buildLocalizeFn({
|
|
1394
|
-
values: quarterValues,
|
|
1395
|
-
defaultWidth: "wide",
|
|
1396
|
-
argumentCallback: (quarter) => quarter - 1
|
|
1397
|
-
}),
|
|
1398
|
-
month: buildLocalizeFn({
|
|
1399
|
-
values: monthValues,
|
|
1400
|
-
defaultWidth: "wide"
|
|
1401
|
-
}),
|
|
1402
|
-
day: buildLocalizeFn({
|
|
1403
|
-
values: dayValues,
|
|
1404
|
-
defaultWidth: "wide"
|
|
1405
|
-
}),
|
|
1406
|
-
dayPeriod: buildLocalizeFn({
|
|
1407
|
-
values: dayPeriodValues,
|
|
1408
|
-
defaultWidth: "wide",
|
|
1409
|
-
formattingValues: formattingDayPeriodValues,
|
|
1410
|
-
defaultFormattingWidth: "wide"
|
|
1411
|
-
})
|
|
1412
|
-
};
|
|
1413
|
-
|
|
1414
|
-
// ../../node_modules/date-fns/locale/_lib/buildMatchFn.js
|
|
1415
|
-
function buildMatchFn(args) {
|
|
1416
|
-
return (string, options = {}) => {
|
|
1417
|
-
const width = options.width;
|
|
1418
|
-
const matchPattern = width && args.matchPatterns[width] || args.matchPatterns[args.defaultMatchWidth];
|
|
1419
|
-
const matchResult = string.match(matchPattern);
|
|
1420
|
-
if (!matchResult) {
|
|
1421
|
-
return null;
|
|
1422
|
-
}
|
|
1423
|
-
const matchedString = matchResult[0];
|
|
1424
|
-
const parsePatterns = width && args.parsePatterns[width] || args.parsePatterns[args.defaultParseWidth];
|
|
1425
|
-
const key = Array.isArray(parsePatterns) ? findIndex(parsePatterns, (pattern) => pattern.test(matchedString)) : (
|
|
1426
|
-
// [TODO] -- I challenge you to fix the type
|
|
1427
|
-
findKey(parsePatterns, (pattern) => pattern.test(matchedString))
|
|
1428
|
-
);
|
|
1429
|
-
let value;
|
|
1430
|
-
value = args.valueCallback ? args.valueCallback(key) : key;
|
|
1431
|
-
value = options.valueCallback ? (
|
|
1432
|
-
// [TODO] -- I challenge you to fix the type
|
|
1433
|
-
options.valueCallback(value)
|
|
1434
|
-
) : value;
|
|
1435
|
-
const rest = string.slice(matchedString.length);
|
|
1436
|
-
return { value, rest };
|
|
1437
|
-
};
|
|
1438
|
-
}
|
|
1439
|
-
function findKey(object, predicate) {
|
|
1440
|
-
for (const key in object) {
|
|
1441
|
-
if (Object.prototype.hasOwnProperty.call(object, key) && predicate(object[key])) {
|
|
1442
|
-
return key;
|
|
1443
|
-
}
|
|
1444
|
-
}
|
|
1445
|
-
return void 0;
|
|
1446
|
-
}
|
|
1447
|
-
function findIndex(array, predicate) {
|
|
1448
|
-
for (let key = 0; key < array.length; key++) {
|
|
1449
|
-
if (predicate(array[key])) {
|
|
1450
|
-
return key;
|
|
1451
|
-
}
|
|
1452
|
-
}
|
|
1453
|
-
return void 0;
|
|
1454
|
-
}
|
|
1455
|
-
|
|
1456
|
-
// ../../node_modules/date-fns/locale/_lib/buildMatchPatternFn.js
|
|
1457
|
-
function buildMatchPatternFn(args) {
|
|
1458
|
-
return (string, options = {}) => {
|
|
1459
|
-
const matchResult = string.match(args.matchPattern);
|
|
1460
|
-
if (!matchResult)
|
|
1461
|
-
return null;
|
|
1462
|
-
const matchedString = matchResult[0];
|
|
1463
|
-
const parseResult = string.match(args.parsePattern);
|
|
1464
|
-
if (!parseResult)
|
|
1465
|
-
return null;
|
|
1466
|
-
let value = args.valueCallback ? args.valueCallback(parseResult[0]) : parseResult[0];
|
|
1467
|
-
value = options.valueCallback ? options.valueCallback(value) : value;
|
|
1468
|
-
const rest = string.slice(matchedString.length);
|
|
1469
|
-
return { value, rest };
|
|
1470
|
-
};
|
|
1471
|
-
}
|
|
1472
|
-
|
|
1473
|
-
// ../../node_modules/date-fns/locale/en-US/_lib/match.js
|
|
1474
|
-
var matchOrdinalNumberPattern = /^(\d+)(th|st|nd|rd)?/i;
|
|
1475
|
-
var parseOrdinalNumberPattern = /\d+/i;
|
|
1476
|
-
var matchEraPatterns = {
|
|
1477
|
-
narrow: /^(b|a)/i,
|
|
1478
|
-
abbreviated: /^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,
|
|
1479
|
-
wide: /^(before christ|before common era|anno domini|common era)/i
|
|
1480
|
-
};
|
|
1481
|
-
var parseEraPatterns = {
|
|
1482
|
-
any: [/^b/i, /^(a|c)/i]
|
|
1483
|
-
};
|
|
1484
|
-
var matchQuarterPatterns = {
|
|
1485
|
-
narrow: /^[1234]/i,
|
|
1486
|
-
abbreviated: /^q[1234]/i,
|
|
1487
|
-
wide: /^[1234](th|st|nd|rd)? quarter/i
|
|
1488
|
-
};
|
|
1489
|
-
var parseQuarterPatterns = {
|
|
1490
|
-
any: [/1/i, /2/i, /3/i, /4/i]
|
|
1491
|
-
};
|
|
1492
|
-
var matchMonthPatterns = {
|
|
1493
|
-
narrow: /^[jfmasond]/i,
|
|
1494
|
-
abbreviated: /^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,
|
|
1495
|
-
wide: /^(january|february|march|april|may|june|july|august|september|october|november|december)/i
|
|
1496
|
-
};
|
|
1497
|
-
var parseMonthPatterns = {
|
|
1498
|
-
narrow: [
|
|
1499
|
-
/^j/i,
|
|
1500
|
-
/^f/i,
|
|
1501
|
-
/^m/i,
|
|
1502
|
-
/^a/i,
|
|
1503
|
-
/^m/i,
|
|
1504
|
-
/^j/i,
|
|
1505
|
-
/^j/i,
|
|
1506
|
-
/^a/i,
|
|
1507
|
-
/^s/i,
|
|
1508
|
-
/^o/i,
|
|
1509
|
-
/^n/i,
|
|
1510
|
-
/^d/i
|
|
1511
|
-
],
|
|
1512
|
-
any: [
|
|
1513
|
-
/^ja/i,
|
|
1514
|
-
/^f/i,
|
|
1515
|
-
/^mar/i,
|
|
1516
|
-
/^ap/i,
|
|
1517
|
-
/^may/i,
|
|
1518
|
-
/^jun/i,
|
|
1519
|
-
/^jul/i,
|
|
1520
|
-
/^au/i,
|
|
1521
|
-
/^s/i,
|
|
1522
|
-
/^o/i,
|
|
1523
|
-
/^n/i,
|
|
1524
|
-
/^d/i
|
|
1525
|
-
]
|
|
1526
|
-
};
|
|
1527
|
-
var matchDayPatterns = {
|
|
1528
|
-
narrow: /^[smtwf]/i,
|
|
1529
|
-
short: /^(su|mo|tu|we|th|fr|sa)/i,
|
|
1530
|
-
abbreviated: /^(sun|mon|tue|wed|thu|fri|sat)/i,
|
|
1531
|
-
wide: /^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i
|
|
1532
|
-
};
|
|
1533
|
-
var parseDayPatterns = {
|
|
1534
|
-
narrow: [/^s/i, /^m/i, /^t/i, /^w/i, /^t/i, /^f/i, /^s/i],
|
|
1535
|
-
any: [/^su/i, /^m/i, /^tu/i, /^w/i, /^th/i, /^f/i, /^sa/i]
|
|
1536
|
-
};
|
|
1537
|
-
var matchDayPeriodPatterns = {
|
|
1538
|
-
narrow: /^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,
|
|
1539
|
-
any: /^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i
|
|
1540
|
-
};
|
|
1541
|
-
var parseDayPeriodPatterns = {
|
|
1542
|
-
any: {
|
|
1543
|
-
am: /^a/i,
|
|
1544
|
-
pm: /^p/i,
|
|
1545
|
-
midnight: /^mi/i,
|
|
1546
|
-
noon: /^no/i,
|
|
1547
|
-
morning: /morning/i,
|
|
1548
|
-
afternoon: /afternoon/i,
|
|
1549
|
-
evening: /evening/i,
|
|
1550
|
-
night: /night/i
|
|
1551
|
-
}
|
|
1552
|
-
};
|
|
1553
|
-
var match = {
|
|
1554
|
-
ordinalNumber: buildMatchPatternFn({
|
|
1555
|
-
matchPattern: matchOrdinalNumberPattern,
|
|
1556
|
-
parsePattern: parseOrdinalNumberPattern,
|
|
1557
|
-
valueCallback: (value) => parseInt(value, 10)
|
|
1558
|
-
}),
|
|
1559
|
-
era: buildMatchFn({
|
|
1560
|
-
matchPatterns: matchEraPatterns,
|
|
1561
|
-
defaultMatchWidth: "wide",
|
|
1562
|
-
parsePatterns: parseEraPatterns,
|
|
1563
|
-
defaultParseWidth: "any"
|
|
1564
|
-
}),
|
|
1565
|
-
quarter: buildMatchFn({
|
|
1566
|
-
matchPatterns: matchQuarterPatterns,
|
|
1567
|
-
defaultMatchWidth: "wide",
|
|
1568
|
-
parsePatterns: parseQuarterPatterns,
|
|
1569
|
-
defaultParseWidth: "any",
|
|
1570
|
-
valueCallback: (index) => index + 1
|
|
1571
|
-
}),
|
|
1572
|
-
month: buildMatchFn({
|
|
1573
|
-
matchPatterns: matchMonthPatterns,
|
|
1574
|
-
defaultMatchWidth: "wide",
|
|
1575
|
-
parsePatterns: parseMonthPatterns,
|
|
1576
|
-
defaultParseWidth: "any"
|
|
1577
|
-
}),
|
|
1578
|
-
day: buildMatchFn({
|
|
1579
|
-
matchPatterns: matchDayPatterns,
|
|
1580
|
-
defaultMatchWidth: "wide",
|
|
1581
|
-
parsePatterns: parseDayPatterns,
|
|
1582
|
-
defaultParseWidth: "any"
|
|
1583
|
-
}),
|
|
1584
|
-
dayPeriod: buildMatchFn({
|
|
1585
|
-
matchPatterns: matchDayPeriodPatterns,
|
|
1586
|
-
defaultMatchWidth: "any",
|
|
1587
|
-
parsePatterns: parseDayPeriodPatterns,
|
|
1588
|
-
defaultParseWidth: "any"
|
|
1589
|
-
})
|
|
1590
|
-
};
|
|
1591
|
-
|
|
1592
|
-
// ../../node_modules/date-fns/locale/en-US.js
|
|
1593
|
-
var enUS = {
|
|
1594
|
-
code: "en-US",
|
|
1595
|
-
formatDistance,
|
|
1596
|
-
formatLong,
|
|
1597
|
-
formatRelative,
|
|
1598
|
-
localize,
|
|
1599
|
-
match,
|
|
1600
|
-
options: {
|
|
1601
|
-
weekStartsOn: 0,
|
|
1602
|
-
firstWeekContainsDate: 1
|
|
1603
|
-
}
|
|
1604
|
-
};
|
|
1605
|
-
|
|
1606
|
-
// ../../node_modules/date-fns/getDayOfYear.js
|
|
1607
|
-
function getDayOfYear(date, options) {
|
|
1608
|
-
const _date = toDate(date, options?.in);
|
|
1609
|
-
const diff = differenceInCalendarDays(_date, startOfYear(_date));
|
|
1610
|
-
const dayOfYear = diff + 1;
|
|
1611
|
-
return dayOfYear;
|
|
1612
|
-
}
|
|
1613
|
-
|
|
1614
|
-
// ../../node_modules/date-fns/getISOWeek.js
|
|
1615
|
-
function getISOWeek(date, options) {
|
|
1616
|
-
const _date = toDate(date, options?.in);
|
|
1617
|
-
const diff = +startOfISOWeek(_date) - +startOfISOWeekYear(_date);
|
|
1618
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
1619
|
-
}
|
|
1620
|
-
|
|
1621
|
-
// ../../node_modules/date-fns/getWeekYear.js
|
|
1622
|
-
function getWeekYear(date, options) {
|
|
1623
|
-
const _date = toDate(date, options?.in);
|
|
1624
|
-
const year = _date.getFullYear();
|
|
1625
|
-
const defaultOptions2 = getDefaultOptions();
|
|
1626
|
-
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
1627
|
-
const firstWeekOfNextYear = constructFrom(options?.in || date, 0);
|
|
1628
|
-
firstWeekOfNextYear.setFullYear(year + 1, 0, firstWeekContainsDate);
|
|
1629
|
-
firstWeekOfNextYear.setHours(0, 0, 0, 0);
|
|
1630
|
-
const startOfNextYear = startOfWeek(firstWeekOfNextYear, options);
|
|
1631
|
-
const firstWeekOfThisYear = constructFrom(options?.in || date, 0);
|
|
1632
|
-
firstWeekOfThisYear.setFullYear(year, 0, firstWeekContainsDate);
|
|
1633
|
-
firstWeekOfThisYear.setHours(0, 0, 0, 0);
|
|
1634
|
-
const startOfThisYear = startOfWeek(firstWeekOfThisYear, options);
|
|
1635
|
-
if (+_date >= +startOfNextYear) {
|
|
1636
|
-
return year + 1;
|
|
1637
|
-
} else if (+_date >= +startOfThisYear) {
|
|
1638
|
-
return year;
|
|
1639
|
-
} else {
|
|
1640
|
-
return year - 1;
|
|
1641
|
-
}
|
|
1642
|
-
}
|
|
1643
|
-
|
|
1644
|
-
// ../../node_modules/date-fns/startOfWeekYear.js
|
|
1645
|
-
function startOfWeekYear(date, options) {
|
|
1646
|
-
const defaultOptions2 = getDefaultOptions();
|
|
1647
|
-
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
1648
|
-
const year = getWeekYear(date, options);
|
|
1649
|
-
const firstWeek = constructFrom(options?.in || date, 0);
|
|
1650
|
-
firstWeek.setFullYear(year, 0, firstWeekContainsDate);
|
|
1651
|
-
firstWeek.setHours(0, 0, 0, 0);
|
|
1652
|
-
const _date = startOfWeek(firstWeek, options);
|
|
1653
|
-
return _date;
|
|
1654
|
-
}
|
|
1655
|
-
|
|
1656
|
-
// ../../node_modules/date-fns/getWeek.js
|
|
1657
|
-
function getWeek(date, options) {
|
|
1658
|
-
const _date = toDate(date, options?.in);
|
|
1659
|
-
const diff = +startOfWeek(_date, options) - +startOfWeekYear(_date, options);
|
|
1660
|
-
return Math.round(diff / millisecondsInWeek) + 1;
|
|
1661
|
-
}
|
|
1662
|
-
|
|
1663
|
-
// ../../node_modules/date-fns/_lib/addLeadingZeros.js
|
|
1664
|
-
function addLeadingZeros(number, targetLength) {
|
|
1665
|
-
const sign = number < 0 ? "-" : "";
|
|
1666
|
-
const output = Math.abs(number).toString().padStart(targetLength, "0");
|
|
1667
|
-
return sign + output;
|
|
1668
|
-
}
|
|
1669
|
-
|
|
1670
|
-
// ../../node_modules/date-fns/_lib/format/lightFormatters.js
|
|
1671
|
-
var lightFormatters = {
|
|
1672
|
-
// Year
|
|
1673
|
-
y(date, token) {
|
|
1674
|
-
const signedYear = date.getFullYear();
|
|
1675
|
-
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
1676
|
-
return addLeadingZeros(token === "yy" ? year % 100 : year, token.length);
|
|
1677
|
-
},
|
|
1678
|
-
// Month
|
|
1679
|
-
M(date, token) {
|
|
1680
|
-
const month = date.getMonth();
|
|
1681
|
-
return token === "M" ? String(month + 1) : addLeadingZeros(month + 1, 2);
|
|
1682
|
-
},
|
|
1683
|
-
// Day of the month
|
|
1684
|
-
d(date, token) {
|
|
1685
|
-
return addLeadingZeros(date.getDate(), token.length);
|
|
1686
|
-
},
|
|
1687
|
-
// AM or PM
|
|
1688
|
-
a(date, token) {
|
|
1689
|
-
const dayPeriodEnumValue = date.getHours() / 12 >= 1 ? "pm" : "am";
|
|
1690
|
-
switch (token) {
|
|
1691
|
-
case "a":
|
|
1692
|
-
case "aa":
|
|
1693
|
-
return dayPeriodEnumValue.toUpperCase();
|
|
1694
|
-
case "aaa":
|
|
1695
|
-
return dayPeriodEnumValue;
|
|
1696
|
-
case "aaaaa":
|
|
1697
|
-
return dayPeriodEnumValue[0];
|
|
1698
|
-
case "aaaa":
|
|
1699
|
-
default:
|
|
1700
|
-
return dayPeriodEnumValue === "am" ? "a.m." : "p.m.";
|
|
1701
|
-
}
|
|
1702
|
-
},
|
|
1703
|
-
// Hour [1-12]
|
|
1704
|
-
h(date, token) {
|
|
1705
|
-
return addLeadingZeros(date.getHours() % 12 || 12, token.length);
|
|
1706
|
-
},
|
|
1707
|
-
// Hour [0-23]
|
|
1708
|
-
H(date, token) {
|
|
1709
|
-
return addLeadingZeros(date.getHours(), token.length);
|
|
1710
|
-
},
|
|
1711
|
-
// Minute
|
|
1712
|
-
m(date, token) {
|
|
1713
|
-
return addLeadingZeros(date.getMinutes(), token.length);
|
|
1714
|
-
},
|
|
1715
|
-
// Second
|
|
1716
|
-
s(date, token) {
|
|
1717
|
-
return addLeadingZeros(date.getSeconds(), token.length);
|
|
1718
|
-
},
|
|
1719
|
-
// Fraction of second
|
|
1720
|
-
S(date, token) {
|
|
1721
|
-
const numberOfDigits = token.length;
|
|
1722
|
-
const milliseconds = date.getMilliseconds();
|
|
1723
|
-
const fractionalSeconds = Math.trunc(
|
|
1724
|
-
milliseconds * Math.pow(10, numberOfDigits - 3)
|
|
1725
|
-
);
|
|
1726
|
-
return addLeadingZeros(fractionalSeconds, token.length);
|
|
1727
|
-
}
|
|
1728
|
-
};
|
|
1729
|
-
|
|
1730
|
-
// ../../node_modules/date-fns/_lib/format/formatters.js
|
|
1731
|
-
var dayPeriodEnum = {
|
|
1732
|
-
am: "am",
|
|
1733
|
-
pm: "pm",
|
|
1734
|
-
midnight: "midnight",
|
|
1735
|
-
noon: "noon",
|
|
1736
|
-
morning: "morning",
|
|
1737
|
-
afternoon: "afternoon",
|
|
1738
|
-
evening: "evening",
|
|
1739
|
-
night: "night"
|
|
1740
|
-
};
|
|
1741
|
-
var formatters = {
|
|
1742
|
-
// Era
|
|
1743
|
-
G: function(date, token, localize2) {
|
|
1744
|
-
const era = date.getFullYear() > 0 ? 1 : 0;
|
|
1745
|
-
switch (token) {
|
|
1746
|
-
case "G":
|
|
1747
|
-
case "GG":
|
|
1748
|
-
case "GGG":
|
|
1749
|
-
return localize2.era(era, { width: "abbreviated" });
|
|
1750
|
-
case "GGGGG":
|
|
1751
|
-
return localize2.era(era, { width: "narrow" });
|
|
1752
|
-
case "GGGG":
|
|
1753
|
-
default:
|
|
1754
|
-
return localize2.era(era, { width: "wide" });
|
|
1755
|
-
}
|
|
1756
|
-
},
|
|
1757
|
-
// Year
|
|
1758
|
-
y: function(date, token, localize2) {
|
|
1759
|
-
if (token === "yo") {
|
|
1760
|
-
const signedYear = date.getFullYear();
|
|
1761
|
-
const year = signedYear > 0 ? signedYear : 1 - signedYear;
|
|
1762
|
-
return localize2.ordinalNumber(year, { unit: "year" });
|
|
1763
|
-
}
|
|
1764
|
-
return lightFormatters.y(date, token);
|
|
1765
|
-
},
|
|
1766
|
-
// Local week-numbering year
|
|
1767
|
-
Y: function(date, token, localize2, options) {
|
|
1768
|
-
const signedWeekYear = getWeekYear(date, options);
|
|
1769
|
-
const weekYear = signedWeekYear > 0 ? signedWeekYear : 1 - signedWeekYear;
|
|
1770
|
-
if (token === "YY") {
|
|
1771
|
-
const twoDigitYear = weekYear % 100;
|
|
1772
|
-
return addLeadingZeros(twoDigitYear, 2);
|
|
1773
|
-
}
|
|
1774
|
-
if (token === "Yo") {
|
|
1775
|
-
return localize2.ordinalNumber(weekYear, { unit: "year" });
|
|
1776
|
-
}
|
|
1777
|
-
return addLeadingZeros(weekYear, token.length);
|
|
1778
|
-
},
|
|
1779
|
-
// ISO week-numbering year
|
|
1780
|
-
R: function(date, token) {
|
|
1781
|
-
const isoWeekYear = getISOWeekYear(date);
|
|
1782
|
-
return addLeadingZeros(isoWeekYear, token.length);
|
|
1783
|
-
},
|
|
1784
|
-
// Extended year. This is a single number designating the year of this calendar system.
|
|
1785
|
-
// The main difference between `y` and `u` localizers are B.C. years:
|
|
1786
|
-
// | Year | `y` | `u` |
|
|
1787
|
-
// |------|-----|-----|
|
|
1788
|
-
// | AC 1 | 1 | 1 |
|
|
1789
|
-
// | BC 1 | 1 | 0 |
|
|
1790
|
-
// | BC 2 | 2 | -1 |
|
|
1791
|
-
// Also `yy` always returns the last two digits of a year,
|
|
1792
|
-
// while `uu` pads single digit years to 2 characters and returns other years unchanged.
|
|
1793
|
-
u: function(date, token) {
|
|
1794
|
-
const year = date.getFullYear();
|
|
1795
|
-
return addLeadingZeros(year, token.length);
|
|
1796
|
-
},
|
|
1797
|
-
// Quarter
|
|
1798
|
-
Q: function(date, token, localize2) {
|
|
1799
|
-
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
1800
|
-
switch (token) {
|
|
1801
|
-
case "Q":
|
|
1802
|
-
return String(quarter);
|
|
1803
|
-
case "QQ":
|
|
1804
|
-
return addLeadingZeros(quarter, 2);
|
|
1805
|
-
case "Qo":
|
|
1806
|
-
return localize2.ordinalNumber(quarter, { unit: "quarter" });
|
|
1807
|
-
case "QQQ":
|
|
1808
|
-
return localize2.quarter(quarter, {
|
|
1809
|
-
width: "abbreviated",
|
|
1810
|
-
context: "formatting"
|
|
1811
|
-
});
|
|
1812
|
-
case "QQQQQ":
|
|
1813
|
-
return localize2.quarter(quarter, {
|
|
1814
|
-
width: "narrow",
|
|
1815
|
-
context: "formatting"
|
|
1816
|
-
});
|
|
1817
|
-
case "QQQQ":
|
|
1818
|
-
default:
|
|
1819
|
-
return localize2.quarter(quarter, {
|
|
1820
|
-
width: "wide",
|
|
1821
|
-
context: "formatting"
|
|
1822
|
-
});
|
|
1823
|
-
}
|
|
1824
|
-
},
|
|
1825
|
-
// Stand-alone quarter
|
|
1826
|
-
q: function(date, token, localize2) {
|
|
1827
|
-
const quarter = Math.ceil((date.getMonth() + 1) / 3);
|
|
1828
|
-
switch (token) {
|
|
1829
|
-
case "q":
|
|
1830
|
-
return String(quarter);
|
|
1831
|
-
case "qq":
|
|
1832
|
-
return addLeadingZeros(quarter, 2);
|
|
1833
|
-
case "qo":
|
|
1834
|
-
return localize2.ordinalNumber(quarter, { unit: "quarter" });
|
|
1835
|
-
case "qqq":
|
|
1836
|
-
return localize2.quarter(quarter, {
|
|
1837
|
-
width: "abbreviated",
|
|
1838
|
-
context: "standalone"
|
|
1839
|
-
});
|
|
1840
|
-
case "qqqqq":
|
|
1841
|
-
return localize2.quarter(quarter, {
|
|
1842
|
-
width: "narrow",
|
|
1843
|
-
context: "standalone"
|
|
1844
|
-
});
|
|
1845
|
-
case "qqqq":
|
|
1846
|
-
default:
|
|
1847
|
-
return localize2.quarter(quarter, {
|
|
1848
|
-
width: "wide",
|
|
1849
|
-
context: "standalone"
|
|
1850
|
-
});
|
|
1851
|
-
}
|
|
1852
|
-
},
|
|
1853
|
-
// Month
|
|
1854
|
-
M: function(date, token, localize2) {
|
|
1855
|
-
const month = date.getMonth();
|
|
1856
|
-
switch (token) {
|
|
1857
|
-
case "M":
|
|
1858
|
-
case "MM":
|
|
1859
|
-
return lightFormatters.M(date, token);
|
|
1860
|
-
case "Mo":
|
|
1861
|
-
return localize2.ordinalNumber(month + 1, { unit: "month" });
|
|
1862
|
-
case "MMM":
|
|
1863
|
-
return localize2.month(month, {
|
|
1864
|
-
width: "abbreviated",
|
|
1865
|
-
context: "formatting"
|
|
1866
|
-
});
|
|
1867
|
-
case "MMMMM":
|
|
1868
|
-
return localize2.month(month, {
|
|
1869
|
-
width: "narrow",
|
|
1870
|
-
context: "formatting"
|
|
1871
|
-
});
|
|
1872
|
-
case "MMMM":
|
|
1873
|
-
default:
|
|
1874
|
-
return localize2.month(month, { width: "wide", context: "formatting" });
|
|
1875
|
-
}
|
|
1876
|
-
},
|
|
1877
|
-
// Stand-alone month
|
|
1878
|
-
L: function(date, token, localize2) {
|
|
1879
|
-
const month = date.getMonth();
|
|
1880
|
-
switch (token) {
|
|
1881
|
-
case "L":
|
|
1882
|
-
return String(month + 1);
|
|
1883
|
-
case "LL":
|
|
1884
|
-
return addLeadingZeros(month + 1, 2);
|
|
1885
|
-
case "Lo":
|
|
1886
|
-
return localize2.ordinalNumber(month + 1, { unit: "month" });
|
|
1887
|
-
case "LLL":
|
|
1888
|
-
return localize2.month(month, {
|
|
1889
|
-
width: "abbreviated",
|
|
1890
|
-
context: "standalone"
|
|
1891
|
-
});
|
|
1892
|
-
case "LLLLL":
|
|
1893
|
-
return localize2.month(month, {
|
|
1894
|
-
width: "narrow",
|
|
1895
|
-
context: "standalone"
|
|
1896
|
-
});
|
|
1897
|
-
case "LLLL":
|
|
1898
|
-
default:
|
|
1899
|
-
return localize2.month(month, { width: "wide", context: "standalone" });
|
|
1900
|
-
}
|
|
1901
|
-
},
|
|
1902
|
-
// Local week of year
|
|
1903
|
-
w: function(date, token, localize2, options) {
|
|
1904
|
-
const week = getWeek(date, options);
|
|
1905
|
-
if (token === "wo") {
|
|
1906
|
-
return localize2.ordinalNumber(week, { unit: "week" });
|
|
1907
|
-
}
|
|
1908
|
-
return addLeadingZeros(week, token.length);
|
|
1909
|
-
},
|
|
1910
|
-
// ISO week of year
|
|
1911
|
-
I: function(date, token, localize2) {
|
|
1912
|
-
const isoWeek = getISOWeek(date);
|
|
1913
|
-
if (token === "Io") {
|
|
1914
|
-
return localize2.ordinalNumber(isoWeek, { unit: "week" });
|
|
1915
|
-
}
|
|
1916
|
-
return addLeadingZeros(isoWeek, token.length);
|
|
1917
|
-
},
|
|
1918
|
-
// Day of the month
|
|
1919
|
-
d: function(date, token, localize2) {
|
|
1920
|
-
if (token === "do") {
|
|
1921
|
-
return localize2.ordinalNumber(date.getDate(), { unit: "date" });
|
|
1922
|
-
}
|
|
1923
|
-
return lightFormatters.d(date, token);
|
|
1924
|
-
},
|
|
1925
|
-
// Day of year
|
|
1926
|
-
D: function(date, token, localize2) {
|
|
1927
|
-
const dayOfYear = getDayOfYear(date);
|
|
1928
|
-
if (token === "Do") {
|
|
1929
|
-
return localize2.ordinalNumber(dayOfYear, { unit: "dayOfYear" });
|
|
1930
|
-
}
|
|
1931
|
-
return addLeadingZeros(dayOfYear, token.length);
|
|
1932
|
-
},
|
|
1933
|
-
// Day of week
|
|
1934
|
-
E: function(date, token, localize2) {
|
|
1935
|
-
const dayOfWeek = date.getDay();
|
|
1936
|
-
switch (token) {
|
|
1937
|
-
case "E":
|
|
1938
|
-
case "EE":
|
|
1939
|
-
case "EEE":
|
|
1940
|
-
return localize2.day(dayOfWeek, {
|
|
1941
|
-
width: "abbreviated",
|
|
1942
|
-
context: "formatting"
|
|
1943
|
-
});
|
|
1944
|
-
case "EEEEE":
|
|
1945
|
-
return localize2.day(dayOfWeek, {
|
|
1946
|
-
width: "narrow",
|
|
1947
|
-
context: "formatting"
|
|
1948
|
-
});
|
|
1949
|
-
case "EEEEEE":
|
|
1950
|
-
return localize2.day(dayOfWeek, {
|
|
1951
|
-
width: "short",
|
|
1952
|
-
context: "formatting"
|
|
1953
|
-
});
|
|
1954
|
-
case "EEEE":
|
|
1955
|
-
default:
|
|
1956
|
-
return localize2.day(dayOfWeek, {
|
|
1957
|
-
width: "wide",
|
|
1958
|
-
context: "formatting"
|
|
1959
|
-
});
|
|
1960
|
-
}
|
|
1961
|
-
},
|
|
1962
|
-
// Local day of week
|
|
1963
|
-
e: function(date, token, localize2, options) {
|
|
1964
|
-
const dayOfWeek = date.getDay();
|
|
1965
|
-
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
1966
|
-
switch (token) {
|
|
1967
|
-
case "e":
|
|
1968
|
-
return String(localDayOfWeek);
|
|
1969
|
-
case "ee":
|
|
1970
|
-
return addLeadingZeros(localDayOfWeek, 2);
|
|
1971
|
-
case "eo":
|
|
1972
|
-
return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
1973
|
-
case "eee":
|
|
1974
|
-
return localize2.day(dayOfWeek, {
|
|
1975
|
-
width: "abbreviated",
|
|
1976
|
-
context: "formatting"
|
|
1977
|
-
});
|
|
1978
|
-
case "eeeee":
|
|
1979
|
-
return localize2.day(dayOfWeek, {
|
|
1980
|
-
width: "narrow",
|
|
1981
|
-
context: "formatting"
|
|
1982
|
-
});
|
|
1983
|
-
case "eeeeee":
|
|
1984
|
-
return localize2.day(dayOfWeek, {
|
|
1985
|
-
width: "short",
|
|
1986
|
-
context: "formatting"
|
|
1987
|
-
});
|
|
1988
|
-
case "eeee":
|
|
1989
|
-
default:
|
|
1990
|
-
return localize2.day(dayOfWeek, {
|
|
1991
|
-
width: "wide",
|
|
1992
|
-
context: "formatting"
|
|
1993
|
-
});
|
|
1994
|
-
}
|
|
1995
|
-
},
|
|
1996
|
-
// Stand-alone local day of week
|
|
1997
|
-
c: function(date, token, localize2, options) {
|
|
1998
|
-
const dayOfWeek = date.getDay();
|
|
1999
|
-
const localDayOfWeek = (dayOfWeek - options.weekStartsOn + 8) % 7 || 7;
|
|
2000
|
-
switch (token) {
|
|
2001
|
-
case "c":
|
|
2002
|
-
return String(localDayOfWeek);
|
|
2003
|
-
case "cc":
|
|
2004
|
-
return addLeadingZeros(localDayOfWeek, token.length);
|
|
2005
|
-
case "co":
|
|
2006
|
-
return localize2.ordinalNumber(localDayOfWeek, { unit: "day" });
|
|
2007
|
-
case "ccc":
|
|
2008
|
-
return localize2.day(dayOfWeek, {
|
|
2009
|
-
width: "abbreviated",
|
|
2010
|
-
context: "standalone"
|
|
2011
|
-
});
|
|
2012
|
-
case "ccccc":
|
|
2013
|
-
return localize2.day(dayOfWeek, {
|
|
2014
|
-
width: "narrow",
|
|
2015
|
-
context: "standalone"
|
|
2016
|
-
});
|
|
2017
|
-
case "cccccc":
|
|
2018
|
-
return localize2.day(dayOfWeek, {
|
|
2019
|
-
width: "short",
|
|
2020
|
-
context: "standalone"
|
|
2021
|
-
});
|
|
2022
|
-
case "cccc":
|
|
2023
|
-
default:
|
|
2024
|
-
return localize2.day(dayOfWeek, {
|
|
2025
|
-
width: "wide",
|
|
2026
|
-
context: "standalone"
|
|
2027
|
-
});
|
|
2028
|
-
}
|
|
2029
|
-
},
|
|
2030
|
-
// ISO day of week
|
|
2031
|
-
i: function(date, token, localize2) {
|
|
2032
|
-
const dayOfWeek = date.getDay();
|
|
2033
|
-
const isoDayOfWeek = dayOfWeek === 0 ? 7 : dayOfWeek;
|
|
2034
|
-
switch (token) {
|
|
2035
|
-
case "i":
|
|
2036
|
-
return String(isoDayOfWeek);
|
|
2037
|
-
case "ii":
|
|
2038
|
-
return addLeadingZeros(isoDayOfWeek, token.length);
|
|
2039
|
-
case "io":
|
|
2040
|
-
return localize2.ordinalNumber(isoDayOfWeek, { unit: "day" });
|
|
2041
|
-
case "iii":
|
|
2042
|
-
return localize2.day(dayOfWeek, {
|
|
2043
|
-
width: "abbreviated",
|
|
2044
|
-
context: "formatting"
|
|
2045
|
-
});
|
|
2046
|
-
case "iiiii":
|
|
2047
|
-
return localize2.day(dayOfWeek, {
|
|
2048
|
-
width: "narrow",
|
|
2049
|
-
context: "formatting"
|
|
2050
|
-
});
|
|
2051
|
-
case "iiiiii":
|
|
2052
|
-
return localize2.day(dayOfWeek, {
|
|
2053
|
-
width: "short",
|
|
2054
|
-
context: "formatting"
|
|
2055
|
-
});
|
|
2056
|
-
case "iiii":
|
|
2057
|
-
default:
|
|
2058
|
-
return localize2.day(dayOfWeek, {
|
|
2059
|
-
width: "wide",
|
|
2060
|
-
context: "formatting"
|
|
2061
|
-
});
|
|
2062
|
-
}
|
|
2063
|
-
},
|
|
2064
|
-
// AM or PM
|
|
2065
|
-
a: function(date, token, localize2) {
|
|
2066
|
-
const hours = date.getHours();
|
|
2067
|
-
const dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
2068
|
-
switch (token) {
|
|
2069
|
-
case "a":
|
|
2070
|
-
case "aa":
|
|
2071
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2072
|
-
width: "abbreviated",
|
|
2073
|
-
context: "formatting"
|
|
2074
|
-
});
|
|
2075
|
-
case "aaa":
|
|
2076
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2077
|
-
width: "abbreviated",
|
|
2078
|
-
context: "formatting"
|
|
2079
|
-
}).toLowerCase();
|
|
2080
|
-
case "aaaaa":
|
|
2081
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2082
|
-
width: "narrow",
|
|
2083
|
-
context: "formatting"
|
|
2084
|
-
});
|
|
2085
|
-
case "aaaa":
|
|
2086
|
-
default:
|
|
2087
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2088
|
-
width: "wide",
|
|
2089
|
-
context: "formatting"
|
|
2090
|
-
});
|
|
2091
|
-
}
|
|
2092
|
-
},
|
|
2093
|
-
// AM, PM, midnight, noon
|
|
2094
|
-
b: function(date, token, localize2) {
|
|
2095
|
-
const hours = date.getHours();
|
|
2096
|
-
let dayPeriodEnumValue;
|
|
2097
|
-
if (hours === 12) {
|
|
2098
|
-
dayPeriodEnumValue = dayPeriodEnum.noon;
|
|
2099
|
-
} else if (hours === 0) {
|
|
2100
|
-
dayPeriodEnumValue = dayPeriodEnum.midnight;
|
|
2101
|
-
} else {
|
|
2102
|
-
dayPeriodEnumValue = hours / 12 >= 1 ? "pm" : "am";
|
|
2103
|
-
}
|
|
2104
|
-
switch (token) {
|
|
2105
|
-
case "b":
|
|
2106
|
-
case "bb":
|
|
2107
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2108
|
-
width: "abbreviated",
|
|
2109
|
-
context: "formatting"
|
|
2110
|
-
});
|
|
2111
|
-
case "bbb":
|
|
2112
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2113
|
-
width: "abbreviated",
|
|
2114
|
-
context: "formatting"
|
|
2115
|
-
}).toLowerCase();
|
|
2116
|
-
case "bbbbb":
|
|
2117
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2118
|
-
width: "narrow",
|
|
2119
|
-
context: "formatting"
|
|
2120
|
-
});
|
|
2121
|
-
case "bbbb":
|
|
2122
|
-
default:
|
|
2123
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2124
|
-
width: "wide",
|
|
2125
|
-
context: "formatting"
|
|
2126
|
-
});
|
|
2127
|
-
}
|
|
2128
|
-
},
|
|
2129
|
-
// in the morning, in the afternoon, in the evening, at night
|
|
2130
|
-
B: function(date, token, localize2) {
|
|
2131
|
-
const hours = date.getHours();
|
|
2132
|
-
let dayPeriodEnumValue;
|
|
2133
|
-
if (hours >= 17) {
|
|
2134
|
-
dayPeriodEnumValue = dayPeriodEnum.evening;
|
|
2135
|
-
} else if (hours >= 12) {
|
|
2136
|
-
dayPeriodEnumValue = dayPeriodEnum.afternoon;
|
|
2137
|
-
} else if (hours >= 4) {
|
|
2138
|
-
dayPeriodEnumValue = dayPeriodEnum.morning;
|
|
2139
|
-
} else {
|
|
2140
|
-
dayPeriodEnumValue = dayPeriodEnum.night;
|
|
2141
|
-
}
|
|
2142
|
-
switch (token) {
|
|
2143
|
-
case "B":
|
|
2144
|
-
case "BB":
|
|
2145
|
-
case "BBB":
|
|
2146
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2147
|
-
width: "abbreviated",
|
|
2148
|
-
context: "formatting"
|
|
2149
|
-
});
|
|
2150
|
-
case "BBBBB":
|
|
2151
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2152
|
-
width: "narrow",
|
|
2153
|
-
context: "formatting"
|
|
2154
|
-
});
|
|
2155
|
-
case "BBBB":
|
|
2156
|
-
default:
|
|
2157
|
-
return localize2.dayPeriod(dayPeriodEnumValue, {
|
|
2158
|
-
width: "wide",
|
|
2159
|
-
context: "formatting"
|
|
2160
|
-
});
|
|
2161
|
-
}
|
|
2162
|
-
},
|
|
2163
|
-
// Hour [1-12]
|
|
2164
|
-
h: function(date, token, localize2) {
|
|
2165
|
-
if (token === "ho") {
|
|
2166
|
-
let hours = date.getHours() % 12;
|
|
2167
|
-
if (hours === 0)
|
|
2168
|
-
hours = 12;
|
|
2169
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
2170
|
-
}
|
|
2171
|
-
return lightFormatters.h(date, token);
|
|
2172
|
-
},
|
|
2173
|
-
// Hour [0-23]
|
|
2174
|
-
H: function(date, token, localize2) {
|
|
2175
|
-
if (token === "Ho") {
|
|
2176
|
-
return localize2.ordinalNumber(date.getHours(), { unit: "hour" });
|
|
2177
|
-
}
|
|
2178
|
-
return lightFormatters.H(date, token);
|
|
2179
|
-
},
|
|
2180
|
-
// Hour [0-11]
|
|
2181
|
-
K: function(date, token, localize2) {
|
|
2182
|
-
const hours = date.getHours() % 12;
|
|
2183
|
-
if (token === "Ko") {
|
|
2184
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
2185
|
-
}
|
|
2186
|
-
return addLeadingZeros(hours, token.length);
|
|
2187
|
-
},
|
|
2188
|
-
// Hour [1-24]
|
|
2189
|
-
k: function(date, token, localize2) {
|
|
2190
|
-
let hours = date.getHours();
|
|
2191
|
-
if (hours === 0)
|
|
2192
|
-
hours = 24;
|
|
2193
|
-
if (token === "ko") {
|
|
2194
|
-
return localize2.ordinalNumber(hours, { unit: "hour" });
|
|
2195
|
-
}
|
|
2196
|
-
return addLeadingZeros(hours, token.length);
|
|
2197
|
-
},
|
|
2198
|
-
// Minute
|
|
2199
|
-
m: function(date, token, localize2) {
|
|
2200
|
-
if (token === "mo") {
|
|
2201
|
-
return localize2.ordinalNumber(date.getMinutes(), { unit: "minute" });
|
|
2202
|
-
}
|
|
2203
|
-
return lightFormatters.m(date, token);
|
|
2204
|
-
},
|
|
2205
|
-
// Second
|
|
2206
|
-
s: function(date, token, localize2) {
|
|
2207
|
-
if (token === "so") {
|
|
2208
|
-
return localize2.ordinalNumber(date.getSeconds(), { unit: "second" });
|
|
2209
|
-
}
|
|
2210
|
-
return lightFormatters.s(date, token);
|
|
2211
|
-
},
|
|
2212
|
-
// Fraction of second
|
|
2213
|
-
S: function(date, token) {
|
|
2214
|
-
return lightFormatters.S(date, token);
|
|
2215
|
-
},
|
|
2216
|
-
// Timezone (ISO-8601. If offset is 0, output is always `'Z'`)
|
|
2217
|
-
X: function(date, token, _localize) {
|
|
2218
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
2219
|
-
if (timezoneOffset === 0) {
|
|
2220
|
-
return "Z";
|
|
2221
|
-
}
|
|
2222
|
-
switch (token) {
|
|
2223
|
-
case "X":
|
|
2224
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
2225
|
-
case "XXXX":
|
|
2226
|
-
case "XX":
|
|
2227
|
-
return formatTimezone(timezoneOffset);
|
|
2228
|
-
case "XXXXX":
|
|
2229
|
-
case "XXX":
|
|
2230
|
-
default:
|
|
2231
|
-
return formatTimezone(timezoneOffset, ":");
|
|
2232
|
-
}
|
|
2233
|
-
},
|
|
2234
|
-
// Timezone (ISO-8601. If offset is 0, output is `'+00:00'` or equivalent)
|
|
2235
|
-
x: function(date, token, _localize) {
|
|
2236
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
2237
|
-
switch (token) {
|
|
2238
|
-
case "x":
|
|
2239
|
-
return formatTimezoneWithOptionalMinutes(timezoneOffset);
|
|
2240
|
-
case "xxxx":
|
|
2241
|
-
case "xx":
|
|
2242
|
-
return formatTimezone(timezoneOffset);
|
|
2243
|
-
case "xxxxx":
|
|
2244
|
-
case "xxx":
|
|
2245
|
-
default:
|
|
2246
|
-
return formatTimezone(timezoneOffset, ":");
|
|
2247
|
-
}
|
|
2248
|
-
},
|
|
2249
|
-
// Timezone (GMT)
|
|
2250
|
-
O: function(date, token, _localize) {
|
|
2251
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
2252
|
-
switch (token) {
|
|
2253
|
-
case "O":
|
|
2254
|
-
case "OO":
|
|
2255
|
-
case "OOO":
|
|
2256
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
2257
|
-
case "OOOO":
|
|
2258
|
-
default:
|
|
2259
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
2260
|
-
}
|
|
2261
|
-
},
|
|
2262
|
-
// Timezone (specific non-location)
|
|
2263
|
-
z: function(date, token, _localize) {
|
|
2264
|
-
const timezoneOffset = date.getTimezoneOffset();
|
|
2265
|
-
switch (token) {
|
|
2266
|
-
case "z":
|
|
2267
|
-
case "zz":
|
|
2268
|
-
case "zzz":
|
|
2269
|
-
return "GMT" + formatTimezoneShort(timezoneOffset, ":");
|
|
2270
|
-
case "zzzz":
|
|
2271
|
-
default:
|
|
2272
|
-
return "GMT" + formatTimezone(timezoneOffset, ":");
|
|
2273
|
-
}
|
|
2274
|
-
},
|
|
2275
|
-
// Seconds timestamp
|
|
2276
|
-
t: function(date, token, _localize) {
|
|
2277
|
-
const timestamp = Math.trunc(+date / 1e3);
|
|
2278
|
-
return addLeadingZeros(timestamp, token.length);
|
|
2279
|
-
},
|
|
2280
|
-
// Milliseconds timestamp
|
|
2281
|
-
T: function(date, token, _localize) {
|
|
2282
|
-
return addLeadingZeros(+date, token.length);
|
|
2283
|
-
}
|
|
2284
|
-
};
|
|
2285
|
-
function formatTimezoneShort(offset, delimiter = "") {
|
|
2286
|
-
const sign = offset > 0 ? "-" : "+";
|
|
2287
|
-
const absOffset = Math.abs(offset);
|
|
2288
|
-
const hours = Math.trunc(absOffset / 60);
|
|
2289
|
-
const minutes = absOffset % 60;
|
|
2290
|
-
if (minutes === 0) {
|
|
2291
|
-
return sign + String(hours);
|
|
2292
|
-
}
|
|
2293
|
-
return sign + String(hours) + delimiter + addLeadingZeros(minutes, 2);
|
|
2294
|
-
}
|
|
2295
|
-
function formatTimezoneWithOptionalMinutes(offset, delimiter) {
|
|
2296
|
-
if (offset % 60 === 0) {
|
|
2297
|
-
const sign = offset > 0 ? "-" : "+";
|
|
2298
|
-
return sign + addLeadingZeros(Math.abs(offset) / 60, 2);
|
|
2299
|
-
}
|
|
2300
|
-
return formatTimezone(offset, delimiter);
|
|
2301
|
-
}
|
|
2302
|
-
function formatTimezone(offset, delimiter = "") {
|
|
2303
|
-
const sign = offset > 0 ? "-" : "+";
|
|
2304
|
-
const absOffset = Math.abs(offset);
|
|
2305
|
-
const hours = addLeadingZeros(Math.trunc(absOffset / 60), 2);
|
|
2306
|
-
const minutes = addLeadingZeros(absOffset % 60, 2);
|
|
2307
|
-
return sign + hours + delimiter + minutes;
|
|
2308
|
-
}
|
|
2309
|
-
|
|
2310
|
-
// ../../node_modules/date-fns/_lib/format/longFormatters.js
|
|
2311
|
-
var dateLongFormatter = (pattern, formatLong2) => {
|
|
2312
|
-
switch (pattern) {
|
|
2313
|
-
case "P":
|
|
2314
|
-
return formatLong2.date({ width: "short" });
|
|
2315
|
-
case "PP":
|
|
2316
|
-
return formatLong2.date({ width: "medium" });
|
|
2317
|
-
case "PPP":
|
|
2318
|
-
return formatLong2.date({ width: "long" });
|
|
2319
|
-
case "PPPP":
|
|
2320
|
-
default:
|
|
2321
|
-
return formatLong2.date({ width: "full" });
|
|
2322
|
-
}
|
|
2323
|
-
};
|
|
2324
|
-
var timeLongFormatter = (pattern, formatLong2) => {
|
|
2325
|
-
switch (pattern) {
|
|
2326
|
-
case "p":
|
|
2327
|
-
return formatLong2.time({ width: "short" });
|
|
2328
|
-
case "pp":
|
|
2329
|
-
return formatLong2.time({ width: "medium" });
|
|
2330
|
-
case "ppp":
|
|
2331
|
-
return formatLong2.time({ width: "long" });
|
|
2332
|
-
case "pppp":
|
|
2333
|
-
default:
|
|
2334
|
-
return formatLong2.time({ width: "full" });
|
|
2335
|
-
}
|
|
2336
|
-
};
|
|
2337
|
-
var dateTimeLongFormatter = (pattern, formatLong2) => {
|
|
2338
|
-
const matchResult = pattern.match(/(P+)(p+)?/) || [];
|
|
2339
|
-
const datePattern = matchResult[1];
|
|
2340
|
-
const timePattern = matchResult[2];
|
|
2341
|
-
if (!timePattern) {
|
|
2342
|
-
return dateLongFormatter(pattern, formatLong2);
|
|
2343
|
-
}
|
|
2344
|
-
let dateTimeFormat;
|
|
2345
|
-
switch (datePattern) {
|
|
2346
|
-
case "P":
|
|
2347
|
-
dateTimeFormat = formatLong2.dateTime({ width: "short" });
|
|
2348
|
-
break;
|
|
2349
|
-
case "PP":
|
|
2350
|
-
dateTimeFormat = formatLong2.dateTime({ width: "medium" });
|
|
2351
|
-
break;
|
|
2352
|
-
case "PPP":
|
|
2353
|
-
dateTimeFormat = formatLong2.dateTime({ width: "long" });
|
|
2354
|
-
break;
|
|
2355
|
-
case "PPPP":
|
|
2356
|
-
default:
|
|
2357
|
-
dateTimeFormat = formatLong2.dateTime({ width: "full" });
|
|
2358
|
-
break;
|
|
2359
|
-
}
|
|
2360
|
-
return dateTimeFormat.replace("{{date}}", dateLongFormatter(datePattern, formatLong2)).replace("{{time}}", timeLongFormatter(timePattern, formatLong2));
|
|
2361
|
-
};
|
|
2362
|
-
var longFormatters = {
|
|
2363
|
-
p: timeLongFormatter,
|
|
2364
|
-
P: dateTimeLongFormatter
|
|
2365
|
-
};
|
|
2366
|
-
|
|
2367
|
-
// ../../node_modules/date-fns/_lib/protectedTokens.js
|
|
2368
|
-
var dayOfYearTokenRE = /^D+$/;
|
|
2369
|
-
var weekYearTokenRE = /^Y+$/;
|
|
2370
|
-
var throwTokens = ["D", "DD", "YY", "YYYY"];
|
|
2371
|
-
function isProtectedDayOfYearToken(token) {
|
|
2372
|
-
return dayOfYearTokenRE.test(token);
|
|
2373
|
-
}
|
|
2374
|
-
function isProtectedWeekYearToken(token) {
|
|
2375
|
-
return weekYearTokenRE.test(token);
|
|
2376
|
-
}
|
|
2377
|
-
function warnOrThrowProtectedError(token, format2, input) {
|
|
2378
|
-
const _message = message(token, format2, input);
|
|
2379
|
-
console.warn(_message);
|
|
2380
|
-
if (throwTokens.includes(token))
|
|
2381
|
-
throw new RangeError(_message);
|
|
2382
|
-
}
|
|
2383
|
-
function message(token, format2, input) {
|
|
2384
|
-
const subject = token[0] === "Y" ? "years" : "days of the month";
|
|
2385
|
-
return `Use \`${token.toLowerCase()}\` instead of \`${token}\` (in \`${format2}\`) for formatting ${subject} to the input \`${input}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`;
|
|
2386
|
-
}
|
|
2387
|
-
|
|
2388
|
-
// ../../node_modules/date-fns/format.js
|
|
2389
|
-
var formattingTokensRegExp = /[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g;
|
|
2390
|
-
var longFormattingTokensRegExp = /P+p+|P+|p+|''|'(''|[^'])+('|$)|./g;
|
|
2391
|
-
var escapedStringRegExp = /^'([^]*?)'?$/;
|
|
2392
|
-
var doubleQuoteRegExp = /''/g;
|
|
2393
|
-
var unescapedLatinCharacterRegExp = /[a-zA-Z]/;
|
|
2394
|
-
function format(date, formatStr, options) {
|
|
2395
|
-
const defaultOptions2 = getDefaultOptions();
|
|
2396
|
-
const locale = options?.locale ?? defaultOptions2.locale ?? enUS;
|
|
2397
|
-
const firstWeekContainsDate = options?.firstWeekContainsDate ?? options?.locale?.options?.firstWeekContainsDate ?? defaultOptions2.firstWeekContainsDate ?? defaultOptions2.locale?.options?.firstWeekContainsDate ?? 1;
|
|
2398
|
-
const weekStartsOn = options?.weekStartsOn ?? options?.locale?.options?.weekStartsOn ?? defaultOptions2.weekStartsOn ?? defaultOptions2.locale?.options?.weekStartsOn ?? 0;
|
|
2399
|
-
const originalDate = toDate(date, options?.in);
|
|
2400
|
-
if (!isValid(originalDate)) {
|
|
2401
|
-
throw new RangeError("Invalid time value");
|
|
2402
|
-
}
|
|
2403
|
-
let parts = formatStr.match(longFormattingTokensRegExp).map((substring) => {
|
|
2404
|
-
const firstCharacter = substring[0];
|
|
2405
|
-
if (firstCharacter === "p" || firstCharacter === "P") {
|
|
2406
|
-
const longFormatter = longFormatters[firstCharacter];
|
|
2407
|
-
return longFormatter(substring, locale.formatLong);
|
|
2408
|
-
}
|
|
2409
|
-
return substring;
|
|
2410
|
-
}).join("").match(formattingTokensRegExp).map((substring) => {
|
|
2411
|
-
if (substring === "''") {
|
|
2412
|
-
return { isToken: false, value: "'" };
|
|
2413
|
-
}
|
|
2414
|
-
const firstCharacter = substring[0];
|
|
2415
|
-
if (firstCharacter === "'") {
|
|
2416
|
-
return { isToken: false, value: cleanEscapedString(substring) };
|
|
2417
|
-
}
|
|
2418
|
-
if (formatters[firstCharacter]) {
|
|
2419
|
-
return { isToken: true, value: substring };
|
|
2420
|
-
}
|
|
2421
|
-
if (firstCharacter.match(unescapedLatinCharacterRegExp)) {
|
|
2422
|
-
throw new RangeError(
|
|
2423
|
-
"Format string contains an unescaped latin alphabet character `" + firstCharacter + "`"
|
|
2424
|
-
);
|
|
2425
|
-
}
|
|
2426
|
-
return { isToken: false, value: substring };
|
|
2427
|
-
});
|
|
2428
|
-
if (locale.localize.preprocessor) {
|
|
2429
|
-
parts = locale.localize.preprocessor(originalDate, parts);
|
|
2430
|
-
}
|
|
2431
|
-
const formatterOptions = {
|
|
2432
|
-
firstWeekContainsDate,
|
|
2433
|
-
weekStartsOn,
|
|
2434
|
-
locale
|
|
2435
|
-
};
|
|
2436
|
-
return parts.map((part) => {
|
|
2437
|
-
if (!part.isToken)
|
|
2438
|
-
return part.value;
|
|
2439
|
-
const token = part.value;
|
|
2440
|
-
if (!options?.useAdditionalWeekYearTokens && isProtectedWeekYearToken(token) || !options?.useAdditionalDayOfYearTokens && isProtectedDayOfYearToken(token)) {
|
|
2441
|
-
warnOrThrowProtectedError(token, formatStr, String(date));
|
|
2442
|
-
}
|
|
2443
|
-
const formatter = formatters[token[0]];
|
|
2444
|
-
return formatter(originalDate, token, locale.localize, formatterOptions);
|
|
2445
|
-
}).join("");
|
|
2446
|
-
}
|
|
2447
|
-
function cleanEscapedString(input) {
|
|
2448
|
-
const matched = input.match(escapedStringRegExp);
|
|
2449
|
-
if (!matched) {
|
|
2450
|
-
return input;
|
|
2451
|
-
}
|
|
2452
|
-
return matched[1].replace(doubleQuoteRegExp, "'");
|
|
2453
|
-
}
|
|
2454
|
-
|
|
2455
|
-
// ../../node_modules/date-fns/getDay.js
|
|
2456
|
-
function getDay(date, options) {
|
|
2457
|
-
return toDate(date, options?.in).getDay();
|
|
2458
|
-
}
|
|
2459
|
-
|
|
2460
|
-
// ../../node_modules/date-fns/isSameMonth.js
|
|
2461
|
-
function isSameMonth(laterDate, earlierDate, options) {
|
|
2462
|
-
const [laterDate_, earlierDate_] = normalizeDates(
|
|
2463
|
-
options?.in,
|
|
2464
|
-
laterDate,
|
|
2465
|
-
earlierDate
|
|
2466
|
-
);
|
|
2467
|
-
return laterDate_.getFullYear() === earlierDate_.getFullYear() && laterDate_.getMonth() === earlierDate_.getMonth();
|
|
2468
|
-
}
|
|
2469
|
-
|
|
2470
|
-
// ../../node_modules/date-fns/isToday.js
|
|
2471
|
-
function isToday(date, options) {
|
|
2472
|
-
return isSameDay(
|
|
2473
|
-
constructFrom(options?.in || date, date),
|
|
2474
|
-
constructNow(options?.in || date)
|
|
2475
|
-
);
|
|
2476
|
-
}
|
|
2477
|
-
|
|
2478
|
-
// ../../node_modules/date-fns/subMonths.js
|
|
2479
|
-
function subMonths(date, amount, options) {
|
|
2480
|
-
return addMonths(date, -amount, options);
|
|
2481
|
-
}
|
|
2482
|
-
function Calendar({
|
|
783
|
+
MoonUIButton2.displayName = "MoonUIButton";
|
|
784
|
+
function MoonUICalendar({
|
|
2483
785
|
mode = "single",
|
|
2484
786
|
selected,
|
|
2485
787
|
onSelect,
|
|
@@ -2674,7 +976,7 @@ function Calendar({
|
|
|
2674
976
|
] })
|
|
2675
977
|
] });
|
|
2676
978
|
}
|
|
2677
|
-
|
|
979
|
+
MoonUICalendar.displayName = "MoonUICalendar";
|
|
2678
980
|
var microInteractionVariants = cva("", {
|
|
2679
981
|
variants: {
|
|
2680
982
|
hover: {
|
|
@@ -2817,7 +1119,7 @@ var skeletonAnimation = {
|
|
|
2817
1119
|
}
|
|
2818
1120
|
}
|
|
2819
1121
|
};
|
|
2820
|
-
var
|
|
1122
|
+
var moonUICardVariants = cva(
|
|
2821
1123
|
"rounded-lg border bg-card text-card-foreground shadow-sm dark:shadow-gray-900/20 dark:border-gray-800 dark:bg-gray-900 dark:text-gray-100 transition-all duration-200",
|
|
2822
1124
|
{
|
|
2823
1125
|
variants: {
|
|
@@ -2854,7 +1156,7 @@ var cardVariants = cva(
|
|
|
2854
1156
|
}
|
|
2855
1157
|
}
|
|
2856
1158
|
);
|
|
2857
|
-
var
|
|
1159
|
+
var MoonUICard = t.forwardRef(
|
|
2858
1160
|
({ className, variant, size, radius, interactive, microInteraction = "lift", ...props }, ref) => {
|
|
2859
1161
|
if (interactive && microInteraction !== "none") {
|
|
2860
1162
|
const interactionProps = {
|
|
@@ -2865,7 +1167,7 @@ var Card = t.forwardRef(
|
|
|
2865
1167
|
motion.div,
|
|
2866
1168
|
{
|
|
2867
1169
|
ref,
|
|
2868
|
-
className: cn(
|
|
1170
|
+
className: cn(moonUICardVariants({ variant, size, radius, interactive, className })),
|
|
2869
1171
|
...interactionProps,
|
|
2870
1172
|
...props
|
|
2871
1173
|
}
|
|
@@ -2881,8 +1183,8 @@ var Card = t.forwardRef(
|
|
|
2881
1183
|
);
|
|
2882
1184
|
}
|
|
2883
1185
|
);
|
|
2884
|
-
|
|
2885
|
-
var
|
|
1186
|
+
MoonUICard.displayName = "MoonUICard";
|
|
1187
|
+
var MoonUICardHeader = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2886
1188
|
"div",
|
|
2887
1189
|
{
|
|
2888
1190
|
ref,
|
|
@@ -2890,8 +1192,8 @@ var CardHeader = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2890
1192
|
...props
|
|
2891
1193
|
}
|
|
2892
1194
|
));
|
|
2893
|
-
|
|
2894
|
-
var
|
|
1195
|
+
MoonUICardHeader.displayName = "MoonUICardHeader";
|
|
1196
|
+
var MoonUICardTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2895
1197
|
"h3",
|
|
2896
1198
|
{
|
|
2897
1199
|
ref,
|
|
@@ -2899,8 +1201,8 @@ var CardTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
2899
1201
|
...props
|
|
2900
1202
|
}
|
|
2901
1203
|
));
|
|
2902
|
-
|
|
2903
|
-
var
|
|
1204
|
+
MoonUICardTitle.displayName = "MoonUICardTitle";
|
|
1205
|
+
var MoonUICardDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2904
1206
|
"p",
|
|
2905
1207
|
{
|
|
2906
1208
|
ref,
|
|
@@ -2908,10 +1210,10 @@ var CardDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
2908
1210
|
...props
|
|
2909
1211
|
}
|
|
2910
1212
|
));
|
|
2911
|
-
|
|
2912
|
-
var
|
|
2913
|
-
|
|
2914
|
-
var
|
|
1213
|
+
MoonUICardDescription.displayName = "MoonUICardDescription";
|
|
1214
|
+
var MoonUICardContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("pt-0", className), ...props }));
|
|
1215
|
+
MoonUICardContent.displayName = "MoonUICardContent";
|
|
1216
|
+
var MoonUICardFooter = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
2915
1217
|
"div",
|
|
2916
1218
|
{
|
|
2917
1219
|
ref,
|
|
@@ -2919,8 +1221,8 @@ var CardFooter = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
2919
1221
|
...props
|
|
2920
1222
|
}
|
|
2921
1223
|
));
|
|
2922
|
-
|
|
2923
|
-
|
|
1224
|
+
MoonUICardFooter.displayName = "MoonUICardFooter";
|
|
1225
|
+
cva(
|
|
2924
1226
|
"peer shrink-0 border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:text-primary-foreground",
|
|
2925
1227
|
{
|
|
2926
1228
|
variants: {
|
|
@@ -2958,7 +1260,7 @@ var checkboxVariants = cva(
|
|
|
2958
1260
|
}
|
|
2959
1261
|
}
|
|
2960
1262
|
);
|
|
2961
|
-
var
|
|
1263
|
+
var MoonUICheckbox2 = t.forwardRef(({
|
|
2962
1264
|
className,
|
|
2963
1265
|
variant,
|
|
2964
1266
|
size,
|
|
@@ -3445,7 +1747,7 @@ var Collapsible = t.forwardRef(
|
|
|
3445
1747
|
);
|
|
3446
1748
|
Collapsible.displayName = COLLAPSIBLE_NAME;
|
|
3447
1749
|
var TRIGGER_NAME = "CollapsibleTrigger";
|
|
3448
|
-
var
|
|
1750
|
+
var CollapsibleTrigger2 = t.forwardRef(
|
|
3449
1751
|
(props, forwardedRef) => {
|
|
3450
1752
|
const { __scopeCollapsible, ...triggerProps } = props;
|
|
3451
1753
|
const context = useCollapsibleContext(TRIGGER_NAME, __scopeCollapsible);
|
|
@@ -3465,16 +1767,16 @@ var CollapsibleTrigger = t.forwardRef(
|
|
|
3465
1767
|
);
|
|
3466
1768
|
}
|
|
3467
1769
|
);
|
|
3468
|
-
|
|
1770
|
+
CollapsibleTrigger2.displayName = TRIGGER_NAME;
|
|
3469
1771
|
var CONTENT_NAME = "CollapsibleContent";
|
|
3470
|
-
var
|
|
1772
|
+
var CollapsibleContent2 = t.forwardRef(
|
|
3471
1773
|
(props, forwardedRef) => {
|
|
3472
1774
|
const { forceMount, ...contentProps } = props;
|
|
3473
1775
|
const context = useCollapsibleContext(CONTENT_NAME, props.__scopeCollapsible);
|
|
3474
1776
|
return /* @__PURE__ */ jsx(Presence, { present: forceMount || context.open, children: ({ present }) => /* @__PURE__ */ jsx(CollapsibleContentImpl, { ...contentProps, ref: forwardedRef, present }) });
|
|
3475
1777
|
}
|
|
3476
1778
|
);
|
|
3477
|
-
|
|
1779
|
+
CollapsibleContent2.displayName = CONTENT_NAME;
|
|
3478
1780
|
var CollapsibleContentImpl = t.forwardRef((props, forwardedRef) => {
|
|
3479
1781
|
const { __scopeCollapsible, present, children, ...contentProps } = props;
|
|
3480
1782
|
const context = useCollapsibleContext(CONTENT_NAME, __scopeCollapsible);
|
|
@@ -3533,9 +1835,9 @@ function getState(open) {
|
|
|
3533
1835
|
return open ? "open" : "closed";
|
|
3534
1836
|
}
|
|
3535
1837
|
var Root4 = Collapsible;
|
|
3536
|
-
var Trigger2 =
|
|
3537
|
-
var Content2 =
|
|
3538
|
-
var
|
|
1838
|
+
var Trigger2 = CollapsibleTrigger2;
|
|
1839
|
+
var Content2 = CollapsibleContent2;
|
|
1840
|
+
var MoonUICollapsible = Root4;
|
|
3539
1841
|
var collapsibleTriggerVariants = cva(
|
|
3540
1842
|
"flex w-full items-center justify-between transition-all",
|
|
3541
1843
|
{
|
|
@@ -3558,7 +1860,7 @@ var collapsibleTriggerVariants = cva(
|
|
|
3558
1860
|
}
|
|
3559
1861
|
}
|
|
3560
1862
|
);
|
|
3561
|
-
var
|
|
1863
|
+
var MoonUICollapsibleTrigger = t.forwardRef(({ className, children, variant, size, asChild, ...props }, ref) => {
|
|
3562
1864
|
if (asChild) {
|
|
3563
1865
|
return /* @__PURE__ */ jsx(
|
|
3564
1866
|
Trigger2,
|
|
@@ -3584,7 +1886,7 @@ var CollapsibleTrigger2 = t.forwardRef(({ className, children, variant, size, as
|
|
|
3584
1886
|
}
|
|
3585
1887
|
);
|
|
3586
1888
|
});
|
|
3587
|
-
|
|
1889
|
+
CollapsibleTrigger.displayName = Trigger2.displayName;
|
|
3588
1890
|
var collapsibleContentVariants = cva(
|
|
3589
1891
|
"overflow-hidden transition-all data-[state=closed]:animate-collapse-up data-[state=open]:animate-collapse-down",
|
|
3590
1892
|
{
|
|
@@ -3607,7 +1909,7 @@ var collapsibleContentVariants = cva(
|
|
|
3607
1909
|
}
|
|
3608
1910
|
}
|
|
3609
1911
|
);
|
|
3610
|
-
var
|
|
1912
|
+
var MoonUICollapsibleContent = t.forwardRef(({ className, children, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
3611
1913
|
Content2,
|
|
3612
1914
|
{
|
|
3613
1915
|
ref,
|
|
@@ -3616,7 +1918,7 @@ var CollapsibleContent2 = t.forwardRef(({ className, children, variant, size, ..
|
|
|
3616
1918
|
children: /* @__PURE__ */ jsx("div", { className: "p-4", children })
|
|
3617
1919
|
}
|
|
3618
1920
|
));
|
|
3619
|
-
|
|
1921
|
+
CollapsibleContent.displayName = Content2.displayName;
|
|
3620
1922
|
|
|
3621
1923
|
// ../../node_modules/cmdk/dist/chunk-NZJY6EH4.mjs
|
|
3622
1924
|
var U = 1;
|
|
@@ -4053,10 +2355,10 @@ function B2({ asChild: r, children: o }, n) {
|
|
|
4053
2355
|
return r && t.isValidElement(o) ? t.cloneElement(Me(o), { ref: o.ref }, n(o.props.children)) : n(o);
|
|
4054
2356
|
}
|
|
4055
2357
|
var Te = { position: "absolute", width: "1px", height: "1px", padding: "0", margin: "-1px", overflow: "hidden", clip: "rect(0, 0, 0, 0)", whiteSpace: "nowrap", borderWidth: "0" };
|
|
4056
|
-
var
|
|
4057
|
-
var
|
|
2358
|
+
var MoonUIDialog2 = DialogPrimitive.Root;
|
|
2359
|
+
var MoonUIDialogTrigger = DialogPrimitive.Trigger;
|
|
4058
2360
|
var DialogPortal = DialogPrimitive.Portal;
|
|
4059
|
-
var
|
|
2361
|
+
var MoonUIDialogClose = DialogPrimitive.Close;
|
|
4060
2362
|
var overlayVariants = cva(
|
|
4061
2363
|
"fixed inset-0 z-50 backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
|
4062
2364
|
{
|
|
@@ -4138,7 +2440,7 @@ var dialogContentVariants = cva(
|
|
|
4138
2440
|
}
|
|
4139
2441
|
}
|
|
4140
2442
|
);
|
|
4141
|
-
var
|
|
2443
|
+
var MoonUIDialogContent = t.forwardRef(
|
|
4142
2444
|
({
|
|
4143
2445
|
className,
|
|
4144
2446
|
children,
|
|
@@ -4223,7 +2525,7 @@ var DialogContent = t.forwardRef(
|
|
|
4223
2525
|
}
|
|
4224
2526
|
);
|
|
4225
2527
|
DialogContent.displayName = DialogPrimitive.Content.displayName;
|
|
4226
|
-
var
|
|
2528
|
+
var MoonUIDialogHeader = ({
|
|
4227
2529
|
className,
|
|
4228
2530
|
...props
|
|
4229
2531
|
}) => /* @__PURE__ */ jsx(
|
|
@@ -4236,8 +2538,8 @@ var DialogHeader = ({
|
|
|
4236
2538
|
...props
|
|
4237
2539
|
}
|
|
4238
2540
|
);
|
|
4239
|
-
|
|
4240
|
-
var
|
|
2541
|
+
MoonUIDialogHeader.displayName = "MoonUIDialogHeader";
|
|
2542
|
+
var MoonUIDialogFooter = ({
|
|
4241
2543
|
className,
|
|
4242
2544
|
...props
|
|
4243
2545
|
}) => /* @__PURE__ */ jsx(
|
|
@@ -4250,8 +2552,8 @@ var DialogFooter = ({
|
|
|
4250
2552
|
...props
|
|
4251
2553
|
}
|
|
4252
2554
|
);
|
|
4253
|
-
|
|
4254
|
-
var
|
|
2555
|
+
MoonUIDialogFooter.displayName = "MoonUIDialogFooter";
|
|
2556
|
+
var MoonUIDialogTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4255
2557
|
DialogPrimitive.Title,
|
|
4256
2558
|
{
|
|
4257
2559
|
ref,
|
|
@@ -4263,7 +2565,7 @@ var DialogTitle = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4263
2565
|
}
|
|
4264
2566
|
));
|
|
4265
2567
|
DialogTitle.displayName = DialogPrimitive.Title.displayName;
|
|
4266
|
-
var
|
|
2568
|
+
var MoonUIDialogDescription = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4267
2569
|
DialogPrimitive.Description,
|
|
4268
2570
|
{
|
|
4269
2571
|
ref,
|
|
@@ -4305,7 +2607,7 @@ var commandVariants = cva(
|
|
|
4305
2607
|
}
|
|
4306
2608
|
}
|
|
4307
2609
|
);
|
|
4308
|
-
var
|
|
2610
|
+
var MoonUICommand = t.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4309
2611
|
_e,
|
|
4310
2612
|
{
|
|
4311
2613
|
ref,
|
|
@@ -4319,15 +2621,15 @@ var CommandDialog = ({
|
|
|
4319
2621
|
commandClassName,
|
|
4320
2622
|
...props
|
|
4321
2623
|
}) => {
|
|
4322
|
-
return /* @__PURE__ */ jsx(
|
|
4323
|
-
/* @__PURE__ */ jsx(
|
|
2624
|
+
return /* @__PURE__ */ jsx(MoonUIDialog2, { ...props, children: /* @__PURE__ */ jsxs(MoonUIDialogContent, { className: "overflow-hidden p-0 shadow-lg", hideCloseButton: true, children: [
|
|
2625
|
+
/* @__PURE__ */ jsx(MoonUIDialogTitle, { className: "sr-only", children: "Command Menu" }),
|
|
4324
2626
|
/* @__PURE__ */ jsx(Command, { className: cn(
|
|
4325
2627
|
"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",
|
|
4326
2628
|
commandClassName
|
|
4327
2629
|
), children })
|
|
4328
2630
|
] }) });
|
|
4329
2631
|
};
|
|
4330
|
-
var
|
|
2632
|
+
var MoonUICommandInput = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "flex items-center border-b px-3", "cmdk-input-wrapper": "", children: [
|
|
4331
2633
|
/* @__PURE__ */ jsx(Search, { className: "mr-2 h-4 w-4 shrink-0 opacity-50" }),
|
|
4332
2634
|
/* @__PURE__ */ jsx(
|
|
4333
2635
|
_e.Input,
|
|
@@ -4342,7 +2644,7 @@ var CommandInput = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4342
2644
|
)
|
|
4343
2645
|
] }));
|
|
4344
2646
|
CommandInput.displayName = _e.Input.displayName;
|
|
4345
|
-
var
|
|
2647
|
+
var MoonUICommandList = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4346
2648
|
_e.List,
|
|
4347
2649
|
{
|
|
4348
2650
|
ref,
|
|
@@ -4351,7 +2653,7 @@ var CommandList = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4351
2653
|
}
|
|
4352
2654
|
));
|
|
4353
2655
|
CommandList.displayName = _e.List.displayName;
|
|
4354
|
-
var
|
|
2656
|
+
var MoonUICommandEmpty = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4355
2657
|
_e.Empty,
|
|
4356
2658
|
{
|
|
4357
2659
|
ref,
|
|
@@ -4360,7 +2662,7 @@ var CommandEmpty = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4360
2662
|
}
|
|
4361
2663
|
));
|
|
4362
2664
|
CommandEmpty.displayName = _e.Empty.displayName;
|
|
4363
|
-
var
|
|
2665
|
+
var MoonUICommandGroup = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4364
2666
|
_e.Group,
|
|
4365
2667
|
{
|
|
4366
2668
|
ref,
|
|
@@ -4372,7 +2674,7 @@ var CommandGroup = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
4372
2674
|
}
|
|
4373
2675
|
));
|
|
4374
2676
|
CommandGroup.displayName = _e.Group.displayName;
|
|
4375
|
-
var
|
|
2677
|
+
var MoonUICommandSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4376
2678
|
_e.Separator,
|
|
4377
2679
|
{
|
|
4378
2680
|
ref,
|
|
@@ -4381,7 +2683,7 @@ var CommandSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE
|
|
|
4381
2683
|
}
|
|
4382
2684
|
));
|
|
4383
2685
|
CommandSeparator.displayName = _e.Separator.displayName;
|
|
4384
|
-
var
|
|
2686
|
+
var MoonUICommandItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
4385
2687
|
_e.Item,
|
|
4386
2688
|
{
|
|
4387
2689
|
ref,
|
|
@@ -4393,7 +2695,7 @@ var CommandItem = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
4393
2695
|
}
|
|
4394
2696
|
));
|
|
4395
2697
|
CommandItem.displayName = _e.Item.displayName;
|
|
4396
|
-
var
|
|
2698
|
+
var MoonUICommandShortcut = ({
|
|
4397
2699
|
className,
|
|
4398
2700
|
...props
|
|
4399
2701
|
}) => {
|
|
@@ -4408,7 +2710,7 @@ var CommandShortcut = ({
|
|
|
4408
2710
|
}
|
|
4409
2711
|
);
|
|
4410
2712
|
};
|
|
4411
|
-
|
|
2713
|
+
MoonUICommandShortcut.displayName = "MoonUICommandShortcut";
|
|
4412
2714
|
var popoverContentVariants = cva(
|
|
4413
2715
|
"z-50 w-72 rounded-md border border-border bg-background p-4 shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95",
|
|
4414
2716
|
{
|
|
@@ -4458,10 +2760,10 @@ var popoverContentVariants = cva(
|
|
|
4458
2760
|
}
|
|
4459
2761
|
}
|
|
4460
2762
|
);
|
|
4461
|
-
var
|
|
4462
|
-
var
|
|
2763
|
+
var MoonUIPopover = PopoverPrimitive.Root;
|
|
2764
|
+
var MoonUIPopoverTrigger = PopoverPrimitive.Trigger;
|
|
4463
2765
|
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
4464
|
-
var
|
|
2766
|
+
var MoonUIPopoverContent = t.forwardRef(({
|
|
4465
2767
|
className,
|
|
4466
2768
|
variant,
|
|
4467
2769
|
size,
|
|
@@ -4614,10 +2916,10 @@ function DatePicker({
|
|
|
4614
2916
|
return false;
|
|
4615
2917
|
};
|
|
4616
2918
|
const displayValue = internalDate && isValid(internalDate) ? format(internalDate, formatString) : null;
|
|
4617
|
-
const iconElement = icon || /* @__PURE__ */ jsx(Calendar
|
|
4618
|
-
return /* @__PURE__ */ jsxs(
|
|
4619
|
-
/* @__PURE__ */ jsx(
|
|
4620
|
-
|
|
2919
|
+
const iconElement = icon || /* @__PURE__ */ jsx(Calendar, { className: "h-4 w-4" });
|
|
2920
|
+
return /* @__PURE__ */ jsxs(MoonUIPopover, { open, onOpenChange: setOpen, children: [
|
|
2921
|
+
/* @__PURE__ */ jsx(MoonUIPopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
2922
|
+
MoonUIButton2,
|
|
4621
2923
|
{
|
|
4622
2924
|
variant: variant === "minimal" ? "ghost" : variant || "outline",
|
|
4623
2925
|
className: cn(
|
|
@@ -4690,7 +2992,7 @@ function DatePicker({
|
|
|
4690
2992
|
}
|
|
4691
2993
|
) }),
|
|
4692
2994
|
/* @__PURE__ */ jsx(
|
|
4693
|
-
|
|
2995
|
+
MoonUIPopoverContent,
|
|
4694
2996
|
{
|
|
4695
2997
|
className: "w-[360px] p-0 shadow-xl rounded-2xl border-0 bg-background/95 backdrop-blur-sm",
|
|
4696
2998
|
align: "start",
|
|
@@ -4702,7 +3004,7 @@ function DatePicker({
|
|
|
4702
3004
|
className: "rounded-2xl bg-background overflow-hidden",
|
|
4703
3005
|
children: [
|
|
4704
3006
|
/* @__PURE__ */ jsx(
|
|
4705
|
-
|
|
3007
|
+
MoonUICalendar,
|
|
4706
3008
|
{
|
|
4707
3009
|
mode: "single",
|
|
4708
3010
|
selected: internalDate,
|
|
@@ -4714,7 +3016,7 @@ function DatePicker({
|
|
|
4714
3016
|
}
|
|
4715
3017
|
),
|
|
4716
3018
|
showTodayButton && /* @__PURE__ */ jsx("div", { className: "border-t px-4 py-3", children: /* @__PURE__ */ jsx(
|
|
4717
|
-
|
|
3019
|
+
MoonUIButton2,
|
|
4718
3020
|
{
|
|
4719
3021
|
variant: "ghost",
|
|
4720
3022
|
size: "sm",
|
|
@@ -4762,9 +3064,9 @@ function DateRangePicker({
|
|
|
4762
3064
|
formatString
|
|
4763
3065
|
)}`;
|
|
4764
3066
|
}, [internalRange, formatString, separator]);
|
|
4765
|
-
return /* @__PURE__ */ jsxs(
|
|
4766
|
-
/* @__PURE__ */ jsx(
|
|
4767
|
-
|
|
3067
|
+
return /* @__PURE__ */ jsxs(MoonUIPopover, { open, onOpenChange: setOpen, children: [
|
|
3068
|
+
/* @__PURE__ */ jsx(MoonUIPopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
3069
|
+
MoonUIButton2,
|
|
4768
3070
|
{
|
|
4769
3071
|
variant: props.variant === "minimal" ? "ghost" : props.variant || "outline",
|
|
4770
3072
|
className: cn(
|
|
@@ -4778,13 +3080,13 @@ function DateRangePicker({
|
|
|
4778
3080
|
),
|
|
4779
3081
|
disabled: props.disabled || props.readOnly,
|
|
4780
3082
|
children: [
|
|
4781
|
-
/* @__PURE__ */ jsx(Calendar
|
|
3083
|
+
/* @__PURE__ */ jsx(Calendar, { className: "mr-2 h-4 w-4" }),
|
|
4782
3084
|
/* @__PURE__ */ jsx("span", { className: "flex-1 truncate text-left", children: displayValue || placeholder })
|
|
4783
3085
|
]
|
|
4784
3086
|
}
|
|
4785
3087
|
) }),
|
|
4786
|
-
/* @__PURE__ */ jsx(
|
|
4787
|
-
|
|
3088
|
+
/* @__PURE__ */ jsx(MoonUIPopoverContent, { className: "w-auto p-0 shadow-xl rounded-2xl border-0 bg-background/95 backdrop-blur-sm", align: "start", sideOffset: 12, children: /* @__PURE__ */ jsx(
|
|
3089
|
+
MoonUICalendar,
|
|
4788
3090
|
{
|
|
4789
3091
|
mode: "range",
|
|
4790
3092
|
defaultMonth: internalRange?.from,
|
|
@@ -4920,9 +3222,9 @@ function MonthPicker({
|
|
|
4920
3222
|
setViewDate(newDate);
|
|
4921
3223
|
};
|
|
4922
3224
|
const displayValue = value ? format(value, formatString) : null;
|
|
4923
|
-
return /* @__PURE__ */ jsxs(
|
|
4924
|
-
/* @__PURE__ */ jsx(
|
|
4925
|
-
|
|
3225
|
+
return /* @__PURE__ */ jsxs(MoonUIPopover, { open, onOpenChange: setOpen, children: [
|
|
3226
|
+
/* @__PURE__ */ jsx(MoonUIPopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxs(
|
|
3227
|
+
MoonUIButton2,
|
|
4926
3228
|
{
|
|
4927
3229
|
variant: props.variant || "outline",
|
|
4928
3230
|
className: cn(
|
|
@@ -4936,15 +3238,15 @@ function MonthPicker({
|
|
|
4936
3238
|
),
|
|
4937
3239
|
disabled: props.disabled || props.readOnly,
|
|
4938
3240
|
children: [
|
|
4939
|
-
/* @__PURE__ */ jsx(Calendar
|
|
3241
|
+
/* @__PURE__ */ jsx(Calendar, { className: "mr-2 h-4 w-4" }),
|
|
4940
3242
|
displayValue || placeholder
|
|
4941
3243
|
]
|
|
4942
3244
|
}
|
|
4943
3245
|
) }),
|
|
4944
|
-
/* @__PURE__ */ jsx(
|
|
3246
|
+
/* @__PURE__ */ jsx(MoonUIPopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxs("div", { className: "p-3", children: [
|
|
4945
3247
|
/* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
4946
3248
|
/* @__PURE__ */ jsx(
|
|
4947
|
-
|
|
3249
|
+
MoonUIButton2,
|
|
4948
3250
|
{
|
|
4949
3251
|
variant: "outline",
|
|
4950
3252
|
size: "icon",
|
|
@@ -4954,7 +3256,7 @@ function MonthPicker({
|
|
|
4954
3256
|
),
|
|
4955
3257
|
/* @__PURE__ */ jsx("span", { className: "font-semibold", children: viewDate.getFullYear() }),
|
|
4956
3258
|
/* @__PURE__ */ jsx(
|
|
4957
|
-
|
|
3259
|
+
MoonUIButton2,
|
|
4958
3260
|
{
|
|
4959
3261
|
variant: "outline",
|
|
4960
3262
|
size: "icon",
|
|
@@ -4964,7 +3266,7 @@ function MonthPicker({
|
|
|
4964
3266
|
)
|
|
4965
3267
|
] }),
|
|
4966
3268
|
/* @__PURE__ */ jsx("div", { className: "grid grid-cols-3 gap-2", children: months.map((month, index) => /* @__PURE__ */ jsx(
|
|
4967
|
-
|
|
3269
|
+
MoonUIButton2,
|
|
4968
3270
|
{
|
|
4969
3271
|
variant: value && value.getMonth() === index ? "default" : "outline",
|
|
4970
3272
|
size: "sm",
|
|
@@ -4977,13 +3279,13 @@ function MonthPicker({
|
|
|
4977
3279
|
] }) })
|
|
4978
3280
|
] });
|
|
4979
3281
|
}
|
|
4980
|
-
var
|
|
4981
|
-
var
|
|
4982
|
-
var
|
|
4983
|
-
var
|
|
4984
|
-
var
|
|
4985
|
-
var
|
|
4986
|
-
var
|
|
3282
|
+
var MoonUIDropdownMenu = DropdownMenuPrimitive.Root;
|
|
3283
|
+
var MoonUIDropdownMenuTrigger = DropdownMenuPrimitive.Trigger;
|
|
3284
|
+
var MoonUIDropdownMenuGroup = DropdownMenuPrimitive.Group;
|
|
3285
|
+
var MoonUIDropdownMenuPortal = DropdownMenuPrimitive.Portal;
|
|
3286
|
+
var MoonUIDropdownMenuSub = DropdownMenuPrimitive.Sub;
|
|
3287
|
+
var MoonUIDropdownMenuRadioGroup = DropdownMenuPrimitive.RadioGroup;
|
|
3288
|
+
var MoonUIDropdownMenuSubTrigger = t.forwardRef(({ className, inset, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
4987
3289
|
DropdownMenuPrimitive.SubTrigger,
|
|
4988
3290
|
{
|
|
4989
3291
|
ref,
|
|
@@ -5000,7 +3302,7 @@ var DropdownMenuSubTrigger = t.forwardRef(({ className, inset, children, ...prop
|
|
|
5000
3302
|
}
|
|
5001
3303
|
));
|
|
5002
3304
|
DropdownMenuSubTrigger.displayName = DropdownMenuPrimitive.SubTrigger.displayName;
|
|
5003
|
-
var
|
|
3305
|
+
var MoonUIDropdownMenuSubContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5004
3306
|
DropdownMenuPrimitive.SubContent,
|
|
5005
3307
|
{
|
|
5006
3308
|
ref,
|
|
@@ -5012,7 +3314,7 @@ var DropdownMenuSubContent = t.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5012
3314
|
}
|
|
5013
3315
|
));
|
|
5014
3316
|
DropdownMenuSubContent.displayName = DropdownMenuPrimitive.SubContent.displayName;
|
|
5015
|
-
var
|
|
3317
|
+
var MoonUIDropdownMenuContent = t.forwardRef(({ className, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsx(DropdownMenuPrimitive.Portal, { children: /* @__PURE__ */ jsx(
|
|
5016
3318
|
DropdownMenuPrimitive.Content,
|
|
5017
3319
|
{
|
|
5018
3320
|
ref,
|
|
@@ -5025,7 +3327,7 @@ var DropdownMenuContent = t.forwardRef(({ className, sideOffset = 4, ...props },
|
|
|
5025
3327
|
}
|
|
5026
3328
|
) }));
|
|
5027
3329
|
DropdownMenuContent.displayName = DropdownMenuPrimitive.Content.displayName;
|
|
5028
|
-
var
|
|
3330
|
+
var MoonUIDropdownMenuItem = t.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5029
3331
|
DropdownMenuPrimitive.Item,
|
|
5030
3332
|
{
|
|
5031
3333
|
ref,
|
|
@@ -5038,7 +3340,7 @@ var DropdownMenuItem = t.forwardRef(({ className, inset, ...props }, ref) => /*
|
|
|
5038
3340
|
}
|
|
5039
3341
|
));
|
|
5040
3342
|
DropdownMenuItem.displayName = DropdownMenuPrimitive.Item.displayName;
|
|
5041
|
-
var
|
|
3343
|
+
var MoonUIDropdownMenuCheckboxItem = t.forwardRef(({ className, children, checked, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5042
3344
|
DropdownMenuPrimitive.CheckboxItem,
|
|
5043
3345
|
{
|
|
5044
3346
|
ref,
|
|
@@ -5055,7 +3357,7 @@ var DropdownMenuCheckboxItem = t.forwardRef(({ className, children, checked, ...
|
|
|
5055
3357
|
}
|
|
5056
3358
|
));
|
|
5057
3359
|
DropdownMenuCheckboxItem.displayName = DropdownMenuPrimitive.CheckboxItem.displayName;
|
|
5058
|
-
var
|
|
3360
|
+
var MoonUIDropdownMenuRadioItem = t.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5059
3361
|
DropdownMenuPrimitive.RadioItem,
|
|
5060
3362
|
{
|
|
5061
3363
|
ref,
|
|
@@ -5071,7 +3373,7 @@ var DropdownMenuRadioItem = t.forwardRef(({ className, children, ...props }, ref
|
|
|
5071
3373
|
}
|
|
5072
3374
|
));
|
|
5073
3375
|
DropdownMenuRadioItem.displayName = DropdownMenuPrimitive.RadioItem.displayName;
|
|
5074
|
-
var
|
|
3376
|
+
var MoonUIDropdownMenuLabel = t.forwardRef(({ className, inset, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5075
3377
|
DropdownMenuPrimitive.Label,
|
|
5076
3378
|
{
|
|
5077
3379
|
ref,
|
|
@@ -5084,7 +3386,7 @@ var DropdownMenuLabel = t.forwardRef(({ className, inset, ...props }, ref) => /*
|
|
|
5084
3386
|
}
|
|
5085
3387
|
));
|
|
5086
3388
|
DropdownMenuLabel.displayName = DropdownMenuPrimitive.Label.displayName;
|
|
5087
|
-
var
|
|
3389
|
+
var MoonUIDropdownMenuSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5088
3390
|
DropdownMenuPrimitive.Separator,
|
|
5089
3391
|
{
|
|
5090
3392
|
ref,
|
|
@@ -5093,7 +3395,7 @@ var DropdownMenuSeparator = t.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
5093
3395
|
}
|
|
5094
3396
|
));
|
|
5095
3397
|
DropdownMenuSeparator.displayName = DropdownMenuPrimitive.Separator.displayName;
|
|
5096
|
-
var
|
|
3398
|
+
var MoonUIDropdownMenuShortcut = ({
|
|
5097
3399
|
className,
|
|
5098
3400
|
...props
|
|
5099
3401
|
}) => {
|
|
@@ -5105,7 +3407,7 @@ var DropdownMenuShortcut = ({
|
|
|
5105
3407
|
}
|
|
5106
3408
|
);
|
|
5107
3409
|
};
|
|
5108
|
-
|
|
3410
|
+
MoonUIDropdownMenuShortcut.displayName = "MoonUIDropdownMenuShortcut";
|
|
5109
3411
|
var inputWrapperVariants = cva(
|
|
5110
3412
|
"group relative flex items-center w-full transition-colors",
|
|
5111
3413
|
{
|
|
@@ -5121,7 +3423,7 @@ var inputWrapperVariants = cva(
|
|
|
5121
3423
|
}
|
|
5122
3424
|
}
|
|
5123
3425
|
);
|
|
5124
|
-
|
|
3426
|
+
cva(
|
|
5125
3427
|
[
|
|
5126
3428
|
"w-full bg-background transition-all duration-200",
|
|
5127
3429
|
"text-foreground placeholder:text-muted-foreground dark:placeholder:text-gray-500",
|
|
@@ -5179,7 +3481,7 @@ var inputVariants = cva(
|
|
|
5179
3481
|
}
|
|
5180
3482
|
}
|
|
5181
3483
|
);
|
|
5182
|
-
var
|
|
3484
|
+
var MoonUIInput2 = t.forwardRef(
|
|
5183
3485
|
({
|
|
5184
3486
|
className,
|
|
5185
3487
|
wrapperClassName,
|
|
@@ -5249,11 +3551,11 @@ var Input = t.forwardRef(
|
|
|
5249
3551
|
] });
|
|
5250
3552
|
}
|
|
5251
3553
|
);
|
|
5252
|
-
|
|
5253
|
-
|
|
3554
|
+
MoonUIInput2.displayName = "MoonUIInput";
|
|
3555
|
+
cva(
|
|
5254
3556
|
"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"
|
|
5255
3557
|
);
|
|
5256
|
-
var
|
|
3558
|
+
var MoonUILabel2 = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5257
3559
|
LabelPrimitive.Root,
|
|
5258
3560
|
{
|
|
5259
3561
|
ref,
|
|
@@ -5261,8 +3563,8 @@ var Label2 = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
|
5261
3563
|
...props
|
|
5262
3564
|
}
|
|
5263
3565
|
));
|
|
5264
|
-
|
|
5265
|
-
var
|
|
3566
|
+
Label.displayName = LabelPrimitive.Root.displayName;
|
|
3567
|
+
var MoonUIPagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
5266
3568
|
"nav",
|
|
5267
3569
|
{
|
|
5268
3570
|
role: "navigation",
|
|
@@ -5271,7 +3573,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsx(
|
|
|
5271
3573
|
...props
|
|
5272
3574
|
}
|
|
5273
3575
|
);
|
|
5274
|
-
|
|
3576
|
+
MoonUIPagination.displayName = "MoonUIPagination";
|
|
5275
3577
|
var PaginationContent = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5276
3578
|
"ul",
|
|
5277
3579
|
{
|
|
@@ -5353,7 +3655,7 @@ var PaginationEllipsis = ({
|
|
|
5353
3655
|
}
|
|
5354
3656
|
);
|
|
5355
3657
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
5356
|
-
var
|
|
3658
|
+
var moonUIProgressVariants = cva(
|
|
5357
3659
|
"relative overflow-hidden bg-muted",
|
|
5358
3660
|
{
|
|
5359
3661
|
variants: {
|
|
@@ -5420,7 +3722,7 @@ var progressIndicatorVariants = cva(
|
|
|
5420
3722
|
}
|
|
5421
3723
|
}
|
|
5422
3724
|
);
|
|
5423
|
-
var
|
|
3725
|
+
var MoonUIProgress = t.forwardRef(({
|
|
5424
3726
|
className,
|
|
5425
3727
|
value = 0,
|
|
5426
3728
|
variant,
|
|
@@ -5473,7 +3775,7 @@ var Progress = t.forwardRef(({
|
|
|
5473
3775
|
)
|
|
5474
3776
|
] });
|
|
5475
3777
|
});
|
|
5476
|
-
|
|
3778
|
+
MoonUIProgress.displayName = "MoonUIProgress";
|
|
5477
3779
|
var radioGroupItemVariants = cva(
|
|
5478
3780
|
"aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
5479
3781
|
{
|
|
@@ -5497,7 +3799,7 @@ var radioGroupItemVariants = cva(
|
|
|
5497
3799
|
}
|
|
5498
3800
|
);
|
|
5499
3801
|
var RadioGroupContext = t.createContext({});
|
|
5500
|
-
var
|
|
3802
|
+
var MoonUIRadioGroup2 = t.forwardRef(
|
|
5501
3803
|
({ className, value, onValueChange, disabled, name, ...props }, ref) => {
|
|
5502
3804
|
return /* @__PURE__ */ jsx(RadioGroupContext.Provider, { value: { value, onValueChange, disabled, name }, children: /* @__PURE__ */ jsx(
|
|
5503
3805
|
"div",
|
|
@@ -5510,8 +3812,8 @@ var RadioGroup2 = t.forwardRef(
|
|
|
5510
3812
|
) });
|
|
5511
3813
|
}
|
|
5512
3814
|
);
|
|
5513
|
-
|
|
5514
|
-
var
|
|
3815
|
+
MoonUIRadioGroup2.displayName = "MoonUIRadioGroup";
|
|
3816
|
+
var MoonUIRadioGroupItem = t.forwardRef(({ className, variant, size, indicator, id, value, disabled, ...props }, ref) => {
|
|
5515
3817
|
const radioGroup = t.useContext(RadioGroupContext);
|
|
5516
3818
|
const generatedId = t.useId();
|
|
5517
3819
|
const radioId = id || generatedId;
|
|
@@ -5560,7 +3862,7 @@ var RadioGroupItem = t.forwardRef(({ className, variant, size, indicator, id, va
|
|
|
5560
3862
|
)
|
|
5561
3863
|
] });
|
|
5562
3864
|
});
|
|
5563
|
-
|
|
3865
|
+
MoonUIRadioGroupItem.displayName = "MoonUIRadioGroupItem";
|
|
5564
3866
|
var RadioLabel = t.forwardRef(
|
|
5565
3867
|
({ className, htmlFor, children, disabled = false, ...props }, ref) => {
|
|
5566
3868
|
return /* @__PURE__ */ jsx(
|
|
@@ -5602,11 +3904,11 @@ var RadioItemWithLabel = t.forwardRef(({
|
|
|
5602
3904
|
] });
|
|
5603
3905
|
});
|
|
5604
3906
|
RadioItemWithLabel.displayName = "RadioItemWithLabel";
|
|
5605
|
-
var
|
|
5606
|
-
|
|
5607
|
-
var
|
|
5608
|
-
var
|
|
5609
|
-
var
|
|
3907
|
+
var MoonUISelect = SelectPrimitive.Root;
|
|
3908
|
+
MoonUISelect.displayName = "MoonUISelect";
|
|
3909
|
+
var MoonUISelectGroup = SelectPrimitive.Group;
|
|
3910
|
+
var MoonUISelectValue = SelectPrimitive.Value;
|
|
3911
|
+
var MoonUISelectTrigger = t.forwardRef(({ className, children, variant = "standard", size = "md", error, success, loading, leftIcon, rightIcon, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5610
3912
|
SelectPrimitive.Trigger,
|
|
5611
3913
|
{
|
|
5612
3914
|
ref,
|
|
@@ -5674,7 +3976,7 @@ var SelectScrollDownButton = t.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
5674
3976
|
}
|
|
5675
3977
|
));
|
|
5676
3978
|
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
5677
|
-
var
|
|
3979
|
+
var MoonUISelectContent = t.forwardRef(({ className, children, position = "item-aligned", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(
|
|
5678
3980
|
SelectPrimitive.Content,
|
|
5679
3981
|
{
|
|
5680
3982
|
ref,
|
|
@@ -5711,7 +4013,7 @@ var SelectContent = t.forwardRef(({ className, children, position = "item-aligne
|
|
|
5711
4013
|
}
|
|
5712
4014
|
) }));
|
|
5713
4015
|
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
5714
|
-
var
|
|
4016
|
+
var MoonUISelectLabel = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5715
4017
|
SelectPrimitive.Label,
|
|
5716
4018
|
{
|
|
5717
4019
|
ref,
|
|
@@ -5720,7 +4022,7 @@ var SelectLabel = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
5720
4022
|
}
|
|
5721
4023
|
));
|
|
5722
4024
|
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
5723
|
-
var
|
|
4025
|
+
var MoonUISelectItem = t.forwardRef(({ className, children, variant = "default", size = "md", rightIcon, customIndicator, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
5724
4026
|
SelectPrimitive.Item,
|
|
5725
4027
|
{
|
|
5726
4028
|
ref,
|
|
@@ -5747,7 +4049,7 @@ var SelectItem = t.forwardRef(({ className, children, variant = "default", size
|
|
|
5747
4049
|
}
|
|
5748
4050
|
));
|
|
5749
4051
|
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
5750
|
-
var
|
|
4052
|
+
var MoonUISelectSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
5751
4053
|
SelectPrimitive.Separator,
|
|
5752
4054
|
{
|
|
5753
4055
|
ref,
|
|
@@ -5756,7 +4058,7 @@ var SelectSeparator = t.forwardRef(({ className, ...props }, ref) => /* @__PURE_
|
|
|
5756
4058
|
}
|
|
5757
4059
|
));
|
|
5758
4060
|
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
5759
|
-
var
|
|
4061
|
+
var moonUISeparatorVariants = cva(
|
|
5760
4062
|
"shrink-0 bg-border",
|
|
5761
4063
|
{
|
|
5762
4064
|
variants: {
|
|
@@ -5853,7 +4155,7 @@ var separatorVariants = cva(
|
|
|
5853
4155
|
}
|
|
5854
4156
|
}
|
|
5855
4157
|
);
|
|
5856
|
-
var
|
|
4158
|
+
var MoonUISeparator2 = t.forwardRef(
|
|
5857
4159
|
({
|
|
5858
4160
|
className,
|
|
5859
4161
|
orientation = "horizontal",
|
|
@@ -5875,8 +4177,8 @@ var Separator3 = t.forwardRef(
|
|
|
5875
4177
|
}
|
|
5876
4178
|
)
|
|
5877
4179
|
);
|
|
5878
|
-
|
|
5879
|
-
var
|
|
4180
|
+
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
|
4181
|
+
var moonUISkeletonVariants = cva(
|
|
5880
4182
|
"animate-pulse rounded-md",
|
|
5881
4183
|
{
|
|
5882
4184
|
variants: {
|
|
@@ -5910,7 +4212,7 @@ var skeletonVariants = cva(
|
|
|
5910
4212
|
}
|
|
5911
4213
|
}
|
|
5912
4214
|
);
|
|
5913
|
-
var
|
|
4215
|
+
var MoonUISkeleton = t.forwardRef(
|
|
5914
4216
|
({
|
|
5915
4217
|
className,
|
|
5916
4218
|
variant,
|
|
@@ -5983,7 +4285,7 @@ var Skeleton = t.forwardRef(
|
|
|
5983
4285
|
);
|
|
5984
4286
|
}
|
|
5985
4287
|
);
|
|
5986
|
-
|
|
4288
|
+
MoonUISkeleton.displayName = "MoonUISkeleton";
|
|
5987
4289
|
var SkeletonText = t.forwardRef(
|
|
5988
4290
|
({
|
|
5989
4291
|
className,
|
|
@@ -6125,7 +4427,7 @@ var SkeletonCard = t.forwardRef(
|
|
|
6125
4427
|
}
|
|
6126
4428
|
);
|
|
6127
4429
|
SkeletonCard.displayName = "SkeletonCard";
|
|
6128
|
-
|
|
4430
|
+
cva(
|
|
6129
4431
|
"relative flex w-full touch-none select-none items-center",
|
|
6130
4432
|
{
|
|
6131
4433
|
variants: {
|
|
@@ -6205,7 +4507,7 @@ var sliderThumbVariants = cva(
|
|
|
6205
4507
|
}
|
|
6206
4508
|
}
|
|
6207
4509
|
);
|
|
6208
|
-
var
|
|
4510
|
+
var MoonUISlider = t.forwardRef(({
|
|
6209
4511
|
className,
|
|
6210
4512
|
size,
|
|
6211
4513
|
trackVariant,
|
|
@@ -6359,8 +4661,8 @@ var Slider = t.forwardRef(({
|
|
|
6359
4661
|
)
|
|
6360
4662
|
] });
|
|
6361
4663
|
});
|
|
6362
|
-
|
|
6363
|
-
var
|
|
4664
|
+
MoonUISlider.displayName = "MoonUISlider";
|
|
4665
|
+
var MoonUISwitch = t.forwardRef(({ className, size = "md", variant = "primary", loading, leftIcon, rightIcon, description, ...props }, ref) => /* @__PURE__ */ jsxs("div", { className: "inline-flex items-center gap-2", children: [
|
|
6364
4666
|
leftIcon && /* @__PURE__ */ jsx("span", { className: "text-muted-foreground", children: leftIcon }),
|
|
6365
4667
|
/* @__PURE__ */ jsxs(
|
|
6366
4668
|
SwitchPrimitives.Root,
|
|
@@ -6430,7 +4732,7 @@ var tableVariants = cva(
|
|
|
6430
4732
|
}
|
|
6431
4733
|
}
|
|
6432
4734
|
);
|
|
6433
|
-
var
|
|
4735
|
+
var MoonUITable = t.forwardRef(({
|
|
6434
4736
|
className,
|
|
6435
4737
|
variant,
|
|
6436
4738
|
size,
|
|
@@ -6475,10 +4777,10 @@ var Table = t.forwardRef(({
|
|
|
6475
4777
|
)
|
|
6476
4778
|
] });
|
|
6477
4779
|
});
|
|
6478
|
-
|
|
6479
|
-
var
|
|
6480
|
-
|
|
6481
|
-
var
|
|
4780
|
+
MoonUITable.displayName = "MoonUITable";
|
|
4781
|
+
var MoonUITableHeader = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
4782
|
+
MoonUITableHeader.displayName = "MoonUITableHeader";
|
|
4783
|
+
var MoonUITableBody = t.forwardRef(({ className, emptyContent, emptyMessage = "No data available", children, ...props }, ref) => {
|
|
6482
4784
|
const hasChildren = t.Children.count(children) > 0;
|
|
6483
4785
|
return /* @__PURE__ */ jsx(
|
|
6484
4786
|
"tbody",
|
|
@@ -6490,8 +4792,8 @@ var TableBody = t.forwardRef(({ className, emptyContent, emptyMessage = "No data
|
|
|
6490
4792
|
}
|
|
6491
4793
|
);
|
|
6492
4794
|
});
|
|
6493
|
-
|
|
6494
|
-
var
|
|
4795
|
+
MoonUITableBody.displayName = "MoonUITableBody";
|
|
4796
|
+
var MoonUITableFooter = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6495
4797
|
"tfoot",
|
|
6496
4798
|
{
|
|
6497
4799
|
ref,
|
|
@@ -6499,8 +4801,8 @@ var TableFooter = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */
|
|
|
6499
4801
|
...props
|
|
6500
4802
|
}
|
|
6501
4803
|
));
|
|
6502
|
-
|
|
6503
|
-
var
|
|
4804
|
+
MoonUITableFooter.displayName = "MoonUITableFooter";
|
|
4805
|
+
var MoonUITableRow = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6504
4806
|
"tr",
|
|
6505
4807
|
{
|
|
6506
4808
|
ref,
|
|
@@ -6511,8 +4813,8 @@ var TableRow = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ js
|
|
|
6511
4813
|
...props
|
|
6512
4814
|
}
|
|
6513
4815
|
));
|
|
6514
|
-
|
|
6515
|
-
var
|
|
4816
|
+
MoonUITableRow.displayName = "MoonUITableRow";
|
|
4817
|
+
var MoonUITableHead = t.forwardRef(
|
|
6516
4818
|
({ className, sortable, sorted, onSort, children, ...props }, ref) => {
|
|
6517
4819
|
const renderSortIcon = () => {
|
|
6518
4820
|
if (!sortable)
|
|
@@ -6592,8 +4894,8 @@ var TableHead = t.forwardRef(
|
|
|
6592
4894
|
);
|
|
6593
4895
|
}
|
|
6594
4896
|
);
|
|
6595
|
-
|
|
6596
|
-
var
|
|
4897
|
+
MoonUITableHead.displayName = "MoonUITableHead";
|
|
4898
|
+
var MoonUITableCell = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6597
4899
|
"td",
|
|
6598
4900
|
{
|
|
6599
4901
|
ref,
|
|
@@ -6601,8 +4903,8 @@ var TableCell = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ j
|
|
|
6601
4903
|
...props
|
|
6602
4904
|
}
|
|
6603
4905
|
));
|
|
6604
|
-
|
|
6605
|
-
var
|
|
4906
|
+
MoonUITableCell.displayName = "MoonUITableCell";
|
|
4907
|
+
var MoonUITableCaption = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6606
4908
|
"caption",
|
|
6607
4909
|
{
|
|
6608
4910
|
ref,
|
|
@@ -6610,8 +4912,8 @@ var TableCaption = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
6610
4912
|
...props
|
|
6611
4913
|
}
|
|
6612
4914
|
));
|
|
6613
|
-
|
|
6614
|
-
var
|
|
4915
|
+
MoonUITableCaption.displayName = "MoonUITableCaption";
|
|
4916
|
+
var MoonUITabs = t.forwardRef(({ vertical = false, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6615
4917
|
TabsPrimitive.Root,
|
|
6616
4918
|
{
|
|
6617
4919
|
ref,
|
|
@@ -6646,7 +4948,7 @@ var tabsListVariants = cva(
|
|
|
6646
4948
|
}
|
|
6647
4949
|
}
|
|
6648
4950
|
);
|
|
6649
|
-
var
|
|
4951
|
+
var MoonUITabsList = t.forwardRef(({ className, variant, orientation, fullWidth, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6650
4952
|
TabsPrimitive.List,
|
|
6651
4953
|
{
|
|
6652
4954
|
ref,
|
|
@@ -6687,7 +4989,7 @@ var tabsTriggerVariants = cva(
|
|
|
6687
4989
|
}
|
|
6688
4990
|
}
|
|
6689
4991
|
);
|
|
6690
|
-
var
|
|
4992
|
+
var MoonUITabsTrigger = t.forwardRef(({
|
|
6691
4993
|
className,
|
|
6692
4994
|
variant,
|
|
6693
4995
|
size,
|
|
@@ -6718,7 +5020,7 @@ var TabsTrigger = t.forwardRef(({
|
|
|
6718
5020
|
}
|
|
6719
5021
|
));
|
|
6720
5022
|
TabsTrigger.displayName = TabsPrimitive.Trigger.displayName;
|
|
6721
|
-
var
|
|
5023
|
+
var MoonUITabsContent = t.forwardRef(({ className, animated = false, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6722
5024
|
TabsPrimitive.Content,
|
|
6723
5025
|
{
|
|
6724
5026
|
ref,
|
|
@@ -6731,7 +5033,7 @@ var TabsContent = t.forwardRef(({ className, animated = false, ...props }, ref)
|
|
|
6731
5033
|
}
|
|
6732
5034
|
));
|
|
6733
5035
|
TabsContent.displayName = TabsPrimitive.Content.displayName;
|
|
6734
|
-
var
|
|
5036
|
+
var MoonUITextarea = t.forwardRef(
|
|
6735
5037
|
({
|
|
6736
5038
|
className,
|
|
6737
5039
|
// Extract enhanced props to prevent them from being passed to DOM
|
|
@@ -6758,7 +5060,7 @@ var Textarea = t.forwardRef(
|
|
|
6758
5060
|
);
|
|
6759
5061
|
}
|
|
6760
5062
|
);
|
|
6761
|
-
|
|
5063
|
+
MoonUITextarea.displayName = "MoonUITextarea";
|
|
6762
5064
|
var ToastProvider = ToastPrimitives.Provider;
|
|
6763
5065
|
var ToastViewport = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
6764
5066
|
ToastPrimitives.Viewport,
|
|
@@ -6772,7 +5074,7 @@ var ToastViewport = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__
|
|
|
6772
5074
|
}
|
|
6773
5075
|
));
|
|
6774
5076
|
ToastViewport.displayName = ToastPrimitives.Viewport.displayName;
|
|
6775
|
-
|
|
5077
|
+
cva(
|
|
6776
5078
|
"group pointer-events-auto relative flex w-full items-center justify-between space-x-2 overflow-hidden rounded-md border p-4 pr-8 shadow-sm transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",
|
|
6777
5079
|
{
|
|
6778
5080
|
variants: {
|
|
@@ -6789,7 +5091,7 @@ var toastVariants = cva(
|
|
|
6789
5091
|
}
|
|
6790
5092
|
}
|
|
6791
5093
|
);
|
|
6792
|
-
var
|
|
5094
|
+
var MoonUIToast = t.forwardRef(({ className, variant, ...props }, ref) => {
|
|
6793
5095
|
return /* @__PURE__ */ jsx(
|
|
6794
5096
|
ToastPrimitives.Root,
|
|
6795
5097
|
{
|
|
@@ -7048,7 +5350,7 @@ function isFunction2(value) {
|
|
|
7048
5350
|
return typeof value === "function";
|
|
7049
5351
|
}
|
|
7050
5352
|
var NAME = "Toggle";
|
|
7051
|
-
var
|
|
5353
|
+
var Toggle2 = t.forwardRef((props, forwardedRef) => {
|
|
7052
5354
|
const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;
|
|
7053
5355
|
const [pressed, setPressed] = useControllableState2({
|
|
7054
5356
|
prop: pressedProp,
|
|
@@ -7073,9 +5375,9 @@ var Toggle = t.forwardRef((props, forwardedRef) => {
|
|
|
7073
5375
|
}
|
|
7074
5376
|
);
|
|
7075
5377
|
});
|
|
7076
|
-
|
|
7077
|
-
var Root15 =
|
|
7078
|
-
var
|
|
5378
|
+
Toggle2.displayName = NAME;
|
|
5379
|
+
var Root15 = Toggle2;
|
|
5380
|
+
var moonUIToggleVariants = cva(
|
|
7079
5381
|
"inline-flex items-center justify-center rounded-md text-sm font-medium ring-offset-background transition-colors hover:bg-muted hover:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=on]:bg-accent data-[state=on]:text-accent-foreground",
|
|
7080
5382
|
{
|
|
7081
5383
|
variants: {
|
|
@@ -7095,7 +5397,7 @@ var toggleVariants = cva(
|
|
|
7095
5397
|
}
|
|
7096
5398
|
}
|
|
7097
5399
|
);
|
|
7098
|
-
var
|
|
5400
|
+
var MoonUIToggle = t.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7099
5401
|
Root15,
|
|
7100
5402
|
{
|
|
7101
5403
|
ref,
|
|
@@ -7103,8 +5405,8 @@ var Toggle2 = t.forwardRef(({ className, variant, size, ...props }, ref) => /* @
|
|
|
7103
5405
|
...props
|
|
7104
5406
|
}
|
|
7105
5407
|
));
|
|
7106
|
-
|
|
7107
|
-
var
|
|
5408
|
+
Toggle.displayName = Root15.displayName;
|
|
5409
|
+
var MoonUITooltipProvider = TooltipPrimitive.Provider;
|
|
7108
5410
|
var tooltipVariants = cva(
|
|
7109
5411
|
"z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
7110
5412
|
{
|
|
@@ -7129,8 +5431,8 @@ var tooltipVariants = cva(
|
|
|
7129
5431
|
}
|
|
7130
5432
|
}
|
|
7131
5433
|
);
|
|
7132
|
-
var
|
|
7133
|
-
var
|
|
5434
|
+
var MoonUITooltip = TooltipPrimitive.Root;
|
|
5435
|
+
var MoonUITooltipTrigger = TooltipPrimitive.Trigger;
|
|
7134
5436
|
var TooltipArrow = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
7135
5437
|
TooltipPrimitive.Arrow,
|
|
7136
5438
|
{
|
|
@@ -7140,7 +5442,7 @@ var TooltipArrow = t.forwardRef(({ className, ...props }, ref) => /* @__PURE__ *
|
|
|
7140
5442
|
}
|
|
7141
5443
|
));
|
|
7142
5444
|
TooltipArrow.displayName = TooltipPrimitive.Arrow.displayName;
|
|
7143
|
-
var
|
|
5445
|
+
var MoonUITooltipContent = t.forwardRef(({ className, variant, size, showArrow = false, sideOffset = 4, ...props }, ref) => /* @__PURE__ */ jsxs(
|
|
7144
5446
|
TooltipPrimitive.Content,
|
|
7145
5447
|
{
|
|
7146
5448
|
ref,
|
|
@@ -7204,6 +5506,6 @@ var SimpleTooltip = t.forwardRef(
|
|
|
7204
5506
|
);
|
|
7205
5507
|
SimpleTooltip.displayName = "SimpleTooltip";
|
|
7206
5508
|
|
|
7207
|
-
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Alert, AlertDescription, AlertTitle, AspectRatio, Avatar, AvatarFallback, AvatarGroup, AvatarImage,
|
|
5509
|
+
export { MoonUIAccordion as Accordion, MoonUIAccordionContent as AccordionContent, MoonUIAccordionItem as AccordionItem, MoonUIAccordionTrigger as AccordionTrigger, MoonUIAlert as Alert, MoonUIAlertDescription as AlertDescription, MoonUIAlertTitle as AlertTitle, MoonUIAspectRatio as AspectRatio, MoonUIAvatar as Avatar, MoonUIAvatarFallback as AvatarFallback, AvatarGroup, MoonUIAvatarImage as AvatarImage, MoonUIBreadcrumb as Breadcrumb, MoonUIBreadcrumbEllipsis as BreadcrumbEllipsis, MoonUIBreadcrumbItem as BreadcrumbItem, MoonUIBreadcrumbLink as BreadcrumbLink, MoonUIBreadcrumbList as BreadcrumbList, MoonUIBreadcrumbPage as BreadcrumbPage, MoonUIBreadcrumbSeparator as BreadcrumbSeparator, MoonUIButton2 as Button, MoonUICalendar as Calendar, MoonUICard as Card, MoonUICardContent as CardContent, MoonUICardDescription as CardDescription, MoonUICardFooter as CardFooter, MoonUICardHeader as CardHeader, MoonUICardTitle as CardTitle, MoonUICheckbox2 as Checkbox, CheckboxGroup, CheckboxLabel, CheckboxWithLabel, MoonUICollapsible as Collapsible, MoonUICollapsibleContent as CollapsibleContent, MoonUICollapsibleTrigger as CollapsibleTrigger, MoonUICommand as Command, CommandDialog, MoonUICommandEmpty as CommandEmpty, MoonUICommandGroup as CommandGroup, MoonUICommandInput as CommandInput, MoonUICommandItem as CommandItem, MoonUICommandList as CommandList, MoonUICommandSeparator as CommandSeparator, MoonUICommandShortcut as CommandShortcut, DatePicker, DateRangePicker, DateTimePicker, MoonUIDialog2 as Dialog, MoonUIDialogClose as DialogClose, MoonUIDialogContent as DialogContent, MoonUIDialogDescription as DialogDescription, MoonUIDialogFooter as DialogFooter, DialogForm, MoonUIDialogHeader as DialogHeader, MoonUIDialogTitle as DialogTitle, MoonUIDialogTrigger as DialogTrigger, MoonUIDropdownMenu as DropdownMenu, MoonUIDropdownMenuCheckboxItem as DropdownMenuCheckboxItem, MoonUIDropdownMenuContent as DropdownMenuContent, MoonUIDropdownMenuGroup as DropdownMenuGroup, MoonUIDropdownMenuItem as DropdownMenuItem, MoonUIDropdownMenuLabel as DropdownMenuLabel, MoonUIDropdownMenuPortal as DropdownMenuPortal, MoonUIDropdownMenuRadioGroup as DropdownMenuRadioGroup, MoonUIDropdownMenuRadioItem as DropdownMenuRadioItem, MoonUIDropdownMenuSeparator as DropdownMenuSeparator, MoonUIDropdownMenuShortcut as DropdownMenuShortcut, MoonUIDropdownMenuSub as DropdownMenuSub, MoonUIDropdownMenuSubContent as DropdownMenuSubContent, MoonUIDropdownMenuSubTrigger as DropdownMenuSubTrigger, MoonUIDropdownMenuTrigger as DropdownMenuTrigger, MoonUIInput2 as Input, MoonUILabel2 as Label, MonthPicker, MoonUIAccordion, MoonUIAccordionContent, MoonUIAccordionItem, MoonUIAccordionTrigger, MoonUIAlert, MoonUIAlertDescription, MoonUIAlertTitle, MoonUIAspectRatio, MoonUIAvatar, MoonUIAvatarFallback, MoonUIAvatarImage, MoonUIBreadcrumb, MoonUIBreadcrumbEllipsis, MoonUIBreadcrumbItem, MoonUIBreadcrumbLink, MoonUIBreadcrumbList, MoonUIBreadcrumbPage, MoonUIBreadcrumbSeparator, MoonUIButton2 as MoonUIButton, MoonUICalendar, MoonUICard, MoonUICardContent, MoonUICardDescription, MoonUICardFooter, MoonUICardHeader, MoonUICardTitle, MoonUICheckbox2 as MoonUICheckbox, MoonUICollapsible, MoonUICollapsibleContent, MoonUICollapsibleTrigger, MoonUICommand, MoonUICommandEmpty, MoonUICommandGroup, MoonUICommandInput, MoonUICommandItem, MoonUICommandList, MoonUICommandSeparator, MoonUICommandShortcut, MoonUIDialog2 as MoonUIDialog, MoonUIDialogClose, MoonUIDialogContent, MoonUIDialogDescription, MoonUIDialogFooter, MoonUIDialogHeader, MoonUIDialogTitle, MoonUIDialogTrigger, MoonUIDropdownMenu, MoonUIDropdownMenuCheckboxItem, MoonUIDropdownMenuContent, MoonUIDropdownMenuGroup, MoonUIDropdownMenuItem, MoonUIDropdownMenuLabel, MoonUIDropdownMenuPortal, MoonUIDropdownMenuRadioGroup, MoonUIDropdownMenuRadioItem, MoonUIDropdownMenuSeparator, MoonUIDropdownMenuShortcut, MoonUIDropdownMenuSub, MoonUIDropdownMenuSubContent, MoonUIDropdownMenuSubTrigger, MoonUIDropdownMenuTrigger, MoonUIInput2 as MoonUIInput, MoonUILabel2 as MoonUILabel, MoonUIPagination, MoonUIPopover, MoonUIPopoverContent, MoonUIPopoverTrigger, MoonUIProgress, MoonUIRadioGroup2 as MoonUIRadioGroup, MoonUIRadioGroupItem, MoonUISelect, MoonUISelectContent, MoonUISelectGroup, MoonUISelectItem, MoonUISelectLabel, MoonUISelectSeparator, MoonUISelectTrigger, MoonUISelectValue, MoonUISeparator2 as MoonUISeparator, MoonUISkeleton, MoonUISlider, MoonUISwitch, MoonUITable, MoonUITableBody, MoonUITableCaption, MoonUITableCell, MoonUITableFooter, MoonUITableHead, MoonUITableHeader, MoonUITableRow, MoonUITabs, MoonUITabsContent, MoonUITabsList, MoonUITabsTrigger, MoonUITextarea, MoonUIToast, MoonUIToggle, MoonUITooltip, MoonUITooltipContent, MoonUITooltipProvider, MoonUITooltipTrigger, MoonUIPagination as Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, MoonUIPopover as Popover, PopoverAnchor, PopoverClose, MoonUIPopoverContent as PopoverContent, PopoverFooter, PopoverHeader, PopoverSeparator, MoonUIPopoverTrigger as PopoverTrigger, MoonUIProgress as Progress, MoonUIRadioGroup2 as RadioGroup, MoonUIRadioGroupItem as RadioGroupItem, RadioItemWithLabel, RadioLabel, MoonUISelect as Select, MoonUISelectContent as SelectContent, MoonUISelectGroup as SelectGroup, MoonUISelectItem as SelectItem, MoonUISelectLabel as SelectLabel, SelectScrollDownButton, SelectScrollUpButton, MoonUISelectSeparator as SelectSeparator, MoonUISelectTrigger as SelectTrigger, MoonUISelectValue as SelectValue, MoonUISeparator2 as Separator, SimpleTooltip, SkeletonAvatar, SkeletonCard, SkeletonText, MoonUISlider as Slider, MoonUISwitch as Switch, MoonUITable as Table, MoonUITableBody as TableBody, MoonUITableCaption as TableCaption, MoonUITableCell as TableCell, MoonUITableFooter as TableFooter, MoonUITableHead as TableHead, MoonUITableHeader as TableHeader, MoonUITableRow as TableRow, MoonUITabs as Tabs, MoonUITabsContent as TabsContent, MoonUITabsList as TabsList, MoonUITabsTrigger as TabsTrigger, MoonUITextarea as Textarea, MoonUIToast as Toast, ToastAction, ToastClose, ToastDescription, ToastProvider, ToastTitle, ToastViewport, Toaster, MoonUIToggle as Toggle, MoonUITooltip as Tooltip, TooltipArrow, MoonUITooltipContent as TooltipContent, MoonUITooltipProvider as TooltipProvider, MoonUITooltipTrigger as TooltipTrigger, moonUIAspectRatioVariants as aspectRatioVariants, moonUIBadgeVariants as badgeVariants, moonUIButtonVariants as buttonVariants, cn, collapsibleContentVariants, collapsibleTriggerVariants, formatCurrency, formatDate, generateId, getClientIP, moonUIAspectRatioVariants, moonUIBadgeVariants, moonUIButtonVariants, moonUIProgressVariants, moonUISeparatorVariants, moonUISkeletonVariants, moonUIToggleVariants, popoverContentVariants, moonUIProgressVariants as progressVariants, moonUISeparatorVariants as separatorVariants, moonUISkeletonVariants as skeletonVariants, toast, moonUIToggleVariants as toggleVariants, tooltipVariants, truncateText, useToast };
|
|
7208
5510
|
//# sourceMappingURL=out.js.map
|
|
7209
5511
|
//# sourceMappingURL=index.mjs.map
|