@moontra/moonui 2.1.9 → 2.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +1656 -0
- package/dist/index.d.ts +1656 -0
- package/dist/index.js +1847 -469
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1679 -471
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -4
- package/src/components/ui/accordion.tsx +1 -1
- package/src/components/ui/alert.tsx +123 -93
- package/src/components/ui/aspect-ratio.tsx +1 -1
- package/src/components/ui/avatar.tsx +8 -6
- package/src/components/ui/badge.tsx +20 -18
- package/src/components/ui/breadcrumb.tsx +12 -10
- package/src/components/ui/button.stories.tsx +4 -2
- package/src/components/ui/button.tsx +71 -68
- package/src/components/ui/calendar.tsx +2 -2
- package/src/components/ui/card-input.tsx +231 -0
- package/src/components/ui/card.stories.tsx +2 -0
- package/src/components/ui/card.tsx +9 -7
- package/src/components/ui/checkbox.tsx +1 -1
- package/src/components/ui/collapsible.tsx +3 -3
- package/src/components/ui/color-picker.tsx +2 -2
- package/src/components/ui/command.tsx +4 -4
- package/src/components/ui/data-table.stories.tsx +4 -2
- package/src/components/ui/data-table.tsx +8 -8
- package/src/components/ui/date-picker.stories.tsx +2 -0
- package/src/components/ui/date-picker.tsx +25 -15
- package/src/components/ui/dialog.tsx +2 -2
- package/src/components/ui/draggable-list.tsx +3 -1
- package/src/components/ui/dropdown-menu.tsx +2 -2
- package/src/components/ui/file-upload.tsx +2 -2
- package/src/components/ui/github-stars.tsx +1 -1
- package/src/components/ui/index.ts +357 -45
- package/src/components/ui/input.stories.tsx +2 -0
- package/src/components/ui/input.tsx +3 -1
- package/src/components/ui/locked-component.tsx +222 -0
- package/src/components/ui/moon-logo.tsx +1 -1
- package/src/components/ui/pagination.tsx +10 -8
- package/src/components/ui/phone-input.tsx +172 -0
- package/src/components/ui/popover-pro.tsx +424 -0
- package/src/components/ui/popover.tsx +3 -3
- package/src/components/ui/progress.tsx +1 -1
- package/src/components/ui/radio-group.tsx +1 -1
- package/src/components/ui/rich-text-editor/index.tsx +2 -1
- package/src/components/ui/scroll-area.tsx +48 -0
- package/src/components/ui/select.tsx +7 -3
- package/src/components/ui/separator.tsx +2 -2
- package/src/components/ui/skeleton.tsx +19 -7
- package/src/components/ui/slider.tsx +1 -1
- package/src/components/ui/swipeable-card.tsx +2 -0
- package/src/components/ui/switch.tsx +1 -1
- package/src/components/ui/table.tsx +7 -5
- package/src/components/ui/tabs.tsx +6 -1
- package/src/components/ui/tags-input.tsx +130 -0
- package/src/components/ui/textarea.tsx +3 -1
- package/src/components/ui/toast.tsx +5 -3
- package/src/components/ui/toggle.tsx +2 -3
- package/src/components/ui/tooltip.tsx +2 -5
- package/src/index.tsx +4 -46
- package/src/lib/micro-interactions.ts +2 -1
- package/src/lib/performance-profiler.ts +79 -0
- package/src/styles/index.css +315 -2
- package/src/use-performance-optimizer.ts +26 -26
- package/src/use-scroll-animation.ts +5 -7
package/dist/index.js
CHANGED
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
|
|
1
3
|
'use strict';
|
|
2
4
|
|
|
3
|
-
var clsx = require('clsx');
|
|
4
|
-
var tailwindMerge = require('tailwind-merge');
|
|
5
5
|
var t = require('react');
|
|
6
6
|
var AccordionPrimitive = require('@radix-ui/react-accordion');
|
|
7
7
|
var lucideReact = require('lucide-react');
|
|
8
|
+
var clsx = require('clsx');
|
|
9
|
+
var tailwindMerge = require('tailwind-merge');
|
|
8
10
|
var jsxRuntime = require('react/jsx-runtime');
|
|
9
11
|
var classVarianceAuthority = require('class-variance-authority');
|
|
10
12
|
var AvatarPrimitive = require('@radix-ui/react-avatar');
|
|
@@ -57,8 +59,6 @@ var TooltipPrimitive__namespace = /*#__PURE__*/_interopNamespace(TooltipPrimitiv
|
|
|
57
59
|
var SwitchPrimitives__namespace = /*#__PURE__*/_interopNamespace(SwitchPrimitives);
|
|
58
60
|
var ToastPrimitives__namespace = /*#__PURE__*/_interopNamespace(ToastPrimitives);
|
|
59
61
|
|
|
60
|
-
/** @license MoonUI v1.0.0 - MIT License - https://moonui.dev */
|
|
61
|
-
|
|
62
62
|
function cn(...inputs) {
|
|
63
63
|
return tailwindMerge.twMerge(clsx.clsx(inputs));
|
|
64
64
|
}
|
|
@@ -67,7 +67,7 @@ var AccordionItem = t__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
67
67
|
AccordionPrimitive__namespace.Item,
|
|
68
68
|
{
|
|
69
69
|
ref,
|
|
70
|
-
className: cn("border-b border-gray-200 dark:border-gray-800", className),
|
|
70
|
+
className: cn("moonui-theme", "border-b border-gray-200 dark:border-gray-800", className),
|
|
71
71
|
...props
|
|
72
72
|
}
|
|
73
73
|
));
|
|
@@ -141,7 +141,17 @@ var alertVariants = classVarianceAuthority.cva(
|
|
|
141
141
|
}
|
|
142
142
|
);
|
|
143
143
|
var Alert = t__namespace.forwardRef(
|
|
144
|
-
({
|
|
144
|
+
({
|
|
145
|
+
className,
|
|
146
|
+
variant = "default",
|
|
147
|
+
size,
|
|
148
|
+
radius,
|
|
149
|
+
hideIcon = false,
|
|
150
|
+
closable = false,
|
|
151
|
+
onClose,
|
|
152
|
+
children,
|
|
153
|
+
...props
|
|
154
|
+
}, ref) => {
|
|
145
155
|
const Icon2 = t__namespace.useMemo(() => {
|
|
146
156
|
switch (variant) {
|
|
147
157
|
case "success":
|
|
@@ -161,7 +171,16 @@ var Alert = t__namespace.forwardRef(
|
|
|
161
171
|
{
|
|
162
172
|
ref,
|
|
163
173
|
role: "alert",
|
|
164
|
-
className: cn(
|
|
174
|
+
className: cn(
|
|
175
|
+
"moonui-theme",
|
|
176
|
+
alertVariants({
|
|
177
|
+
variant,
|
|
178
|
+
size,
|
|
179
|
+
radius,
|
|
180
|
+
withClose: closable
|
|
181
|
+
}),
|
|
182
|
+
className
|
|
183
|
+
),
|
|
165
184
|
...props,
|
|
166
185
|
children: [
|
|
167
186
|
!hideIcon && /* @__PURE__ */ jsxRuntime.jsx(Icon2, { className: "h-5 w-5" }),
|
|
@@ -185,7 +204,11 @@ var AlertTitle = t__namespace.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
185
204
|
"h5",
|
|
186
205
|
{
|
|
187
206
|
ref,
|
|
188
|
-
className: cn(
|
|
207
|
+
className: cn(
|
|
208
|
+
"moonui-theme",
|
|
209
|
+
"font-semibold leading-tight tracking-tight mb-1",
|
|
210
|
+
className
|
|
211
|
+
),
|
|
189
212
|
...props
|
|
190
213
|
}
|
|
191
214
|
));
|
|
@@ -194,7 +217,11 @@ var AlertDescription = t__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
194
217
|
"div",
|
|
195
218
|
{
|
|
196
219
|
ref,
|
|
197
|
-
className: cn(
|
|
220
|
+
className: cn(
|
|
221
|
+
"moonui-theme",
|
|
222
|
+
"text-sm leading-5 text-muted-foreground",
|
|
223
|
+
className
|
|
224
|
+
),
|
|
198
225
|
...props
|
|
199
226
|
}
|
|
200
227
|
));
|
|
@@ -226,7 +253,7 @@ var AspectRatio = t__namespace.forwardRef(({ className, variant, radius, ratio =
|
|
|
226
253
|
"div",
|
|
227
254
|
{
|
|
228
255
|
ref,
|
|
229
|
-
className: cn(aspectRatioVariants({ variant, radius }), className),
|
|
256
|
+
className: cn("moonui-theme", aspectRatioVariants({ variant, radius }), className),
|
|
230
257
|
style: {
|
|
231
258
|
position: "relative",
|
|
232
259
|
paddingBottom: `${1 / ratio * 100}%`,
|
|
@@ -259,9 +286,9 @@ var avatarVariants = classVarianceAuthority.cva(
|
|
|
259
286
|
},
|
|
260
287
|
variant: {
|
|
261
288
|
default: "",
|
|
262
|
-
ring: "ring-2 ring-
|
|
263
|
-
ringOffset: "ring-2 ring-
|
|
264
|
-
border: "border-2 border-
|
|
289
|
+
ring: "ring-2 ring-border",
|
|
290
|
+
ringOffset: "ring-2 ring-border ring-offset-2 ring-offset-background",
|
|
291
|
+
border: "border-2 border-border"
|
|
265
292
|
}
|
|
266
293
|
},
|
|
267
294
|
defaultVariants: {
|
|
@@ -275,7 +302,7 @@ var Avatar = t__namespace.forwardRef(({ className, size, radius, variant, ...pro
|
|
|
275
302
|
AvatarPrimitive__namespace.Root,
|
|
276
303
|
{
|
|
277
304
|
ref,
|
|
278
|
-
className: cn(avatarVariants({ size, radius, variant }), className),
|
|
305
|
+
className: cn("moonui-theme", avatarVariants({ size, radius, variant }), className),
|
|
279
306
|
...props
|
|
280
307
|
}
|
|
281
308
|
));
|
|
@@ -284,7 +311,7 @@ var AvatarImage = t__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
284
311
|
AvatarPrimitive__namespace.Image,
|
|
285
312
|
{
|
|
286
313
|
ref,
|
|
287
|
-
className: cn("aspect-square h-full w-full", className),
|
|
314
|
+
className: cn("moonui-theme", "aspect-square h-full w-full", className),
|
|
288
315
|
...props
|
|
289
316
|
}
|
|
290
317
|
));
|
|
@@ -309,7 +336,7 @@ var AvatarGroup = t__namespace.forwardRef(
|
|
|
309
336
|
"div",
|
|
310
337
|
{
|
|
311
338
|
ref,
|
|
312
|
-
className: cn("flex items-center", className),
|
|
339
|
+
className: cn("moonui-theme", "flex items-center", className),
|
|
313
340
|
...props,
|
|
314
341
|
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex", children: [
|
|
315
342
|
visibleAvatars.map((avatar, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -343,7 +370,7 @@ var AvatarGroup = t__namespace.forwardRef(
|
|
|
343
370
|
AvatarGroup.displayName = "AvatarGroup";
|
|
344
371
|
var badgeVariants = classVarianceAuthority.cva(
|
|
345
372
|
[
|
|
346
|
-
"inline-flex items-center gap-1.5",
|
|
373
|
+
"inline-flex items-center justify-center gap-1.5",
|
|
347
374
|
"font-medium transition-colors duration-200",
|
|
348
375
|
"border focus:outline-none",
|
|
349
376
|
"focus-visible:ring-2 focus-visible:ring-offset-1"
|
|
@@ -352,23 +379,23 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
352
379
|
variants: {
|
|
353
380
|
variant: {
|
|
354
381
|
primary: [
|
|
355
|
-
"border-transparent bg-
|
|
356
|
-
"hover:bg-
|
|
357
|
-
"focus-visible:ring-
|
|
358
|
-
"dark:bg-
|
|
382
|
+
"border-transparent bg-gray-900 text-white",
|
|
383
|
+
"hover:bg-gray-800 dark:hover:bg-gray-700",
|
|
384
|
+
"focus-visible:ring-gray-500/30 dark:focus-visible:ring-gray-400/40",
|
|
385
|
+
"dark:bg-gray-700 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"
|
|
359
386
|
],
|
|
360
387
|
secondary: [
|
|
361
388
|
"border-transparent bg-secondary text-secondary-foreground",
|
|
362
|
-
"hover:bg-gray-200 dark:hover:bg-gray-
|
|
389
|
+
"hover:bg-gray-200 dark:hover:bg-gray-600",
|
|
363
390
|
"focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
|
|
364
|
-
"dark:bg-gray-
|
|
391
|
+
"dark:bg-gray-700/50 dark:text-gray-50 dark:shadow-inner dark:shadow-gray-950/10"
|
|
365
392
|
],
|
|
366
393
|
outline: [
|
|
367
|
-
"border-gray-200 dark:border-gray-
|
|
394
|
+
"border-gray-200 dark:border-gray-600",
|
|
368
395
|
"bg-transparent text-foreground",
|
|
369
|
-
"hover:border-gray-300 dark:hover:border-gray-
|
|
396
|
+
"hover:border-gray-300 dark:hover:border-gray-500",
|
|
370
397
|
"focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
|
|
371
|
-
"dark:text-gray-
|
|
398
|
+
"dark:text-gray-100 dark:bg-transparent dark:backdrop-blur-sm"
|
|
372
399
|
],
|
|
373
400
|
destructive: [
|
|
374
401
|
"border-transparent bg-error text-white",
|
|
@@ -389,11 +416,11 @@ var badgeVariants = classVarianceAuthority.cva(
|
|
|
389
416
|
"dark:bg-warning/90 dark:text-gray-900 dark:shadow-inner dark:shadow-warning/10"
|
|
390
417
|
],
|
|
391
418
|
ghost: [
|
|
392
|
-
"border-
|
|
393
|
-
"hover:bg-gray-100 dark:hover:bg-gray-800/
|
|
419
|
+
"border border-gray-200 bg-gray-50/50 text-gray-700",
|
|
420
|
+
"hover:bg-gray-100 dark:hover:bg-gray-800/60",
|
|
394
421
|
"focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
|
|
395
|
-
"dark:
|
|
396
|
-
"transition-
|
|
422
|
+
"dark:border-gray-700 dark:bg-gray-800/30 dark:text-gray-300",
|
|
423
|
+
"transition-all duration-200"
|
|
397
424
|
],
|
|
398
425
|
pro: [
|
|
399
426
|
"border-transparent bg-gradient-to-r from-purple-600 to-pink-600 text-white",
|
|
@@ -458,7 +485,7 @@ function Badge({
|
|
|
458
485
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
459
486
|
"div",
|
|
460
487
|
{
|
|
461
|
-
className: cn(badgeVariants({ variant, size, radius }), className),
|
|
488
|
+
className: cn("moonui-theme", badgeVariants({ variant, size, radius }), className),
|
|
462
489
|
"data-removable": removable ? "" : void 0,
|
|
463
490
|
...props,
|
|
464
491
|
children: [
|
|
@@ -472,9 +499,9 @@ function Badge({
|
|
|
472
499
|
"aria-hidden": "true"
|
|
473
500
|
}
|
|
474
501
|
),
|
|
475
|
-
autoLeftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex shrink-0", children: autoLeftIcon }),
|
|
476
|
-
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "
|
|
477
|
-
rightIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex shrink-0", children: rightIcon }),
|
|
502
|
+
autoLeftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex shrink-0 items-center", children: autoLeftIcon }),
|
|
503
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex items-center", children: autoChildren }),
|
|
504
|
+
rightIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-flex shrink-0 items-center", children: rightIcon }),
|
|
478
505
|
removable && onRemove && /* @__PURE__ */ jsxRuntime.jsx(
|
|
479
506
|
"button",
|
|
480
507
|
{
|
|
@@ -509,9 +536,9 @@ var breadcrumbVariants = classVarianceAuthority.cva(
|
|
|
509
536
|
{
|
|
510
537
|
variants: {
|
|
511
538
|
variant: {
|
|
512
|
-
default: "
|
|
513
|
-
muted: "text-muted-foreground
|
|
514
|
-
ghost: "text-foreground/60
|
|
539
|
+
default: "text-foreground transition-colors",
|
|
540
|
+
muted: "text-muted-foreground transition-colors",
|
|
541
|
+
ghost: "text-foreground/60 transition-colors"
|
|
515
542
|
},
|
|
516
543
|
size: {
|
|
517
544
|
default: "text-sm",
|
|
@@ -530,7 +557,7 @@ var Breadcrumb = t__namespace.forwardRef(
|
|
|
530
557
|
"nav",
|
|
531
558
|
{
|
|
532
559
|
ref,
|
|
533
|
-
className: cn(breadcrumbVariants({ variant, size }), className),
|
|
560
|
+
className: cn("moonui-theme", breadcrumbVariants({ variant, size }), className),
|
|
534
561
|
"aria-label": "breadcrumb",
|
|
535
562
|
...props
|
|
536
563
|
}
|
|
@@ -583,7 +610,7 @@ var BreadcrumbItem = t__namespace.forwardRef(
|
|
|
583
610
|
"li",
|
|
584
611
|
{
|
|
585
612
|
ref,
|
|
586
|
-
className: cn("inline-flex items-center gap-1.5", className),
|
|
613
|
+
className: cn("moonui-theme", "inline-flex items-center gap-1.5", className),
|
|
587
614
|
"aria-current": isCurrent ? "page" : void 0,
|
|
588
615
|
...props,
|
|
589
616
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -591,7 +618,7 @@ var BreadcrumbItem = t__namespace.forwardRef(
|
|
|
591
618
|
{
|
|
592
619
|
className: cn(
|
|
593
620
|
"transition-colors duration-200 hover:text-foreground",
|
|
594
|
-
isCurrent ? "font-medium text-foreground
|
|
621
|
+
isCurrent ? "font-medium text-foreground" : "text-muted-foreground hover:text-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30"
|
|
595
622
|
),
|
|
596
623
|
...itemProps,
|
|
597
624
|
children: props.children
|
|
@@ -611,7 +638,7 @@ var BreadcrumbSeparator = ({
|
|
|
611
638
|
{
|
|
612
639
|
role: "presentation",
|
|
613
640
|
"aria-hidden": "true",
|
|
614
|
-
className: cn("text-muted-foreground
|
|
641
|
+
className: cn("moonui-theme", "text-muted-foreground opacity-70", className),
|
|
615
642
|
...props,
|
|
616
643
|
children: children || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronRight, { className: "h-3.5 w-3.5" })
|
|
617
644
|
}
|
|
@@ -625,7 +652,7 @@ var BreadcrumbEllipsis = ({
|
|
|
625
652
|
{
|
|
626
653
|
role: "presentation",
|
|
627
654
|
"aria-hidden": "true",
|
|
628
|
-
className: cn("flex items-center text-muted-foreground
|
|
655
|
+
className: cn("moonui-theme", "flex items-center text-muted-foreground hover:text-foreground/80 transition-colors duration-200", className),
|
|
629
656
|
...props,
|
|
630
657
|
children: [
|
|
631
658
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" }),
|
|
@@ -641,7 +668,7 @@ var BreadcrumbLink = t__namespace.forwardRef(
|
|
|
641
668
|
ref,
|
|
642
669
|
href,
|
|
643
670
|
className: cn(
|
|
644
|
-
"transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-
|
|
671
|
+
"transition-colors duration-200 hover:text-foreground text-muted-foreground hover:underline hover:underline-offset-4 hover:decoration-muted-foreground/30",
|
|
645
672
|
className
|
|
646
673
|
),
|
|
647
674
|
...props
|
|
@@ -668,91 +695,89 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
668
695
|
"inline-flex items-center justify-center gap-2 whitespace-nowrap",
|
|
669
696
|
"font-medium relative",
|
|
670
697
|
"transition-all duration-200 ease-out",
|
|
671
|
-
"
|
|
672
|
-
/* Standart premium hover efekti */
|
|
698
|
+
"transform active:scale-[0.98]",
|
|
673
699
|
"focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",
|
|
674
|
-
"disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none"
|
|
700
|
+
"disabled:opacity-50 disabled:cursor-not-allowed disabled:pointer-events-none disabled:transform-none"
|
|
675
701
|
],
|
|
676
702
|
{
|
|
677
703
|
variants: {
|
|
678
704
|
variant: {
|
|
679
705
|
primary: [
|
|
680
706
|
"bg-primary text-primary-foreground",
|
|
681
|
-
"
|
|
682
|
-
"
|
|
683
|
-
"
|
|
684
|
-
"
|
|
685
|
-
"
|
|
707
|
+
"dark:bg-primary dark:text-primary-foreground",
|
|
708
|
+
"hover:bg-primary/90 dark:hover:bg-primary/90",
|
|
709
|
+
"active:bg-primary/80 dark:active:bg-primary/80",
|
|
710
|
+
"shadow-sm hover:shadow-md",
|
|
711
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
686
712
|
"transition-all duration-200"
|
|
687
713
|
],
|
|
688
714
|
secondary: [
|
|
689
|
-
"bg-
|
|
690
|
-
"hover:bg-gray-200 dark:hover:bg-gray-700/90",
|
|
691
|
-
"active:bg-gray-300 dark:active:bg-gray-600/90",
|
|
692
|
-
"border border-transparent dark:border-gray-700",
|
|
693
|
-
"focus-visible:ring-gray-400/30 dark:focus-visible:ring-gray-500/40",
|
|
715
|
+
"bg-gray-100 text-gray-900",
|
|
694
716
|
"dark:bg-gray-800 dark:text-gray-100",
|
|
695
|
-
"
|
|
717
|
+
"hover:bg-gray-200 dark:hover:bg-gray-700",
|
|
718
|
+
"active:bg-gray-300 dark:active:bg-gray-600",
|
|
719
|
+
"border border-gray-200 dark:border-gray-700",
|
|
720
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
721
|
+
"shadow-sm hover:shadow-md"
|
|
696
722
|
],
|
|
697
723
|
outline: [
|
|
698
724
|
"bg-background text-foreground",
|
|
699
|
-
"
|
|
700
|
-
"
|
|
701
|
-
"hover:bg-
|
|
702
|
-
"active:bg-
|
|
703
|
-
"focus-visible:ring-
|
|
704
|
-
"
|
|
705
|
-
"dark:shadow-sm dark:shadow-gray-950/10"
|
|
725
|
+
"dark:bg-background dark:text-foreground",
|
|
726
|
+
"border border-input dark:border-input",
|
|
727
|
+
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent dark:hover:text-accent-foreground",
|
|
728
|
+
"active:bg-accent/80 dark:active:bg-accent/80",
|
|
729
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
730
|
+
"transition-all duration-200"
|
|
706
731
|
],
|
|
707
732
|
ghost: [
|
|
708
|
-
"text-
|
|
709
|
-
"
|
|
710
|
-
"
|
|
711
|
-
"
|
|
712
|
-
"
|
|
713
|
-
"transition-
|
|
733
|
+
"text-gray-700",
|
|
734
|
+
"dark:text-gray-300",
|
|
735
|
+
"hover:bg-gray-100 hover:text-gray-900 dark:hover:bg-gray-800 dark:hover:text-gray-100",
|
|
736
|
+
"active:bg-gray-200 dark:active:bg-gray-700",
|
|
737
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
738
|
+
"transition-all duration-200"
|
|
714
739
|
],
|
|
715
740
|
destructive: [
|
|
716
|
-
"bg-
|
|
717
|
-
"
|
|
718
|
-
"
|
|
719
|
-
"
|
|
720
|
-
"
|
|
721
|
-
"
|
|
722
|
-
"transition-
|
|
741
|
+
"bg-destructive text-destructive-foreground",
|
|
742
|
+
"dark:bg-destructive dark:text-destructive-foreground",
|
|
743
|
+
"hover:bg-destructive/90 dark:hover:bg-destructive/90",
|
|
744
|
+
"active:bg-destructive/80 dark:active:bg-destructive/80",
|
|
745
|
+
"shadow-sm hover:shadow-md",
|
|
746
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
747
|
+
"transition-all duration-200"
|
|
723
748
|
],
|
|
724
749
|
success: [
|
|
725
|
-
"bg-success text-
|
|
726
|
-
"
|
|
727
|
-
"
|
|
728
|
-
"
|
|
729
|
-
"
|
|
730
|
-
"
|
|
731
|
-
"transition-
|
|
750
|
+
"bg-success text-success-foreground",
|
|
751
|
+
"dark:bg-success dark:text-success-foreground",
|
|
752
|
+
"hover:bg-success/90 dark:hover:bg-success/90",
|
|
753
|
+
"active:bg-success/80 dark:active:bg-success/80",
|
|
754
|
+
"shadow-sm hover:shadow-md",
|
|
755
|
+
"focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
756
|
+
"transition-all duration-200"
|
|
732
757
|
],
|
|
733
758
|
link: [
|
|
734
759
|
"text-primary bg-transparent",
|
|
735
760
|
"underline-offset-4 hover:underline",
|
|
736
|
-
"hover:text-primary
|
|
761
|
+
"hover:text-primary/80 active:text-primary/70",
|
|
737
762
|
"p-0 h-auto",
|
|
738
|
-
"dark:text-blue-400 dark:hover:text-blue-300",
|
|
739
|
-
"dark:active:text-blue-500",
|
|
740
763
|
"transition-colors duration-200"
|
|
741
764
|
],
|
|
742
765
|
gradient: [
|
|
743
|
-
"bg-gradient-to-r from-
|
|
744
|
-
"hover:from-
|
|
745
|
-
"active:from-
|
|
746
|
-
"shadow-
|
|
766
|
+
"bg-gradient-to-r from-purple-500 to-pink-500 text-white",
|
|
767
|
+
"hover:from-purple-600 hover:to-pink-600",
|
|
768
|
+
"active:from-purple-700 active:to-pink-700",
|
|
769
|
+
"shadow-xl shadow-purple-500/40",
|
|
770
|
+
"hover:shadow-2xl hover:shadow-purple-500/50",
|
|
747
771
|
"focus-visible:ring-purple-500/50",
|
|
748
772
|
"transition-all duration-300"
|
|
749
773
|
],
|
|
750
774
|
glow: [
|
|
751
|
-
"bg-
|
|
752
|
-
"shadow-
|
|
753
|
-
"hover:shadow-
|
|
754
|
-
"active:shadow-
|
|
755
|
-
"
|
|
775
|
+
"bg-blue-500 text-white",
|
|
776
|
+
"shadow-[0_0_30px_rgba(59,130,246,0.5)]",
|
|
777
|
+
"hover:shadow-[0_0_40px_rgba(59,130,246,0.7)]",
|
|
778
|
+
"active:shadow-[0_0_20px_rgba(59,130,246,0.4)]",
|
|
779
|
+
"hover:bg-blue-600",
|
|
780
|
+
"focus-visible:ring-blue-500/50",
|
|
756
781
|
"transition-all duration-300"
|
|
757
782
|
],
|
|
758
783
|
soft: [
|
|
@@ -776,29 +801,31 @@ var buttonVariants = classVarianceAuthority.cva(
|
|
|
776
801
|
"transition-all duration-200"
|
|
777
802
|
],
|
|
778
803
|
neon: [
|
|
779
|
-
"bg-transparent text-
|
|
780
|
-
"border-2 border-
|
|
781
|
-
"hover:bg-
|
|
782
|
-
"hover:shadow-[
|
|
783
|
-
"active:shadow-[
|
|
784
|
-
"focus-visible:ring-
|
|
804
|
+
"bg-transparent text-green-400",
|
|
805
|
+
"border-2 border-green-400",
|
|
806
|
+
"hover:bg-green-400 hover:text-gray-900",
|
|
807
|
+
"hover:shadow-[0_0_30px_rgba(74,222,128,0.6)]",
|
|
808
|
+
"active:shadow-[0_0_15px_rgba(74,222,128,0.4)]",
|
|
809
|
+
"focus-visible:ring-green-400/50",
|
|
785
810
|
"transition-all duration-300"
|
|
786
811
|
]
|
|
787
812
|
},
|
|
788
813
|
size: {
|
|
789
|
-
xs: "h-7 px-2.5 text-xs
|
|
790
|
-
sm: "h-8 px-3 text-sm
|
|
791
|
-
md: "h-10 px-4 text-base
|
|
792
|
-
lg: "h-12 px-6 text-lg
|
|
793
|
-
xl: "h-14 px-8 text-xl
|
|
794
|
-
icon: "h-10 w-10 p-2
|
|
795
|
-
"icon-sm": "h-8 w-8 p-1.5
|
|
796
|
-
"icon-lg": "h-12 w-12 p-3
|
|
814
|
+
xs: "h-7 px-2.5 text-xs",
|
|
815
|
+
sm: "h-8 px-3 text-sm",
|
|
816
|
+
md: "h-10 px-4 text-base",
|
|
817
|
+
lg: "h-12 px-6 text-lg",
|
|
818
|
+
xl: "h-14 px-8 text-xl",
|
|
819
|
+
icon: "h-10 w-10 p-2",
|
|
820
|
+
"icon-sm": "h-8 w-8 p-1.5",
|
|
821
|
+
"icon-lg": "h-12 w-12 p-3"
|
|
797
822
|
},
|
|
798
823
|
rounded: {
|
|
799
|
-
default: "",
|
|
824
|
+
default: "rounded-xl",
|
|
800
825
|
full: "rounded-full",
|
|
801
|
-
none: "rounded-none"
|
|
826
|
+
none: "rounded-none",
|
|
827
|
+
sm: "rounded-lg",
|
|
828
|
+
lg: "rounded-2xl"
|
|
802
829
|
},
|
|
803
830
|
fullWidth: {
|
|
804
831
|
true: "w-full"
|
|
@@ -831,7 +858,7 @@ var Button = t__namespace.forwardRef(
|
|
|
831
858
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
832
859
|
Comp,
|
|
833
860
|
{
|
|
834
|
-
className: cn(buttonVariants({ variant, size, rounded, fullWidth, className })),
|
|
861
|
+
className: cn("moonui-theme", buttonVariants({ variant, size, rounded, fullWidth, className })),
|
|
835
862
|
ref,
|
|
836
863
|
disabled: disabled || loading,
|
|
837
864
|
"data-loading": loading ? "" : void 0,
|
|
@@ -847,7 +874,7 @@ var Button = t__namespace.forwardRef(
|
|
|
847
874
|
}
|
|
848
875
|
);
|
|
849
876
|
Button.displayName = "Button";
|
|
850
|
-
|
|
877
|
+
classVarianceAuthority.cva("", {
|
|
851
878
|
variants: {
|
|
852
879
|
hover: {
|
|
853
880
|
lift: [
|
|
@@ -1037,7 +1064,7 @@ var Card = t__namespace.forwardRef(
|
|
|
1037
1064
|
framerMotion.motion.div,
|
|
1038
1065
|
{
|
|
1039
1066
|
ref,
|
|
1040
|
-
className: cn(cardVariants({ variant, size, radius, interactive, className })),
|
|
1067
|
+
className: cn("moonui-theme", cardVariants({ variant, size, radius, interactive, className })),
|
|
1041
1068
|
...interactionProps,
|
|
1042
1069
|
...props
|
|
1043
1070
|
}
|
|
@@ -1047,7 +1074,7 @@ var Card = t__namespace.forwardRef(
|
|
|
1047
1074
|
"div",
|
|
1048
1075
|
{
|
|
1049
1076
|
ref,
|
|
1050
|
-
className: cn(cardVariants({ variant, size, radius, interactive, className })),
|
|
1077
|
+
className: cn("moonui-theme", cardVariants({ variant, size, radius, interactive, className })),
|
|
1051
1078
|
...props
|
|
1052
1079
|
}
|
|
1053
1080
|
);
|
|
@@ -1058,7 +1085,7 @@ var CardHeader = t__namespace.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
1058
1085
|
"div",
|
|
1059
1086
|
{
|
|
1060
1087
|
ref,
|
|
1061
|
-
className: cn("flex flex-col space-y-1.5", className),
|
|
1088
|
+
className: cn("moonui-theme", "flex flex-col space-y-1.5", className),
|
|
1062
1089
|
...props
|
|
1063
1090
|
}
|
|
1064
1091
|
));
|
|
@@ -1067,7 +1094,7 @@ var CardTitle = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
1067
1094
|
"h3",
|
|
1068
1095
|
{
|
|
1069
1096
|
ref,
|
|
1070
|
-
className: cn("text-lg font-semibold leading-none tracking-tight", className),
|
|
1097
|
+
className: cn("moonui-theme", "text-lg font-semibold leading-none tracking-tight", className),
|
|
1071
1098
|
...props
|
|
1072
1099
|
}
|
|
1073
1100
|
));
|
|
@@ -1076,22 +1103,199 @@ var CardDescription = t__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
1076
1103
|
"p",
|
|
1077
1104
|
{
|
|
1078
1105
|
ref,
|
|
1079
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
1106
|
+
className: cn("moonui-theme", "text-sm text-muted-foreground", className),
|
|
1080
1107
|
...props
|
|
1081
1108
|
}
|
|
1082
1109
|
));
|
|
1083
1110
|
CardDescription.displayName = "CardDescription";
|
|
1084
|
-
var CardContent = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("pt-0", className), ...props }));
|
|
1111
|
+
var CardContent = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("div", { ref, className: cn("moonui-theme", "pt-0", className), ...props }));
|
|
1085
1112
|
CardContent.displayName = "CardContent";
|
|
1086
1113
|
var CardFooter = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
1087
1114
|
"div",
|
|
1088
1115
|
{
|
|
1089
1116
|
ref,
|
|
1090
|
-
className: cn("flex items-center pt-4", className),
|
|
1117
|
+
className: cn("moonui-theme", "flex items-center pt-4", className),
|
|
1091
1118
|
...props
|
|
1092
1119
|
}
|
|
1093
1120
|
));
|
|
1094
1121
|
CardFooter.displayName = "CardFooter";
|
|
1122
|
+
var getCardType = (number) => {
|
|
1123
|
+
const patterns = {
|
|
1124
|
+
visa: /^4/,
|
|
1125
|
+
mastercard: /^5[1-5]/,
|
|
1126
|
+
amex: /^3[47]/,
|
|
1127
|
+
discover: /^6(?:011|5)/,
|
|
1128
|
+
diners: /^3(?:0[0-5]|[68])/,
|
|
1129
|
+
jcb: /^35/
|
|
1130
|
+
};
|
|
1131
|
+
for (const [type, pattern] of Object.entries(patterns)) {
|
|
1132
|
+
if (pattern.test(number))
|
|
1133
|
+
return type;
|
|
1134
|
+
}
|
|
1135
|
+
return "unknown";
|
|
1136
|
+
};
|
|
1137
|
+
var formatCardNumber = (value, cardType) => {
|
|
1138
|
+
const cleaned = value.replace(/\s+/g, "");
|
|
1139
|
+
const groups = cardType === "amex" ? [4, 6, 5] : [4, 4, 4, 4];
|
|
1140
|
+
let formatted = "";
|
|
1141
|
+
let position = 0;
|
|
1142
|
+
for (const group of groups) {
|
|
1143
|
+
if (position >= cleaned.length)
|
|
1144
|
+
break;
|
|
1145
|
+
if (formatted)
|
|
1146
|
+
formatted += " ";
|
|
1147
|
+
formatted += cleaned.slice(position, position + group);
|
|
1148
|
+
position += group;
|
|
1149
|
+
}
|
|
1150
|
+
return formatted;
|
|
1151
|
+
};
|
|
1152
|
+
var CardNumberInput = t__namespace.forwardRef(
|
|
1153
|
+
({ className, value = "", onChange, showIcon = true, size, ...props }, ref) => {
|
|
1154
|
+
const [cardType, setCardType] = t__namespace.useState("unknown");
|
|
1155
|
+
const handleChange = (e) => {
|
|
1156
|
+
const rawValue = e.target.value.replace(/\D/g, "");
|
|
1157
|
+
const detectedType = getCardType(rawValue);
|
|
1158
|
+
setCardType(detectedType);
|
|
1159
|
+
const maxLength = detectedType === "amex" ? 15 : 16;
|
|
1160
|
+
const truncated = rawValue.slice(0, maxLength);
|
|
1161
|
+
const formatted = formatCardNumber(truncated, detectedType);
|
|
1162
|
+
onChange?.(truncated, detectedType);
|
|
1163
|
+
e.target.value = formatted;
|
|
1164
|
+
};
|
|
1165
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
1166
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1167
|
+
Input,
|
|
1168
|
+
{
|
|
1169
|
+
ref,
|
|
1170
|
+
type: "text",
|
|
1171
|
+
inputMode: "numeric",
|
|
1172
|
+
autoComplete: "cc-number",
|
|
1173
|
+
placeholder: "1234 5678 9012 3456",
|
|
1174
|
+
value: formatCardNumber(value, cardType),
|
|
1175
|
+
onChange: handleChange,
|
|
1176
|
+
className: cn(showIcon && "pl-10", className),
|
|
1177
|
+
...props
|
|
1178
|
+
}
|
|
1179
|
+
),
|
|
1180
|
+
showIcon && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.CreditCard, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" })
|
|
1181
|
+
] });
|
|
1182
|
+
}
|
|
1183
|
+
);
|
|
1184
|
+
CardNumberInput.displayName = "CardNumberInput";
|
|
1185
|
+
var CardExpiryInput = t__namespace.forwardRef(
|
|
1186
|
+
({ className, value = "", onChange, size, ...props }, ref) => {
|
|
1187
|
+
const handleChange = (e) => {
|
|
1188
|
+
let rawValue = e.target.value.replace(/\D/g, "");
|
|
1189
|
+
if (rawValue.length >= 2) {
|
|
1190
|
+
const month = parseInt(rawValue.slice(0, 2));
|
|
1191
|
+
if (month > 12) {
|
|
1192
|
+
rawValue = "12" + rawValue.slice(2);
|
|
1193
|
+
} else if (month === 0) {
|
|
1194
|
+
rawValue = "01" + rawValue.slice(2);
|
|
1195
|
+
}
|
|
1196
|
+
}
|
|
1197
|
+
rawValue = rawValue.slice(0, 4);
|
|
1198
|
+
let formatted = rawValue;
|
|
1199
|
+
if (rawValue.length >= 2) {
|
|
1200
|
+
formatted = rawValue.slice(0, 2) + "/" + rawValue.slice(2);
|
|
1201
|
+
}
|
|
1202
|
+
onChange?.(rawValue);
|
|
1203
|
+
e.target.value = formatted;
|
|
1204
|
+
};
|
|
1205
|
+
const formattedValue = value.length >= 2 ? value.slice(0, 2) + "/" + value.slice(2) : value;
|
|
1206
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1207
|
+
Input,
|
|
1208
|
+
{
|
|
1209
|
+
ref,
|
|
1210
|
+
type: "text",
|
|
1211
|
+
inputMode: "numeric",
|
|
1212
|
+
autoComplete: "cc-exp",
|
|
1213
|
+
placeholder: "MM/YY",
|
|
1214
|
+
value: formattedValue,
|
|
1215
|
+
onChange: handleChange,
|
|
1216
|
+
className,
|
|
1217
|
+
...props
|
|
1218
|
+
}
|
|
1219
|
+
);
|
|
1220
|
+
}
|
|
1221
|
+
);
|
|
1222
|
+
CardExpiryInput.displayName = "CardExpiryInput";
|
|
1223
|
+
var CardCVCInput = t__namespace.forwardRef(
|
|
1224
|
+
({ className, value = "", onChange, cardType = "unknown", size, ...props }, ref) => {
|
|
1225
|
+
const maxLength = cardType === "amex" ? 4 : 3;
|
|
1226
|
+
const handleChange = (e) => {
|
|
1227
|
+
const rawValue = e.target.value.replace(/\D/g, "").slice(0, maxLength);
|
|
1228
|
+
onChange?.(rawValue);
|
|
1229
|
+
};
|
|
1230
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1231
|
+
Input,
|
|
1232
|
+
{
|
|
1233
|
+
ref,
|
|
1234
|
+
type: "text",
|
|
1235
|
+
inputMode: "numeric",
|
|
1236
|
+
autoComplete: "cc-csc",
|
|
1237
|
+
placeholder: cardType === "amex" ? "1234" : "123",
|
|
1238
|
+
value,
|
|
1239
|
+
onChange: handleChange,
|
|
1240
|
+
maxLength,
|
|
1241
|
+
className,
|
|
1242
|
+
...props
|
|
1243
|
+
}
|
|
1244
|
+
);
|
|
1245
|
+
}
|
|
1246
|
+
);
|
|
1247
|
+
CardCVCInput.displayName = "CardCVCInput";
|
|
1248
|
+
var CardZipInput = t__namespace.forwardRef(
|
|
1249
|
+
({ className, value = "", onChange, format: format4 = "US", size, ...props }, ref) => {
|
|
1250
|
+
const handleChange = (e) => {
|
|
1251
|
+
let rawValue = e.target.value;
|
|
1252
|
+
switch (format4) {
|
|
1253
|
+
case "US":
|
|
1254
|
+
rawValue = rawValue.replace(/\D/g, "").slice(0, 5);
|
|
1255
|
+
break;
|
|
1256
|
+
case "CA":
|
|
1257
|
+
rawValue = rawValue.toUpperCase().replace(/[^A-Z0-9]/g, "").slice(0, 6);
|
|
1258
|
+
if (rawValue.length >= 3) {
|
|
1259
|
+
rawValue = rawValue.slice(0, 3) + " " + rawValue.slice(3);
|
|
1260
|
+
}
|
|
1261
|
+
break;
|
|
1262
|
+
case "UK":
|
|
1263
|
+
rawValue = rawValue.toUpperCase().replace(/[^A-Z0-9\s]/g, "").slice(0, 8);
|
|
1264
|
+
break;
|
|
1265
|
+
default:
|
|
1266
|
+
rawValue = rawValue.slice(0, 10);
|
|
1267
|
+
}
|
|
1268
|
+
onChange?.(rawValue.replace(/\s/g, ""));
|
|
1269
|
+
e.target.value = rawValue;
|
|
1270
|
+
};
|
|
1271
|
+
const getPlaceholder = () => {
|
|
1272
|
+
switch (format4) {
|
|
1273
|
+
case "US":
|
|
1274
|
+
return "12345";
|
|
1275
|
+
case "CA":
|
|
1276
|
+
return "K1A 0B1";
|
|
1277
|
+
case "UK":
|
|
1278
|
+
return "SW1A 1AA";
|
|
1279
|
+
default:
|
|
1280
|
+
return "Postal Code";
|
|
1281
|
+
}
|
|
1282
|
+
};
|
|
1283
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1284
|
+
Input,
|
|
1285
|
+
{
|
|
1286
|
+
ref,
|
|
1287
|
+
type: "text",
|
|
1288
|
+
autoComplete: "postal-code",
|
|
1289
|
+
placeholder: getPlaceholder(),
|
|
1290
|
+
value,
|
|
1291
|
+
onChange: handleChange,
|
|
1292
|
+
className,
|
|
1293
|
+
...props
|
|
1294
|
+
}
|
|
1295
|
+
);
|
|
1296
|
+
}
|
|
1297
|
+
);
|
|
1298
|
+
CardZipInput.displayName = "CardZipInput";
|
|
1095
1299
|
var checkboxVariants = classVarianceAuthority.cva(
|
|
1096
1300
|
"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",
|
|
1097
1301
|
{
|
|
@@ -1151,7 +1355,7 @@ var Checkbox = t__namespace.forwardRef(({
|
|
|
1151
1355
|
{
|
|
1152
1356
|
ref,
|
|
1153
1357
|
checked: effectiveChecked,
|
|
1154
|
-
className: cn(checkboxVariants({ variant, size, radius, animation }), className),
|
|
1358
|
+
className: cn("moonui-theme", checkboxVariants({ variant, size, radius, animation }), className),
|
|
1155
1359
|
...props,
|
|
1156
1360
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
1157
1361
|
CheckboxPrimitive__namespace.Indicator,
|
|
@@ -1242,7 +1446,7 @@ var CheckboxWithLabel = t__namespace.forwardRef(({
|
|
|
1242
1446
|
});
|
|
1243
1447
|
CheckboxWithLabel.displayName = "CheckboxWithLabel";
|
|
1244
1448
|
|
|
1245
|
-
// node_modules/@radix-ui/primitive/dist/index.mjs
|
|
1449
|
+
// ../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
1246
1450
|
function composeEventHandlers(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
1247
1451
|
return function handleEvent(event) {
|
|
1248
1452
|
originalEventHandler?.(event);
|
|
@@ -1736,7 +1940,7 @@ var CollapsibleTrigger2 = t__namespace.forwardRef(({ className, children, varian
|
|
|
1736
1940
|
Trigger2,
|
|
1737
1941
|
{
|
|
1738
1942
|
ref,
|
|
1739
|
-
className: cn(collapsibleTriggerVariants({ variant, size }), className),
|
|
1943
|
+
className: cn("moonui-theme", collapsibleTriggerVariants({ variant, size }), className),
|
|
1740
1944
|
asChild,
|
|
1741
1945
|
...props,
|
|
1742
1946
|
children
|
|
@@ -1747,7 +1951,7 @@ var CollapsibleTrigger2 = t__namespace.forwardRef(({ className, children, varian
|
|
|
1747
1951
|
Trigger2,
|
|
1748
1952
|
{
|
|
1749
1953
|
ref,
|
|
1750
|
-
className: cn(collapsibleTriggerVariants({ variant, size }), className),
|
|
1954
|
+
className: cn("moonui-theme", collapsibleTriggerVariants({ variant, size }), className),
|
|
1751
1955
|
...props,
|
|
1752
1956
|
children: [
|
|
1753
1957
|
children,
|
|
@@ -1783,7 +1987,7 @@ var CollapsibleContent2 = t__namespace.forwardRef(({ className, children, varian
|
|
|
1783
1987
|
Content2,
|
|
1784
1988
|
{
|
|
1785
1989
|
ref,
|
|
1786
|
-
className: cn(collapsibleContentVariants({ variant, size }), className),
|
|
1990
|
+
className: cn("moonui-theme", collapsibleContentVariants({ variant, size }), className),
|
|
1787
1991
|
...props,
|
|
1788
1992
|
children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-4", children })
|
|
1789
1993
|
}
|
|
@@ -1883,7 +2087,7 @@ var Input = t__namespace.forwardRef(
|
|
|
1883
2087
|
const showMessage = alwaysShowMessage || error || success;
|
|
1884
2088
|
const messageType = error ? "error" : success ? "success" : "normal";
|
|
1885
2089
|
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1.5 w-full", children: [
|
|
1886
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn(inputWrapperVariants({ size }), wrapperClassName), children: [
|
|
2090
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("moonui-theme", inputWrapperVariants({ size }), wrapperClassName), children: [
|
|
1887
2091
|
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute left-3 text-gray-500 flex items-center justify-center pointer-events-none", children: loading ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-4 w-4 animate-spin" }) : leftIcon }),
|
|
1888
2092
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
1889
2093
|
"input",
|
|
@@ -2044,7 +2248,7 @@ var PopoverClose = PopoverPrimitive__namespace.Close;
|
|
|
2044
2248
|
var PopoverSeparator = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2045
2249
|
"div",
|
|
2046
2250
|
{
|
|
2047
|
-
className: cn("my-2 h-px bg-border", className),
|
|
2251
|
+
className: cn("moonui-theme", "my-2 h-px bg-border", className),
|
|
2048
2252
|
...props
|
|
2049
2253
|
}
|
|
2050
2254
|
);
|
|
@@ -2052,7 +2256,7 @@ PopoverSeparator.displayName = "PopoverSeparator";
|
|
|
2052
2256
|
var PopoverHeader = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2053
2257
|
"div",
|
|
2054
2258
|
{
|
|
2055
|
-
className: cn("-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border", className),
|
|
2259
|
+
className: cn("moonui-theme", "-mx-4 -mt-4 mb-3 px-4 pt-4 pb-3 border-b border-border", className),
|
|
2056
2260
|
...props
|
|
2057
2261
|
}
|
|
2058
2262
|
);
|
|
@@ -2060,7 +2264,7 @@ PopoverHeader.displayName = "PopoverHeader";
|
|
|
2060
2264
|
var PopoverFooter = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2061
2265
|
"div",
|
|
2062
2266
|
{
|
|
2063
|
-
className: cn("-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border", className),
|
|
2267
|
+
className: cn("moonui-theme", "-mx-4 -mb-4 mt-3 px-4 pt-3 pb-4 border-t border-border", className),
|
|
2064
2268
|
...props
|
|
2065
2269
|
}
|
|
2066
2270
|
);
|
|
@@ -2069,6 +2273,7 @@ var Tabs = t__namespace.forwardRef(({ vertical = false, ...props }, ref) => /* @
|
|
|
2069
2273
|
TabsPrimitive__namespace.Root,
|
|
2070
2274
|
{
|
|
2071
2275
|
ref,
|
|
2276
|
+
className: cn("moonui-theme", props.className),
|
|
2072
2277
|
orientation: vertical ? "vertical" : "horizontal",
|
|
2073
2278
|
...props
|
|
2074
2279
|
}
|
|
@@ -2104,7 +2309,7 @@ var TabsList = t__namespace.forwardRef(({ className, variant, orientation, fullW
|
|
|
2104
2309
|
TabsPrimitive__namespace.List,
|
|
2105
2310
|
{
|
|
2106
2311
|
ref,
|
|
2107
|
-
className: cn(tabsListVariants({ variant, orientation, fullWidth, className })),
|
|
2312
|
+
className: cn("moonui-theme", tabsListVariants({ variant, orientation, fullWidth, className })),
|
|
2108
2313
|
...props
|
|
2109
2314
|
}
|
|
2110
2315
|
));
|
|
@@ -2158,6 +2363,7 @@ var TabsTrigger = t__namespace.forwardRef(({
|
|
|
2158
2363
|
{
|
|
2159
2364
|
ref,
|
|
2160
2365
|
className: cn(
|
|
2366
|
+
"moonui-theme",
|
|
2161
2367
|
tabsTriggerVariants({ variant, size, orientation, fullWidth }),
|
|
2162
2368
|
fadeTabs && "data-[state=inactive]:opacity-60",
|
|
2163
2369
|
className
|
|
@@ -2177,6 +2383,7 @@ var TabsContent = t__namespace.forwardRef(({ className, animated = false, ...pro
|
|
|
2177
2383
|
{
|
|
2178
2384
|
ref,
|
|
2179
2385
|
className: cn(
|
|
2386
|
+
"moonui-theme",
|
|
2180
2387
|
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
|
2181
2388
|
animated && "data-[state=active]:animate-fadeIn data-[state=inactive]:animate-fadeOut",
|
|
2182
2389
|
className
|
|
@@ -2367,7 +2574,7 @@ var Slider = t__namespace.forwardRef(({
|
|
|
2367
2574
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2368
2575
|
"div",
|
|
2369
2576
|
{
|
|
2370
|
-
className: cn(sliderVariants({ size }), className),
|
|
2577
|
+
className: cn("moonui-theme", sliderVariants({ size }), className),
|
|
2371
2578
|
"data-disabled": disabled ? true : void 0,
|
|
2372
2579
|
children: [
|
|
2373
2580
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -2947,7 +3154,7 @@ function SimpleColorPicker({
|
|
|
2947
3154
|
default: "h-8 w-8",
|
|
2948
3155
|
lg: "h-10 w-10"
|
|
2949
3156
|
};
|
|
2950
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("flex flex-wrap gap-2", className), children: colors.map((color) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3157
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("moonui-theme", "flex flex-wrap gap-2", className), children: colors.map((color) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2951
3158
|
"button",
|
|
2952
3159
|
{
|
|
2953
3160
|
className: cn(
|
|
@@ -2972,7 +3179,7 @@ function GradientPicker({
|
|
|
2972
3179
|
setGradient(newGradient);
|
|
2973
3180
|
onChange?.(newGradient);
|
|
2974
3181
|
};
|
|
2975
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-4", className), children: [
|
|
3182
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("moonui-theme", "space-y-4", className), children: [
|
|
2976
3183
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2977
3184
|
"div",
|
|
2978
3185
|
{
|
|
@@ -3056,85 +3263,6 @@ function D(_) {
|
|
|
3056
3263
|
function W(_, C, h) {
|
|
3057
3264
|
return _ = h && h.length > 0 ? `${_ + " " + h.join(" ")}` : _, G(_, C, D(_), D(C), 0, 0, {});
|
|
3058
3265
|
}
|
|
3059
|
-
var NODES2 = [
|
|
3060
|
-
"a",
|
|
3061
|
-
"button",
|
|
3062
|
-
"div",
|
|
3063
|
-
"form",
|
|
3064
|
-
"h2",
|
|
3065
|
-
"h3",
|
|
3066
|
-
"img",
|
|
3067
|
-
"input",
|
|
3068
|
-
"label",
|
|
3069
|
-
"li",
|
|
3070
|
-
"nav",
|
|
3071
|
-
"ol",
|
|
3072
|
-
"p",
|
|
3073
|
-
"select",
|
|
3074
|
-
"span",
|
|
3075
|
-
"svg",
|
|
3076
|
-
"ul"
|
|
3077
|
-
];
|
|
3078
|
-
var Primitive2 = NODES2.reduce((primitive, node) => {
|
|
3079
|
-
const Slot = reactSlot.createSlot(`Primitive.${node}`);
|
|
3080
|
-
const Node = t__namespace.forwardRef((props, forwardedRef) => {
|
|
3081
|
-
const { asChild, ...primitiveProps } = props;
|
|
3082
|
-
const Comp = asChild ? Slot : node;
|
|
3083
|
-
if (typeof window !== "undefined") {
|
|
3084
|
-
window[Symbol.for("radix-ui")] = true;
|
|
3085
|
-
}
|
|
3086
|
-
return /* @__PURE__ */ jsxRuntime.jsx(Comp, { ...primitiveProps, ref: forwardedRef });
|
|
3087
|
-
});
|
|
3088
|
-
Node.displayName = `Primitive.${node}`;
|
|
3089
|
-
return { ...primitive, [node]: Node };
|
|
3090
|
-
}, {});
|
|
3091
|
-
var useLayoutEffect22 = globalThis?.document ? t__namespace.useLayoutEffect : () => {
|
|
3092
|
-
};
|
|
3093
|
-
|
|
3094
|
-
// ../../node_modules/@radix-ui/react-id/dist/index.mjs
|
|
3095
|
-
var useReactId2 = t__namespace[" useId ".trim().toString()] || (() => void 0);
|
|
3096
|
-
var count2 = 0;
|
|
3097
|
-
function useId3(deterministicId) {
|
|
3098
|
-
const [id, setId] = t__namespace.useState(useReactId2());
|
|
3099
|
-
useLayoutEffect22(() => {
|
|
3100
|
-
if (!deterministicId)
|
|
3101
|
-
setId((reactId) => reactId ?? String(count2++));
|
|
3102
|
-
}, [deterministicId]);
|
|
3103
|
-
return deterministicId || (id ? `radix-${id}` : "");
|
|
3104
|
-
}
|
|
3105
|
-
function setRef2(ref, value) {
|
|
3106
|
-
if (typeof ref === "function") {
|
|
3107
|
-
return ref(value);
|
|
3108
|
-
} else if (ref !== null && ref !== void 0) {
|
|
3109
|
-
ref.current = value;
|
|
3110
|
-
}
|
|
3111
|
-
}
|
|
3112
|
-
function composeRefs2(...refs) {
|
|
3113
|
-
return (node) => {
|
|
3114
|
-
let hasCleanup = false;
|
|
3115
|
-
const cleanups = refs.map((ref) => {
|
|
3116
|
-
const cleanup = setRef2(ref, node);
|
|
3117
|
-
if (!hasCleanup && typeof cleanup == "function") {
|
|
3118
|
-
hasCleanup = true;
|
|
3119
|
-
}
|
|
3120
|
-
return cleanup;
|
|
3121
|
-
});
|
|
3122
|
-
if (hasCleanup) {
|
|
3123
|
-
return () => {
|
|
3124
|
-
for (let i = 0; i < cleanups.length; i++) {
|
|
3125
|
-
const cleanup = cleanups[i];
|
|
3126
|
-
if (typeof cleanup == "function") {
|
|
3127
|
-
cleanup();
|
|
3128
|
-
} else {
|
|
3129
|
-
setRef2(refs[i], null);
|
|
3130
|
-
}
|
|
3131
|
-
}
|
|
3132
|
-
};
|
|
3133
|
-
}
|
|
3134
|
-
};
|
|
3135
|
-
}
|
|
3136
|
-
|
|
3137
|
-
// ../../node_modules/cmdk/dist/index.mjs
|
|
3138
3266
|
var N = '[cmdk-group=""]';
|
|
3139
3267
|
var Y2 = '[cmdk-group-items=""]';
|
|
3140
3268
|
var be = '[cmdk-group-heading=""]';
|
|
@@ -3152,7 +3280,7 @@ var me = t__namespace.forwardRef((r, o) => {
|
|
|
3152
3280
|
let n = L(() => {
|
|
3153
3281
|
var e, a;
|
|
3154
3282
|
return { search: "", value: (a = (e = r.value) != null ? e : r.defaultValue) != null ? a : "", selectedItemId: void 0, filtered: { count: 0, items: /* @__PURE__ */ new Map(), groups: /* @__PURE__ */ new Set() } };
|
|
3155
|
-
}), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r, $2 =
|
|
3283
|
+
}), u2 = L(() => /* @__PURE__ */ new Set()), c = L(() => /* @__PURE__ */ new Map()), d = L(() => /* @__PURE__ */ new Map()), f = L(() => /* @__PURE__ */ new Set()), p2 = pe(r), { label: b, children: m2, value: R, onValueChange: x, filter: C, shouldFilter: S, loop: A, disablePointerSelection: ge = false, vimBindings: j = true, ...O } = r, $2 = useId2(), q = useId2(), _ = useId2(), I = t__namespace.useRef(null), v = ke();
|
|
3156
3284
|
k2(() => {
|
|
3157
3285
|
if (R !== void 0) {
|
|
3158
3286
|
let e = R.trim();
|
|
@@ -3267,7 +3395,7 @@ var me = t__namespace.forwardRef((r, o) => {
|
|
|
3267
3395
|
var e;
|
|
3268
3396
|
return Array.from(((e = I.current) == null ? void 0 : e.querySelectorAll(ce)) || []);
|
|
3269
3397
|
}
|
|
3270
|
-
function
|
|
3398
|
+
function X8(e) {
|
|
3271
3399
|
let s = V()[e];
|
|
3272
3400
|
s && E.setState("value", s.getAttribute(T));
|
|
3273
3401
|
}
|
|
@@ -3282,12 +3410,12 @@ var me = t__namespace.forwardRef((r, o) => {
|
|
|
3282
3410
|
s = e > 0 ? we(s, N) : De(s, N), i = s == null ? void 0 : s.querySelector(ce);
|
|
3283
3411
|
i ? E.setState("value", i.getAttribute(T)) : Q(e);
|
|
3284
3412
|
}
|
|
3285
|
-
let oe = () =>
|
|
3413
|
+
let oe = () => X8(V().length - 1), ie = (e) => {
|
|
3286
3414
|
e.preventDefault(), e.metaKey ? oe() : e.altKey ? re(1) : Q(1);
|
|
3287
3415
|
}, se = (e) => {
|
|
3288
|
-
e.preventDefault(), e.metaKey ?
|
|
3416
|
+
e.preventDefault(), e.metaKey ? X8(0) : e.altKey ? re(-1) : Q(-1);
|
|
3289
3417
|
};
|
|
3290
|
-
return t__namespace.createElement(
|
|
3418
|
+
return t__namespace.createElement(Primitive.div, { ref: o, tabIndex: -1, ...O, "cmdk-root": "", onKeyDown: (e) => {
|
|
3291
3419
|
var s;
|
|
3292
3420
|
(s = O.onKeyDown) == null || s.call(O, e);
|
|
3293
3421
|
let a = e.nativeEvent.isComposing || e.keyCode === 229;
|
|
@@ -3312,7 +3440,7 @@ var me = t__namespace.forwardRef((r, o) => {
|
|
|
3312
3440
|
break;
|
|
3313
3441
|
}
|
|
3314
3442
|
case "Home": {
|
|
3315
|
-
e.preventDefault(),
|
|
3443
|
+
e.preventDefault(), X8(0);
|
|
3316
3444
|
break;
|
|
3317
3445
|
}
|
|
3318
3446
|
case "End": {
|
|
@@ -3332,7 +3460,7 @@ var me = t__namespace.forwardRef((r, o) => {
|
|
|
3332
3460
|
});
|
|
3333
3461
|
var he = t__namespace.forwardRef((r, o) => {
|
|
3334
3462
|
var _, I;
|
|
3335
|
-
let n =
|
|
3463
|
+
let n = useId2(), u2 = t__namespace.useRef(null), c = t__namespace.useContext(fe), d = K2(), f = pe(r), p2 = (I = (_ = f.current) == null ? void 0 : _.forceMount) != null ? I : c == null ? void 0 : c.forceMount;
|
|
3336
3464
|
k2(() => {
|
|
3337
3465
|
if (!p2)
|
|
3338
3466
|
return d.item(n, c == null ? void 0 : c.id);
|
|
@@ -3353,23 +3481,23 @@ var he = t__namespace.forwardRef((r, o) => {
|
|
|
3353
3481
|
if (!x)
|
|
3354
3482
|
return null;
|
|
3355
3483
|
let { disabled: A, value: ge, onSelect: j, forceMount: O, keywords: $2, ...q } = r;
|
|
3356
|
-
return t__namespace.createElement(
|
|
3484
|
+
return t__namespace.createElement(Primitive.div, { ref: composeRefs(u2, o), ...q, id: n, "cmdk-item": "", role: "option", "aria-disabled": !!A, "aria-selected": !!R, "data-disabled": !!A, "data-selected": !!R, onPointerMove: A || d.getDisablePointerSelection() ? void 0 : S, onClick: A ? void 0 : C }, r.children);
|
|
3357
3485
|
});
|
|
3358
3486
|
var Ee = t__namespace.forwardRef((r, o) => {
|
|
3359
|
-
let { heading: n, children: u2, forceMount: c, ...d } = r, f =
|
|
3487
|
+
let { heading: n, children: u2, forceMount: c, ...d } = r, f = useId2(), p2 = t__namespace.useRef(null), b = t__namespace.useRef(null), m2 = useId2(), R = K2(), x = P((S) => c || R.filter() === false ? true : S.search ? S.filtered.groups.has(f) : true);
|
|
3360
3488
|
k2(() => R.group(f), []), ve(f, p2, [r.value, r.heading, b]);
|
|
3361
3489
|
let C = t__namespace.useMemo(() => ({ id: f, forceMount: c }), [c]);
|
|
3362
|
-
return t__namespace.createElement(
|
|
3490
|
+
return t__namespace.createElement(Primitive.div, { ref: composeRefs(p2, o), ...d, "cmdk-group": "", role: "presentation", hidden: x ? void 0 : true }, n && t__namespace.createElement("div", { ref: b, "cmdk-group-heading": "", "aria-hidden": true, id: m2 }, n), B2(r, (S) => t__namespace.createElement("div", { "cmdk-group-items": "", role: "group", "aria-labelledby": n ? m2 : void 0 }, t__namespace.createElement(fe.Provider, { value: C }, S))));
|
|
3363
3491
|
});
|
|
3364
3492
|
var ye = t__namespace.forwardRef((r, o) => {
|
|
3365
3493
|
let { alwaysRender: n, ...u2 } = r, c = t__namespace.useRef(null), d = P((f) => !f.search);
|
|
3366
|
-
return !n && !d ? null : t__namespace.createElement(
|
|
3494
|
+
return !n && !d ? null : t__namespace.createElement(Primitive.div, { ref: composeRefs(c, o), ...u2, "cmdk-separator": "", role: "separator" });
|
|
3367
3495
|
});
|
|
3368
3496
|
var Se = t__namespace.forwardRef((r, o) => {
|
|
3369
3497
|
let { onValueChange: n, ...u2 } = r, c = r.value != null, d = ee(), f = P((m2) => m2.search), p2 = P((m2) => m2.selectedItemId), b = K2();
|
|
3370
3498
|
return t__namespace.useEffect(() => {
|
|
3371
3499
|
r.value != null && d.setState("search", r.value);
|
|
3372
|
-
}, [r.value]), t__namespace.createElement(
|
|
3500
|
+
}, [r.value]), t__namespace.createElement(Primitive.input, { ref: o, ...u2, "cmdk-input": "", autoComplete: "off", autoCorrect: "off", spellCheck: false, "aria-autocomplete": "list", role: "combobox", "aria-expanded": true, "aria-controls": b.listId, "aria-labelledby": b.labelId, "aria-activedescendant": p2, id: b.inputId, type: "text", value: c ? r.value : f, onChange: (m2) => {
|
|
3373
3501
|
c || d.setState("search", m2.target.value), n == null || n(m2.target.value);
|
|
3374
3502
|
} });
|
|
3375
3503
|
});
|
|
@@ -3387,16 +3515,16 @@ var Ce = t__namespace.forwardRef((r, o) => {
|
|
|
3387
3515
|
cancelAnimationFrame(x), C.unobserve(m2);
|
|
3388
3516
|
};
|
|
3389
3517
|
}
|
|
3390
|
-
}, []), t__namespace.createElement(
|
|
3518
|
+
}, []), t__namespace.createElement(Primitive.div, { ref: composeRefs(d, o), ...c, "cmdk-list": "", role: "listbox", tabIndex: -1, "aria-activedescendant": p2, "aria-label": u2, id: b.listId }, B2(r, (m2) => t__namespace.createElement("div", { ref: composeRefs(f, b.listInnerRef), "cmdk-list-sizer": "" }, m2)));
|
|
3391
3519
|
});
|
|
3392
3520
|
var xe = t__namespace.forwardRef((r, o) => {
|
|
3393
3521
|
let { open: n, onOpenChange: u2, overlayClassName: c, contentClassName: d, container: f, ...p2 } = r;
|
|
3394
3522
|
return t__namespace.createElement(DialogPrimitive__namespace.Root, { open: n, onOpenChange: u2 }, t__namespace.createElement(DialogPrimitive__namespace.Portal, { container: f }, t__namespace.createElement(DialogPrimitive__namespace.Overlay, { "cmdk-overlay": "", className: c }), t__namespace.createElement(DialogPrimitive__namespace.Content, { "aria-label": r.label, "cmdk-dialog": "", className: d }, t__namespace.createElement(me, { ref: o, ...p2 }))));
|
|
3395
3523
|
});
|
|
3396
|
-
var Ie = t__namespace.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t__namespace.createElement(
|
|
3524
|
+
var Ie = t__namespace.forwardRef((r, o) => P((u2) => u2.filtered.count === 0) ? t__namespace.createElement(Primitive.div, { ref: o, ...r, "cmdk-empty": "", role: "presentation" }) : null);
|
|
3397
3525
|
var Pe = t__namespace.forwardRef((r, o) => {
|
|
3398
3526
|
let { progress: n, children: u2, label: c = "Loading...", ...d } = r;
|
|
3399
|
-
return t__namespace.createElement(
|
|
3527
|
+
return t__namespace.createElement(Primitive.div, { ref: o, ...d, "cmdk-loading": "", role: "progressbar", "aria-valuenow": n, "aria-valuemin": 0, "aria-valuemax": 100, "aria-label": c }, B2(r, (f) => t__namespace.createElement("div", { "aria-hidden": true }, f)));
|
|
3400
3528
|
});
|
|
3401
3529
|
var _e = Object.assign(me, { List: Ce, Item: he, Input: Se, Group: Ee, Separator: ye, Dialog: xe, Empty: Ie, Loading: Pe });
|
|
3402
3530
|
function we(r, o) {
|
|
@@ -3492,7 +3620,7 @@ var DialogOverlay = t__namespace.forwardRef(({ className, variant, animation, ..
|
|
|
3492
3620
|
DialogPrimitive__namespace.Overlay,
|
|
3493
3621
|
{
|
|
3494
3622
|
ref,
|
|
3495
|
-
className: cn(overlayVariants({ variant, animation }), className),
|
|
3623
|
+
className: cn("moonui-theme", overlayVariants({ variant, animation }), className),
|
|
3496
3624
|
...props
|
|
3497
3625
|
}
|
|
3498
3626
|
));
|
|
@@ -3688,7 +3816,7 @@ var DialogForm = t__namespace.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
3688
3816
|
"form",
|
|
3689
3817
|
{
|
|
3690
3818
|
ref,
|
|
3691
|
-
className: cn("flex flex-col gap-4", className),
|
|
3819
|
+
className: cn("moonui-theme", "flex flex-col gap-4", className),
|
|
3692
3820
|
...props
|
|
3693
3821
|
}
|
|
3694
3822
|
));
|
|
@@ -3718,7 +3846,7 @@ var Command = t__namespace.forwardRef(({ className, variant, size, ...props }, r
|
|
|
3718
3846
|
_e,
|
|
3719
3847
|
{
|
|
3720
3848
|
ref,
|
|
3721
|
-
className: cn(commandVariants({ variant, size }), className),
|
|
3849
|
+
className: cn("moonui-theme", commandVariants({ variant, size }), className),
|
|
3722
3850
|
...props
|
|
3723
3851
|
}
|
|
3724
3852
|
));
|
|
@@ -3755,7 +3883,7 @@ var CommandList = t__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
3755
3883
|
_e.List,
|
|
3756
3884
|
{
|
|
3757
3885
|
ref,
|
|
3758
|
-
className: cn("max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
3886
|
+
className: cn("moonui-theme", "max-h-[300px] overflow-y-auto overflow-x-hidden", className),
|
|
3759
3887
|
...props
|
|
3760
3888
|
}
|
|
3761
3889
|
));
|
|
@@ -3764,7 +3892,7 @@ var CommandEmpty = t__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
3764
3892
|
_e.Empty,
|
|
3765
3893
|
{
|
|
3766
3894
|
ref,
|
|
3767
|
-
className: cn("py-6 text-center text-sm text-muted-foreground", className),
|
|
3895
|
+
className: cn("moonui-theme", "py-6 text-center text-sm text-muted-foreground", className),
|
|
3768
3896
|
...props
|
|
3769
3897
|
}
|
|
3770
3898
|
));
|
|
@@ -3785,7 +3913,7 @@ var CommandSeparator = t__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
3785
3913
|
_e.Separator,
|
|
3786
3914
|
{
|
|
3787
3915
|
ref,
|
|
3788
|
-
className: cn("-mx-1 h-px bg-border", className),
|
|
3916
|
+
className: cn("moonui-theme", "-mx-1 h-px bg-border", className),
|
|
3789
3917
|
...props
|
|
3790
3918
|
}
|
|
3791
3919
|
));
|
|
@@ -4549,16 +4677,16 @@ var extent = (columnId, _leafRows, childRows) => {
|
|
|
4549
4677
|
return [min2, max2];
|
|
4550
4678
|
};
|
|
4551
4679
|
var mean = (columnId, leafRows) => {
|
|
4552
|
-
let
|
|
4680
|
+
let count3 = 0;
|
|
4553
4681
|
let sum2 = 0;
|
|
4554
4682
|
leafRows.forEach((row) => {
|
|
4555
4683
|
let value = row.getValue(columnId);
|
|
4556
4684
|
if (value != null && (value = +value) >= value) {
|
|
4557
|
-
++
|
|
4685
|
+
++count3, sum2 += value;
|
|
4558
4686
|
}
|
|
4559
4687
|
});
|
|
4560
|
-
if (
|
|
4561
|
-
return sum2 /
|
|
4688
|
+
if (count3)
|
|
4689
|
+
return sum2 / count3;
|
|
4562
4690
|
return;
|
|
4563
4691
|
};
|
|
4564
4692
|
var median = (columnId, leafRows) => {
|
|
@@ -4582,7 +4710,7 @@ var unique = (columnId, leafRows) => {
|
|
|
4582
4710
|
var uniqueCount = (columnId, leafRows) => {
|
|
4583
4711
|
return new Set(leafRows.map((d) => d.getValue(columnId))).size;
|
|
4584
4712
|
};
|
|
4585
|
-
var
|
|
4713
|
+
var count2 = (_columnId, leafRows) => {
|
|
4586
4714
|
return leafRows.length;
|
|
4587
4715
|
};
|
|
4588
4716
|
var aggregationFns = {
|
|
@@ -4594,7 +4722,7 @@ var aggregationFns = {
|
|
|
4594
4722
|
median,
|
|
4595
4723
|
unique,
|
|
4596
4724
|
uniqueCount,
|
|
4597
|
-
count:
|
|
4725
|
+
count: count2
|
|
4598
4726
|
};
|
|
4599
4727
|
var ColumnGrouping = {
|
|
4600
4728
|
getDefaultColumnDef: () => {
|
|
@@ -6918,7 +7046,7 @@ var Table = t__namespace.forwardRef(({
|
|
|
6918
7046
|
] });
|
|
6919
7047
|
});
|
|
6920
7048
|
Table.displayName = "Table";
|
|
6921
|
-
var TableHeader = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("[&_tr]:border-b", className), ...props }));
|
|
7049
|
+
var TableHeader = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("thead", { ref, className: cn("moonui-theme", "[&_tr]:border-b", className), ...props }));
|
|
6922
7050
|
TableHeader.displayName = "TableHeader";
|
|
6923
7051
|
var TableBody = t__namespace.forwardRef(({ className, emptyContent, emptyMessage = "No data available", children, ...props }, ref) => {
|
|
6924
7052
|
const hasChildren = t__namespace.Children.count(children) > 0;
|
|
@@ -6926,7 +7054,7 @@ var TableBody = t__namespace.forwardRef(({ className, emptyContent, emptyMessage
|
|
|
6926
7054
|
"tbody",
|
|
6927
7055
|
{
|
|
6928
7056
|
ref,
|
|
6929
|
-
className: cn("[&_tr:last-child]:border-0", className),
|
|
7057
|
+
className: cn("moonui-theme", "[&_tr:last-child]:border-0", className),
|
|
6930
7058
|
...props,
|
|
6931
7059
|
children: hasChildren ? children : /* @__PURE__ */ jsxRuntime.jsx("tr", { children: /* @__PURE__ */ jsxRuntime.jsx("td", { colSpan: 100, className: "h-24 text-center", children: emptyContent || /* @__PURE__ */ jsxRuntime.jsx("div", { className: "py-6 text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "text-sm", children: emptyMessage }) }) }) })
|
|
6932
7060
|
}
|
|
@@ -6937,7 +7065,7 @@ var TableFooter = t__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
6937
7065
|
"tfoot",
|
|
6938
7066
|
{
|
|
6939
7067
|
ref,
|
|
6940
|
-
className: cn("bg-primary text-primary-foreground font-medium", className),
|
|
7068
|
+
className: cn("moonui-theme", "bg-primary text-primary-foreground font-medium", className),
|
|
6941
7069
|
...props
|
|
6942
7070
|
}
|
|
6943
7071
|
));
|
|
@@ -7039,7 +7167,7 @@ var TableCell = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__
|
|
|
7039
7167
|
"td",
|
|
7040
7168
|
{
|
|
7041
7169
|
ref,
|
|
7042
|
-
className: cn("p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
7170
|
+
className: cn("moonui-theme", "p-4 align-middle [&:has([role=checkbox])]:pr-0", className),
|
|
7043
7171
|
...props
|
|
7044
7172
|
}
|
|
7045
7173
|
));
|
|
@@ -7048,7 +7176,7 @@ var TableCaption = t__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
7048
7176
|
"caption",
|
|
7049
7177
|
{
|
|
7050
7178
|
ref,
|
|
7051
|
-
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
7179
|
+
className: cn("moonui-theme", "mt-4 text-sm text-muted-foreground", className),
|
|
7052
7180
|
...props
|
|
7053
7181
|
}
|
|
7054
7182
|
));
|
|
@@ -7125,10 +7253,14 @@ var SelectScrollDownButton = t__namespace.forwardRef(({ className, ...props }, r
|
|
|
7125
7253
|
}
|
|
7126
7254
|
));
|
|
7127
7255
|
SelectScrollDownButton.displayName = SelectPrimitive__namespace.ScrollDownButton.displayName;
|
|
7128
|
-
var SelectContent = t__namespace.forwardRef(({ className, children, position = "
|
|
7256
|
+
var SelectContent = t__namespace.forwardRef(({ className, children, position = "popper", side = "bottom", sideOffset = 4, align = "start", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(SelectPrimitive__namespace.Portal, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7129
7257
|
SelectPrimitive__namespace.Content,
|
|
7130
7258
|
{
|
|
7131
7259
|
ref,
|
|
7260
|
+
side,
|
|
7261
|
+
sideOffset,
|
|
7262
|
+
align,
|
|
7263
|
+
avoidCollisions: false,
|
|
7132
7264
|
className: cn(
|
|
7133
7265
|
[
|
|
7134
7266
|
"relative z-50 max-h-96 min-w-[8rem] overflow-hidden",
|
|
@@ -7166,7 +7298,7 @@ var SelectLabel = t__namespace.forwardRef(({ className, ...props }, ref) => /* @
|
|
|
7166
7298
|
SelectPrimitive__namespace.Label,
|
|
7167
7299
|
{
|
|
7168
7300
|
ref,
|
|
7169
|
-
className: cn("py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
7301
|
+
className: cn("moonui-theme", "py-1.5 pl-8 pr-2 text-sm font-semibold", className),
|
|
7170
7302
|
...props
|
|
7171
7303
|
}
|
|
7172
7304
|
));
|
|
@@ -7202,7 +7334,7 @@ var SelectSeparator = t__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
7202
7334
|
SelectPrimitive__namespace.Separator,
|
|
7203
7335
|
{
|
|
7204
7336
|
ref,
|
|
7205
|
-
className: cn("-mx-1 my-1 h-px bg-muted dark:bg-gray-700", className),
|
|
7337
|
+
className: cn("moonui-theme", "-mx-1 my-1 h-px bg-muted dark:bg-gray-700", className),
|
|
7206
7338
|
...props
|
|
7207
7339
|
}
|
|
7208
7340
|
));
|
|
@@ -7318,7 +7450,7 @@ var DropdownMenuSeparator = t__namespace.forwardRef(({ className, ...props }, re
|
|
|
7318
7450
|
DropdownMenuPrimitive__namespace.Separator,
|
|
7319
7451
|
{
|
|
7320
7452
|
ref,
|
|
7321
|
-
className: cn("-mx-1 my-1 h-px bg-muted", className),
|
|
7453
|
+
className: cn("moonui-theme", "-mx-1 my-1 h-px bg-muted", className),
|
|
7322
7454
|
...props
|
|
7323
7455
|
}
|
|
7324
7456
|
));
|
|
@@ -7330,7 +7462,7 @@ var DropdownMenuShortcut = ({
|
|
|
7330
7462
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
7331
7463
|
"span",
|
|
7332
7464
|
{
|
|
7333
|
-
className: cn("ml-auto text-xs tracking-widest opacity-60", className),
|
|
7465
|
+
className: cn("moonui-theme", "ml-auto text-xs tracking-widest opacity-60", className),
|
|
7334
7466
|
...props
|
|
7335
7467
|
}
|
|
7336
7468
|
);
|
|
@@ -7386,6 +7518,15 @@ var Skeleton = t__namespace.forwardRef(
|
|
|
7386
7518
|
style,
|
|
7387
7519
|
...props
|
|
7388
7520
|
}, ref) => {
|
|
7521
|
+
const {
|
|
7522
|
+
onDrag,
|
|
7523
|
+
onDragEnd,
|
|
7524
|
+
onDragStart,
|
|
7525
|
+
onAnimationStart,
|
|
7526
|
+
onAnimationEnd,
|
|
7527
|
+
onAnimationIteration,
|
|
7528
|
+
...filteredProps
|
|
7529
|
+
} = props;
|
|
7389
7530
|
if (isLoaded && children) {
|
|
7390
7531
|
if (useMotion) {
|
|
7391
7532
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -7395,13 +7536,13 @@ var Skeleton = t__namespace.forwardRef(
|
|
|
7395
7536
|
initial: { opacity: 0 },
|
|
7396
7537
|
animate: { opacity: 1 },
|
|
7397
7538
|
transition: { duration: fadeInDuration / 1e3 },
|
|
7398
|
-
className,
|
|
7539
|
+
className: cn("moonui-theme", className),
|
|
7399
7540
|
style: {
|
|
7400
7541
|
height,
|
|
7401
7542
|
width,
|
|
7402
7543
|
...style
|
|
7403
7544
|
},
|
|
7404
|
-
...
|
|
7545
|
+
...filteredProps,
|
|
7405
7546
|
children
|
|
7406
7547
|
}
|
|
7407
7548
|
);
|
|
@@ -7410,7 +7551,7 @@ var Skeleton = t__namespace.forwardRef(
|
|
|
7410
7551
|
"div",
|
|
7411
7552
|
{
|
|
7412
7553
|
ref,
|
|
7413
|
-
className: cn("animate-fade-in", className),
|
|
7554
|
+
className: cn("moonui-theme", "animate-fade-in", className),
|
|
7414
7555
|
style: {
|
|
7415
7556
|
animationDuration: `${fadeInDuration}ms`,
|
|
7416
7557
|
height,
|
|
@@ -7428,6 +7569,7 @@ var Skeleton = t__namespace.forwardRef(
|
|
|
7428
7569
|
{
|
|
7429
7570
|
ref,
|
|
7430
7571
|
className: cn(
|
|
7572
|
+
"moonui-theme",
|
|
7431
7573
|
skeletonVariants({ variant, size, shape, animation }),
|
|
7432
7574
|
"relative isolate",
|
|
7433
7575
|
className
|
|
@@ -7438,7 +7580,7 @@ var Skeleton = t__namespace.forwardRef(
|
|
|
7438
7580
|
...style
|
|
7439
7581
|
},
|
|
7440
7582
|
...useMotion ? skeletonAnimation : {},
|
|
7441
|
-
...
|
|
7583
|
+
...filteredProps
|
|
7442
7584
|
}
|
|
7443
7585
|
);
|
|
7444
7586
|
}
|
|
@@ -7460,7 +7602,7 @@ var SkeletonText = t__namespace.forwardRef(
|
|
|
7460
7602
|
"div",
|
|
7461
7603
|
{
|
|
7462
7604
|
ref,
|
|
7463
|
-
className: cn("flex flex-col", className),
|
|
7605
|
+
className: cn("moonui-theme", "flex flex-col", className),
|
|
7464
7606
|
style: { gap: spacing },
|
|
7465
7607
|
...props,
|
|
7466
7608
|
children: Array.from({ length: lines }).map((_, i) => {
|
|
@@ -7500,7 +7642,7 @@ var SkeletonAvatar = t__namespace.forwardRef(
|
|
|
7500
7642
|
variant,
|
|
7501
7643
|
animation,
|
|
7502
7644
|
shape: "circle",
|
|
7503
|
-
className: cn("shrink-0", className),
|
|
7645
|
+
className: cn("moonui-theme", "shrink-0", className),
|
|
7504
7646
|
style: {
|
|
7505
7647
|
height: size,
|
|
7506
7648
|
width: size
|
|
@@ -7692,54 +7834,52 @@ function DataTable({
|
|
|
7692
7834
|
return /* @__PURE__ */ jsxRuntime.jsx(DataTableLoading, {});
|
|
7693
7835
|
}
|
|
7694
7836
|
const selectedRows = table.getFilteredSelectedRowModel().rows;
|
|
7695
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("space-y-4", className), children: [
|
|
7837
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("moonui-theme", "space-y-4", className), children: [
|
|
7696
7838
|
(title || description) && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
|
|
7697
7839
|
title && /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "text-lg font-semibold", children: title }),
|
|
7698
7840
|
description && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: description })
|
|
7699
7841
|
] }),
|
|
7700
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex
|
|
7701
|
-
/* @__PURE__ */ jsxRuntime.
|
|
7702
|
-
|
|
7703
|
-
|
|
7704
|
-
|
|
7705
|
-
|
|
7706
|
-
|
|
7707
|
-
|
|
7708
|
-
|
|
7709
|
-
|
|
7710
|
-
|
|
7711
|
-
|
|
7712
|
-
|
|
7713
|
-
|
|
7714
|
-
|
|
7715
|
-
|
|
7716
|
-
|
|
7717
|
-
|
|
7718
|
-
|
|
7719
|
-
|
|
7720
|
-
|
|
7721
|
-
|
|
7722
|
-
|
|
7723
|
-
|
|
7724
|
-
|
|
7725
|
-
|
|
7726
|
-
|
|
7727
|
-
|
|
7728
|
-
|
|
7729
|
-
|
|
7730
|
-
|
|
7731
|
-
|
|
7732
|
-
|
|
7733
|
-
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7842
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between gap-4", children: [
|
|
7843
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex-1 max-w-sm", children: enableFiltering && /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: customFilter || /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
7844
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Search, { className: "absolute left-2 top-2.5 h-4 w-4 text-muted-foreground" }),
|
|
7845
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
7846
|
+
Input,
|
|
7847
|
+
{
|
|
7848
|
+
placeholder: filterPlaceholder,
|
|
7849
|
+
value: filterColumn ? table.getColumn(filterColumn)?.getFilterValue() ?? "" : globalFilter,
|
|
7850
|
+
onChange: (event) => {
|
|
7851
|
+
const value = event.target.value;
|
|
7852
|
+
if (filterColumn) {
|
|
7853
|
+
table.getColumn(filterColumn)?.setFilterValue(value);
|
|
7854
|
+
} else {
|
|
7855
|
+
setGlobalFilter(value);
|
|
7856
|
+
}
|
|
7857
|
+
},
|
|
7858
|
+
className: "pl-8"
|
|
7859
|
+
}
|
|
7860
|
+
),
|
|
7861
|
+
(filterColumn && table.getColumn(filterColumn)?.getFilterValue() || !filterColumn && globalFilter) && /* @__PURE__ */ jsxRuntime.jsx(
|
|
7862
|
+
Button,
|
|
7863
|
+
{
|
|
7864
|
+
variant: "ghost",
|
|
7865
|
+
size: "sm",
|
|
7866
|
+
className: "absolute right-0 top-0 h-full px-2",
|
|
7867
|
+
onClick: () => {
|
|
7868
|
+
if (filterColumn) {
|
|
7869
|
+
table.getColumn(filterColumn)?.setFilterValue("");
|
|
7870
|
+
} else {
|
|
7871
|
+
setGlobalFilter("");
|
|
7872
|
+
}
|
|
7873
|
+
},
|
|
7874
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-4 w-4" })
|
|
7875
|
+
}
|
|
7876
|
+
)
|
|
7877
|
+
] }) }) }),
|
|
7878
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7737
7879
|
enableRowSelection && selectedRows.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "secondary", className: "whitespace-nowrap", children: [
|
|
7738
7880
|
selectedRows.length,
|
|
7739
7881
|
" selected"
|
|
7740
|
-
] })
|
|
7741
|
-
] }),
|
|
7742
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
7882
|
+
] }),
|
|
7743
7883
|
toolbarActions,
|
|
7744
7884
|
enableExport && onExport && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
7745
7885
|
Button,
|
|
@@ -8057,8 +8197,8 @@ function Calendar({
|
|
|
8057
8197
|
return [...previousMonthDays, ...emptyCells, ...days2, ...nextMonthDays];
|
|
8058
8198
|
};
|
|
8059
8199
|
const days = getDaysInMonth();
|
|
8060
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("p-0", className), children: [
|
|
8061
|
-
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-6 py-4", children: [
|
|
8200
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("moonui-theme", "p-0", className), children: [
|
|
8201
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between px-6 py-4 border-b border-border/50 dark:border-gray-700/50", children: [
|
|
8062
8202
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8063
8203
|
"button",
|
|
8064
8204
|
{
|
|
@@ -8136,6 +8276,11 @@ function Calendar({
|
|
|
8136
8276
|
] });
|
|
8137
8277
|
}
|
|
8138
8278
|
Calendar.displayName = "Calendar";
|
|
8279
|
+
var pageTransitions2 = {
|
|
8280
|
+
initial: { opacity: 0, x: 20 },
|
|
8281
|
+
animate: { opacity: 1, x: 0 },
|
|
8282
|
+
exit: { opacity: 0, x: -20 }
|
|
8283
|
+
};
|
|
8139
8284
|
var datePickerVariants = classVarianceAuthority.cva(
|
|
8140
8285
|
"w-full justify-start text-left font-normal",
|
|
8141
8286
|
{
|
|
@@ -8143,8 +8288,7 @@ var datePickerVariants = classVarianceAuthority.cva(
|
|
|
8143
8288
|
variant: {
|
|
8144
8289
|
default: "",
|
|
8145
8290
|
outline: "border-2",
|
|
8146
|
-
ghost: "hover:bg-accent hover:text-accent-foreground"
|
|
8147
|
-
minimal: "h-auto p-0 border-0 shadow-none"
|
|
8291
|
+
ghost: "hover:bg-accent hover:text-accent-foreground"
|
|
8148
8292
|
},
|
|
8149
8293
|
size: {
|
|
8150
8294
|
default: "h-10 px-4 py-2",
|
|
@@ -8195,9 +8339,10 @@ function DatePicker({
|
|
|
8195
8339
|
setInternalDate(value);
|
|
8196
8340
|
}, [value]);
|
|
8197
8341
|
const handleSelect = (date) => {
|
|
8198
|
-
|
|
8199
|
-
|
|
8200
|
-
|
|
8342
|
+
const singleDate = Array.isArray(date) ? date[0] : date && typeof date === "object" && "from" in date ? date.from : date;
|
|
8343
|
+
setInternalDate(singleDate);
|
|
8344
|
+
onChange?.(singleDate);
|
|
8345
|
+
if (singleDate) {
|
|
8201
8346
|
setOpen(false);
|
|
8202
8347
|
}
|
|
8203
8348
|
};
|
|
@@ -8222,11 +8367,11 @@ function DatePicker({
|
|
|
8222
8367
|
};
|
|
8223
8368
|
const displayValue = internalDate && dateFns.isValid(internalDate) ? dateFns.format(internalDate, formatString) : null;
|
|
8224
8369
|
const iconElement = icon || /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Calendar, { className: "h-4 w-4" });
|
|
8225
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
8370
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "moonui-theme", children: /* @__PURE__ */ jsxRuntime.jsxs(Popover, { open, onOpenChange: setOpen, children: [
|
|
8226
8371
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8227
8372
|
Button,
|
|
8228
8373
|
{
|
|
8229
|
-
variant: variant === "
|
|
8374
|
+
variant: variant === "ghost" ? "ghost" : "outline",
|
|
8230
8375
|
className: cn(
|
|
8231
8376
|
datePickerVariants({ variant, size, state }),
|
|
8232
8377
|
!displayValue && "text-muted-foreground",
|
|
@@ -8299,13 +8444,13 @@ function DatePicker({
|
|
|
8299
8444
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8300
8445
|
PopoverContent,
|
|
8301
8446
|
{
|
|
8302
|
-
className: "w-[360px] p-0 shadow-
|
|
8447
|
+
className: "w-[360px] p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm z-[1000]",
|
|
8303
8448
|
align: "start",
|
|
8304
8449
|
sideOffset: 12,
|
|
8305
8450
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8306
8451
|
framerMotion.motion.div,
|
|
8307
8452
|
{
|
|
8308
|
-
...
|
|
8453
|
+
...pageTransitions2,
|
|
8309
8454
|
className: "rounded-2xl bg-background overflow-hidden",
|
|
8310
8455
|
children: [
|
|
8311
8456
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -8335,7 +8480,7 @@ function DatePicker({
|
|
|
8335
8480
|
)
|
|
8336
8481
|
}
|
|
8337
8482
|
)
|
|
8338
|
-
] });
|
|
8483
|
+
] }) });
|
|
8339
8484
|
}
|
|
8340
8485
|
function DateRangePicker({
|
|
8341
8486
|
className,
|
|
@@ -8373,7 +8518,7 @@ function DateRangePicker({
|
|
|
8373
8518
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8374
8519
|
Button,
|
|
8375
8520
|
{
|
|
8376
|
-
variant: props.variant === "
|
|
8521
|
+
variant: props.variant === "ghost" ? "ghost" : "outline",
|
|
8377
8522
|
className: cn(
|
|
8378
8523
|
datePickerVariants({
|
|
8379
8524
|
variant: props.variant,
|
|
@@ -8390,7 +8535,7 @@ function DateRangePicker({
|
|
|
8390
8535
|
]
|
|
8391
8536
|
}
|
|
8392
8537
|
) }),
|
|
8393
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0 shadow-
|
|
8538
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-auto p-0 shadow-2xl rounded-2xl border border-gray-200 dark:border-gray-700 bg-background/95 backdrop-blur-sm z-[1000]", align: "start", sideOffset: 12, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
8394
8539
|
Calendar,
|
|
8395
8540
|
{
|
|
8396
8541
|
mode: "range",
|
|
@@ -8531,7 +8676,7 @@ function MonthPicker({
|
|
|
8531
8676
|
/* @__PURE__ */ jsxRuntime.jsx(PopoverTrigger, { asChild: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
8532
8677
|
Button,
|
|
8533
8678
|
{
|
|
8534
|
-
variant: props.variant || "outline",
|
|
8679
|
+
variant: props.variant === "default" ? "outline" : props.variant || "outline",
|
|
8535
8680
|
className: cn(
|
|
8536
8681
|
datePickerVariants({
|
|
8537
8682
|
variant: props.variant,
|
|
@@ -8548,7 +8693,7 @@ function MonthPicker({
|
|
|
8548
8693
|
]
|
|
8549
8694
|
}
|
|
8550
8695
|
) }),
|
|
8551
|
-
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-64 p-0", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3", children: [
|
|
8696
|
+
/* @__PURE__ */ jsxRuntime.jsx(PopoverContent, { className: "w-64 p-0 shadow-2xl border border-gray-200 dark:border-gray-700 bg-background z-[1000]", align: "start", children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "p-3", children: [
|
|
8552
8697
|
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center justify-between mb-3", children: [
|
|
8553
8698
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
8554
8699
|
Button,
|
|
@@ -8573,7 +8718,7 @@ function MonthPicker({
|
|
|
8573
8718
|
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "grid grid-cols-3 gap-2", children: months.map((month, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8574
8719
|
Button,
|
|
8575
8720
|
{
|
|
8576
|
-
variant: value && value.getMonth() === index ? "
|
|
8721
|
+
variant: value && value.getMonth() === index ? "primary" : "outline",
|
|
8577
8722
|
size: "sm",
|
|
8578
8723
|
onClick: () => handleMonthSelect(index),
|
|
8579
8724
|
className: "h-8 text-xs",
|
|
@@ -8619,7 +8764,7 @@ function DraggableList({
|
|
|
8619
8764
|
const handleDragEnd = () => {
|
|
8620
8765
|
setDraggedIndex(null);
|
|
8621
8766
|
};
|
|
8622
|
-
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("space-y-2", className), children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8767
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className: cn("moonui-theme", "space-y-2", className), children: items.map((item, index) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
8623
8768
|
"div",
|
|
8624
8769
|
{
|
|
8625
8770
|
draggable: !disabled,
|
|
@@ -8738,7 +8883,7 @@ var Progress = t__namespace.forwardRef(({
|
|
|
8738
8883
|
"div",
|
|
8739
8884
|
{
|
|
8740
8885
|
ref,
|
|
8741
|
-
className: cn(progressVariants({ variant, size, radius, animation }), className),
|
|
8886
|
+
className: cn("moonui-theme", progressVariants({ variant, size, radius, animation }), className),
|
|
8742
8887
|
role: "progressbar",
|
|
8743
8888
|
"aria-valuemin": 0,
|
|
8744
8889
|
"aria-valuemax": max2,
|
|
@@ -8819,7 +8964,7 @@ var FileItem = ({
|
|
|
8819
8964
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3 w-3 mr-1 animate-spin" }),
|
|
8820
8965
|
"Uploading"
|
|
8821
8966
|
] }),
|
|
8822
|
-
status === "success" && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "
|
|
8967
|
+
status === "success" && /* @__PURE__ */ jsxRuntime.jsxs(Badge, { variant: "success", className: "h-5", children: [
|
|
8823
8968
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.CheckCircle, { className: "h-3 w-3 mr-1" }),
|
|
8824
8969
|
"Done"
|
|
8825
8970
|
] }),
|
|
@@ -8968,7 +9113,7 @@ var FileUpload = t__namespace.default.forwardRef(
|
|
|
8968
9113
|
onRemove(fileId);
|
|
8969
9114
|
}
|
|
8970
9115
|
}, [onRemove]);
|
|
8971
|
-
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("space-y-4", className), ...props, children: [
|
|
9116
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { ref, className: cn("moonui-theme", "space-y-4", className), ...props, children: [
|
|
8972
9117
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
8973
9118
|
framerMotion.motion.div,
|
|
8974
9119
|
{
|
|
@@ -9307,7 +9452,7 @@ function GitHubStarButton({
|
|
|
9307
9452
|
{
|
|
9308
9453
|
variant: "outline",
|
|
9309
9454
|
size,
|
|
9310
|
-
className: cn("group", className),
|
|
9455
|
+
className: cn("moonui-theme", "group", className),
|
|
9311
9456
|
asChild: true,
|
|
9312
9457
|
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9313
9458
|
"a",
|
|
@@ -9327,57 +9472,191 @@ function GitHubStarButton({
|
|
|
9327
9472
|
}
|
|
9328
9473
|
);
|
|
9329
9474
|
}
|
|
9330
|
-
function
|
|
9475
|
+
function LockedComponent({
|
|
9476
|
+
children,
|
|
9477
|
+
componentName,
|
|
9331
9478
|
className,
|
|
9332
|
-
|
|
9333
|
-
|
|
9334
|
-
...props
|
|
9479
|
+
showPreview = true,
|
|
9480
|
+
previewDuration = 2e3
|
|
9335
9481
|
}) {
|
|
9336
|
-
const
|
|
9337
|
-
const
|
|
9338
|
-
|
|
9339
|
-
|
|
9340
|
-
|
|
9341
|
-
|
|
9342
|
-
|
|
9343
|
-
|
|
9344
|
-
|
|
9345
|
-
|
|
9346
|
-
|
|
9347
|
-
|
|
9348
|
-
|
|
9349
|
-
|
|
9350
|
-
|
|
9351
|
-
|
|
9352
|
-
|
|
9353
|
-
|
|
9354
|
-
|
|
9355
|
-
|
|
9356
|
-
|
|
9357
|
-
|
|
9358
|
-
|
|
9359
|
-
|
|
9360
|
-
|
|
9361
|
-
|
|
9362
|
-
|
|
9363
|
-
|
|
9364
|
-
|
|
9365
|
-
|
|
9366
|
-
|
|
9367
|
-
|
|
9368
|
-
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9482
|
+
const [isPreviewActive, setIsPreviewActive] = t.useState(false);
|
|
9483
|
+
const [previewTimeout, setPreviewTimeout] = t.useState(null);
|
|
9484
|
+
const handleMouseEnter = () => {
|
|
9485
|
+
if (!showPreview)
|
|
9486
|
+
return;
|
|
9487
|
+
setIsPreviewActive(true);
|
|
9488
|
+
if (previewTimeout) {
|
|
9489
|
+
clearTimeout(previewTimeout);
|
|
9490
|
+
}
|
|
9491
|
+
const timeout = setTimeout(() => {
|
|
9492
|
+
setIsPreviewActive(false);
|
|
9493
|
+
}, previewDuration);
|
|
9494
|
+
setPreviewTimeout(timeout);
|
|
9495
|
+
};
|
|
9496
|
+
const handleMouseLeave = () => {
|
|
9497
|
+
if (previewTimeout) {
|
|
9498
|
+
clearTimeout(previewTimeout);
|
|
9499
|
+
setPreviewTimeout(null);
|
|
9500
|
+
}
|
|
9501
|
+
setIsPreviewActive(false);
|
|
9502
|
+
};
|
|
9503
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9504
|
+
"div",
|
|
9505
|
+
{
|
|
9506
|
+
className: cn(
|
|
9507
|
+
"relative group cursor-pointer transition-all duration-300",
|
|
9508
|
+
className
|
|
9509
|
+
),
|
|
9510
|
+
onMouseEnter: handleMouseEnter,
|
|
9511
|
+
onMouseLeave: handleMouseLeave,
|
|
9512
|
+
children: [
|
|
9513
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9514
|
+
"div",
|
|
9515
|
+
{
|
|
9516
|
+
className: cn(
|
|
9517
|
+
"transition-all duration-300",
|
|
9518
|
+
!isPreviewActive && "blur-sm grayscale-[0.3] opacity-60"
|
|
9519
|
+
),
|
|
9520
|
+
children
|
|
9521
|
+
}
|
|
9522
|
+
),
|
|
9523
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9524
|
+
"div",
|
|
9525
|
+
{
|
|
9526
|
+
className: cn(
|
|
9527
|
+
"absolute inset-0 bg-gradient-to-br from-amber-500/10 via-transparent to-purple-500/10",
|
|
9528
|
+
"border-2 border-dashed border-amber-400/30 rounded-lg",
|
|
9529
|
+
"flex items-center justify-center",
|
|
9530
|
+
"transition-all duration-300",
|
|
9531
|
+
isPreviewActive ? "opacity-0" : "opacity-100"
|
|
9532
|
+
),
|
|
9533
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "text-center space-y-3 p-6", children: [
|
|
9534
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9535
|
+
Badge,
|
|
9536
|
+
{
|
|
9537
|
+
variant: "secondary",
|
|
9538
|
+
className: "bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 px-3 py-1",
|
|
9539
|
+
children: [
|
|
9540
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Crown, { className: "w-3 h-3 mr-1" }),
|
|
9541
|
+
"PRO ONLY"
|
|
9542
|
+
]
|
|
9543
|
+
}
|
|
9544
|
+
) }),
|
|
9545
|
+
/* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "p-3 rounded-full bg-amber-100 dark:bg-amber-900/30", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Lock, { className: "w-6 h-6 text-amber-600 dark:text-amber-400" }) }) }),
|
|
9546
|
+
/* @__PURE__ */ jsxRuntime.jsx("h3", { className: "font-semibold text-gray-900 dark:text-gray-100", children: componentName }),
|
|
9547
|
+
/* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-gray-600 dark:text-gray-400 max-w-xs", children: "This premium component is available with Pro subscription" }),
|
|
9548
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9549
|
+
Button,
|
|
9550
|
+
{
|
|
9551
|
+
size: "sm",
|
|
9552
|
+
className: "bg-gradient-to-r from-amber-500 to-orange-500 hover:from-amber-600 hover:to-orange-600 border-0",
|
|
9553
|
+
onClick: () => {
|
|
9554
|
+
if (typeof window !== "undefined") {
|
|
9555
|
+
window.location.href = "/pricing";
|
|
9556
|
+
}
|
|
9557
|
+
},
|
|
9558
|
+
children: [
|
|
9559
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Zap, { className: "w-4 h-4 mr-2" }),
|
|
9560
|
+
"Upgrade to Pro"
|
|
9561
|
+
]
|
|
9562
|
+
}
|
|
9563
|
+
)
|
|
9564
|
+
] })
|
|
9565
|
+
}
|
|
9566
|
+
),
|
|
9567
|
+
showPreview && !isPreviewActive && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-2 right-2 opacity-0 group-hover:opacity-100 transition-opacity duration-200", children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "bg-black/80 text-white text-xs px-2 py-1 rounded", children: "Hover to preview" }) })
|
|
9568
|
+
]
|
|
9569
|
+
}
|
|
9570
|
+
);
|
|
9571
|
+
}
|
|
9572
|
+
function ProComponentWrapper({
|
|
9573
|
+
children,
|
|
9574
|
+
componentId,
|
|
9575
|
+
componentName,
|
|
9576
|
+
className,
|
|
9577
|
+
fallback
|
|
9578
|
+
}) {
|
|
9579
|
+
{
|
|
9580
|
+
return /* @__PURE__ */ jsxRuntime.jsx("div", { className, children });
|
|
9581
|
+
}
|
|
9582
|
+
}
|
|
9583
|
+
function ProBadge({ className }) {
|
|
9584
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
9585
|
+
Badge,
|
|
9586
|
+
{
|
|
9587
|
+
variant: "secondary",
|
|
9588
|
+
className: cn(
|
|
9589
|
+
"bg-gradient-to-r from-amber-500 to-orange-500 text-white border-0 text-xs",
|
|
9590
|
+
className
|
|
9591
|
+
),
|
|
9592
|
+
children: [
|
|
9593
|
+
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.Crown, { className: "w-3 h-3 mr-1" }),
|
|
9594
|
+
"PRO"
|
|
9595
|
+
]
|
|
9596
|
+
}
|
|
9597
|
+
);
|
|
9598
|
+
}
|
|
9599
|
+
function FreeBadge({ className }) {
|
|
9600
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9601
|
+
Badge,
|
|
9602
|
+
{
|
|
9603
|
+
variant: "outline",
|
|
9604
|
+
className: cn("border-green-500 text-green-600 dark:text-green-400 text-xs", className),
|
|
9605
|
+
children: "FREE"
|
|
9606
|
+
}
|
|
9607
|
+
);
|
|
9608
|
+
}
|
|
9609
|
+
function MoonLogo({
|
|
9610
|
+
className,
|
|
9611
|
+
variant = "default",
|
|
9612
|
+
showText = true,
|
|
9613
|
+
...props
|
|
9614
|
+
}) {
|
|
9615
|
+
const logoId = t__namespace.useId();
|
|
9616
|
+
const gradientId = `moon-gradient-${logoId}`;
|
|
9617
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("moonui-theme", "flex items-center gap-2", className), children: [
|
|
9618
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
9619
|
+
"svg",
|
|
9620
|
+
{
|
|
9621
|
+
width: "32",
|
|
9622
|
+
height: "32",
|
|
9623
|
+
viewBox: "0 0 32 32",
|
|
9624
|
+
fill: "none",
|
|
9625
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
9626
|
+
className: "flex-shrink-0",
|
|
9627
|
+
...props,
|
|
9628
|
+
children: [
|
|
9629
|
+
variant === "gradient" && /* @__PURE__ */ jsxRuntime.jsx("defs", { children: /* @__PURE__ */ jsxRuntime.jsxs("linearGradient", { id: gradientId, x1: "0%", y1: "0%", x2: "100%", y2: "100%", children: [
|
|
9630
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "0%", stopColor: "#3B82F6" }),
|
|
9631
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "50%", stopColor: "#8B5CF6" }),
|
|
9632
|
+
/* @__PURE__ */ jsxRuntime.jsx("stop", { offset: "100%", stopColor: "#EC4899" })
|
|
9633
|
+
] }) }),
|
|
9634
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9635
|
+
"circle",
|
|
9636
|
+
{
|
|
9637
|
+
cx: "16",
|
|
9638
|
+
cy: "16",
|
|
9639
|
+
r: "14",
|
|
9640
|
+
fill: variant === "gradient" ? `url(#${gradientId})` : "currentColor",
|
|
9641
|
+
className: variant === "default" ? "fill-primary" : ""
|
|
9642
|
+
}
|
|
9643
|
+
),
|
|
9644
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9645
|
+
"circle",
|
|
9646
|
+
{
|
|
9647
|
+
cx: "22",
|
|
9648
|
+
cy: "10",
|
|
9649
|
+
r: "10",
|
|
9650
|
+
fill: "white",
|
|
9651
|
+
className: "dark:fill-background"
|
|
9652
|
+
}
|
|
9653
|
+
)
|
|
9654
|
+
]
|
|
9655
|
+
}
|
|
9656
|
+
),
|
|
9657
|
+
showText && /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xl font-bold", children: [
|
|
9658
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-foreground", children: "Moon" }),
|
|
9659
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-primary", children: "UI" })
|
|
9381
9660
|
] })
|
|
9382
9661
|
] });
|
|
9383
9662
|
}
|
|
@@ -9412,7 +9691,7 @@ var Pagination = ({ className, ...props }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
|
9412
9691
|
{
|
|
9413
9692
|
role: "navigation",
|
|
9414
9693
|
"aria-label": "pagination",
|
|
9415
|
-
className: cn("mx-auto flex w-full justify-center", className),
|
|
9694
|
+
className: cn("moonui-theme", "mx-auto flex w-full justify-center", className),
|
|
9416
9695
|
...props
|
|
9417
9696
|
}
|
|
9418
9697
|
);
|
|
@@ -9421,12 +9700,12 @@ var PaginationContent = t__namespace.forwardRef(({ className, ...props }, ref) =
|
|
|
9421
9700
|
"ul",
|
|
9422
9701
|
{
|
|
9423
9702
|
ref,
|
|
9424
|
-
className: cn("flex flex-row items-center gap-1", className),
|
|
9703
|
+
className: cn("moonui-theme", "flex flex-row items-center gap-1", className),
|
|
9425
9704
|
...props
|
|
9426
9705
|
}
|
|
9427
9706
|
));
|
|
9428
9707
|
PaginationContent.displayName = "PaginationContent";
|
|
9429
|
-
var PaginationItem = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("", className), ...props }));
|
|
9708
|
+
var PaginationItem = t__namespace.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx("li", { ref, className: cn("moonui-theme", "", className), ...props }));
|
|
9430
9709
|
PaginationItem.displayName = "PaginationItem";
|
|
9431
9710
|
var PaginationLink = ({
|
|
9432
9711
|
className,
|
|
@@ -9455,8 +9734,8 @@ var PaginationPrevious = ({
|
|
|
9455
9734
|
PaginationLink,
|
|
9456
9735
|
{
|
|
9457
9736
|
"aria-label": "Go to previous page",
|
|
9458
|
-
size: "
|
|
9459
|
-
className: cn("gap-1 pl-2.5", className),
|
|
9737
|
+
size: "md",
|
|
9738
|
+
className: cn("moonui-theme", "gap-1 pl-2.5", className),
|
|
9460
9739
|
...props,
|
|
9461
9740
|
children: [
|
|
9462
9741
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.ChevronLeft, { className: "h-4 w-4" }),
|
|
@@ -9472,8 +9751,8 @@ var PaginationNext = ({
|
|
|
9472
9751
|
PaginationLink,
|
|
9473
9752
|
{
|
|
9474
9753
|
"aria-label": "Go to next page",
|
|
9475
|
-
size: "
|
|
9476
|
-
className: cn("gap-1 pr-2.5", className),
|
|
9754
|
+
size: "md",
|
|
9755
|
+
className: cn("moonui-theme", "gap-1 pr-2.5", className),
|
|
9477
9756
|
...props,
|
|
9478
9757
|
children: [
|
|
9479
9758
|
/* @__PURE__ */ jsxRuntime.jsx("span", { children: "Next" }),
|
|
@@ -9489,7 +9768,7 @@ var PaginationEllipsis = ({
|
|
|
9489
9768
|
"span",
|
|
9490
9769
|
{
|
|
9491
9770
|
"aria-hidden": true,
|
|
9492
|
-
className: cn("flex h-9 w-9 items-center justify-center", className),
|
|
9771
|
+
className: cn("moonui-theme", "flex h-9 w-9 items-center justify-center", className),
|
|
9493
9772
|
...props,
|
|
9494
9773
|
children: [
|
|
9495
9774
|
/* @__PURE__ */ jsxRuntime.jsx(lucideReact.MoreHorizontal, { className: "h-4 w-4" }),
|
|
@@ -9498,6 +9777,141 @@ var PaginationEllipsis = ({
|
|
|
9498
9777
|
}
|
|
9499
9778
|
);
|
|
9500
9779
|
PaginationEllipsis.displayName = "PaginationEllipsis";
|
|
9780
|
+
var countryCodes = [
|
|
9781
|
+
{ code: "+1", country: "US", flag: "\u{1F1FA}\u{1F1F8}", name: "United States" },
|
|
9782
|
+
{ code: "+44", country: "GB", flag: "\u{1F1EC}\u{1F1E7}", name: "United Kingdom" },
|
|
9783
|
+
{ code: "+49", country: "DE", flag: "\u{1F1E9}\u{1F1EA}", name: "Germany" },
|
|
9784
|
+
{ code: "+33", country: "FR", flag: "\u{1F1EB}\u{1F1F7}", name: "France" },
|
|
9785
|
+
{ code: "+39", country: "IT", flag: "\u{1F1EE}\u{1F1F9}", name: "Italy" },
|
|
9786
|
+
{ code: "+34", country: "ES", flag: "\u{1F1EA}\u{1F1F8}", name: "Spain" },
|
|
9787
|
+
{ code: "+31", country: "NL", flag: "\u{1F1F3}\u{1F1F1}", name: "Netherlands" },
|
|
9788
|
+
{ code: "+46", country: "SE", flag: "\u{1F1F8}\u{1F1EA}", name: "Sweden" },
|
|
9789
|
+
{ code: "+47", country: "NO", flag: "\u{1F1F3}\u{1F1F4}", name: "Norway" },
|
|
9790
|
+
{ code: "+45", country: "DK", flag: "\u{1F1E9}\u{1F1F0}", name: "Denmark" },
|
|
9791
|
+
{ code: "+358", country: "FI", flag: "\u{1F1EB}\u{1F1EE}", name: "Finland" },
|
|
9792
|
+
{ code: "+48", country: "PL", flag: "\u{1F1F5}\u{1F1F1}", name: "Poland" },
|
|
9793
|
+
{ code: "+90", country: "TR", flag: "\u{1F1F9}\u{1F1F7}", name: "Turkey" },
|
|
9794
|
+
{ code: "+86", country: "CN", flag: "\u{1F1E8}\u{1F1F3}", name: "China" },
|
|
9795
|
+
{ code: "+81", country: "JP", flag: "\u{1F1EF}\u{1F1F5}", name: "Japan" },
|
|
9796
|
+
{ code: "+82", country: "KR", flag: "\u{1F1F0}\u{1F1F7}", name: "South Korea" },
|
|
9797
|
+
{ code: "+91", country: "IN", flag: "\u{1F1EE}\u{1F1F3}", name: "India" },
|
|
9798
|
+
{ code: "+61", country: "AU", flag: "\u{1F1E6}\u{1F1FA}", name: "Australia" },
|
|
9799
|
+
{ code: "+64", country: "NZ", flag: "\u{1F1F3}\u{1F1FF}", name: "New Zealand" },
|
|
9800
|
+
{ code: "+27", country: "ZA", flag: "\u{1F1FF}\u{1F1E6}", name: "South Africa" },
|
|
9801
|
+
{ code: "+55", country: "BR", flag: "\u{1F1E7}\u{1F1F7}", name: "Brazil" },
|
|
9802
|
+
{ code: "+52", country: "MX", flag: "\u{1F1F2}\u{1F1FD}", name: "Mexico" },
|
|
9803
|
+
{ code: "+54", country: "AR", flag: "\u{1F1E6}\u{1F1F7}", name: "Argentina" },
|
|
9804
|
+
{ code: "+20", country: "EG", flag: "\u{1F1EA}\u{1F1EC}", name: "Egypt" },
|
|
9805
|
+
{ code: "+966", country: "SA", flag: "\u{1F1F8}\u{1F1E6}", name: "Saudi Arabia" },
|
|
9806
|
+
{ code: "+971", country: "AE", flag: "\u{1F1E6}\u{1F1EA}", name: "UAE" }
|
|
9807
|
+
];
|
|
9808
|
+
var formatPhoneNumber = (value, countryCode) => {
|
|
9809
|
+
const cleaned = value.replace(/\D/g, "");
|
|
9810
|
+
switch (countryCode) {
|
|
9811
|
+
case "+1":
|
|
9812
|
+
if (cleaned.length <= 3)
|
|
9813
|
+
return cleaned;
|
|
9814
|
+
if (cleaned.length <= 6)
|
|
9815
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
|
|
9816
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)}-${cleaned.slice(6, 10)}`;
|
|
9817
|
+
case "+44":
|
|
9818
|
+
if (cleaned.length <= 4)
|
|
9819
|
+
return cleaned;
|
|
9820
|
+
if (cleaned.length <= 7)
|
|
9821
|
+
return `${cleaned.slice(0, 4)} ${cleaned.slice(4)}`;
|
|
9822
|
+
return `${cleaned.slice(0, 4)} ${cleaned.slice(4, 7)} ${cleaned.slice(7, 11)}`;
|
|
9823
|
+
case "+90":
|
|
9824
|
+
if (cleaned.length <= 3)
|
|
9825
|
+
return cleaned;
|
|
9826
|
+
if (cleaned.length <= 6)
|
|
9827
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3)}`;
|
|
9828
|
+
if (cleaned.length <= 9)
|
|
9829
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6)}`;
|
|
9830
|
+
return `(${cleaned.slice(0, 3)}) ${cleaned.slice(3, 6)} ${cleaned.slice(6, 8)} ${cleaned.slice(8, 10)}`;
|
|
9831
|
+
default:
|
|
9832
|
+
let formatted = "";
|
|
9833
|
+
for (let i = 0; i < cleaned.length; i++) {
|
|
9834
|
+
if (i > 0 && i % 3 === 0)
|
|
9835
|
+
formatted += " ";
|
|
9836
|
+
formatted += cleaned[i];
|
|
9837
|
+
}
|
|
9838
|
+
return formatted;
|
|
9839
|
+
}
|
|
9840
|
+
};
|
|
9841
|
+
var getMaxLength = (countryCode) => {
|
|
9842
|
+
switch (countryCode) {
|
|
9843
|
+
case "+1":
|
|
9844
|
+
return 10;
|
|
9845
|
+
case "+44":
|
|
9846
|
+
return 11;
|
|
9847
|
+
case "+90":
|
|
9848
|
+
return 10;
|
|
9849
|
+
default:
|
|
9850
|
+
return 15;
|
|
9851
|
+
}
|
|
9852
|
+
};
|
|
9853
|
+
var PhoneInput = t__namespace.forwardRef(
|
|
9854
|
+
({
|
|
9855
|
+
className,
|
|
9856
|
+
value = "",
|
|
9857
|
+
onChange,
|
|
9858
|
+
defaultCountry = "+1",
|
|
9859
|
+
showIcon = true,
|
|
9860
|
+
showCountrySelect = true,
|
|
9861
|
+
countries = countryCodes,
|
|
9862
|
+
size,
|
|
9863
|
+
...props
|
|
9864
|
+
}, ref) => {
|
|
9865
|
+
const [countryCode, setCountryCode] = t__namespace.useState(defaultCountry);
|
|
9866
|
+
const [phoneNumber, setPhoneNumber] = t__namespace.useState(value);
|
|
9867
|
+
const selectedCountry = countries.find((c) => c.code === countryCode) || countries[0];
|
|
9868
|
+
const handlePhoneChange = (e) => {
|
|
9869
|
+
const rawValue = e.target.value.replace(/\D/g, "");
|
|
9870
|
+
const maxLength = getMaxLength(countryCode);
|
|
9871
|
+
const truncated = rawValue.slice(0, maxLength);
|
|
9872
|
+
const formatted = formatPhoneNumber(truncated, countryCode);
|
|
9873
|
+
setPhoneNumber(truncated);
|
|
9874
|
+
onChange?.(truncated, countryCode);
|
|
9875
|
+
e.target.value = formatted;
|
|
9876
|
+
};
|
|
9877
|
+
const handleCountryChange = (newCountryCode) => {
|
|
9878
|
+
setCountryCode(newCountryCode);
|
|
9879
|
+
onChange?.(phoneNumber, newCountryCode);
|
|
9880
|
+
};
|
|
9881
|
+
const formattedValue = formatPhoneNumber(phoneNumber, countryCode);
|
|
9882
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: cn("relative flex gap-2", className), children: [
|
|
9883
|
+
showCountrySelect && /* @__PURE__ */ jsxRuntime.jsxs(Select, { value: countryCode, onValueChange: handleCountryChange, children: [
|
|
9884
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectTrigger, { className: "w-[120px]", children: /* @__PURE__ */ jsxRuntime.jsx(SelectValue, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9885
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: selectedCountry.flag }),
|
|
9886
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: selectedCountry.code })
|
|
9887
|
+
] }) }) }),
|
|
9888
|
+
/* @__PURE__ */ jsxRuntime.jsx(SelectContent, { children: countries.map((country) => /* @__PURE__ */ jsxRuntime.jsx(SelectItem, { value: country.code, children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
9889
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: country.flag }),
|
|
9890
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { children: country.code }),
|
|
9891
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: country.name })
|
|
9892
|
+
] }) }, country.code)) })
|
|
9893
|
+
] }),
|
|
9894
|
+
/* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative flex-1", children: [
|
|
9895
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
9896
|
+
Input,
|
|
9897
|
+
{
|
|
9898
|
+
ref,
|
|
9899
|
+
type: "tel",
|
|
9900
|
+
inputMode: "numeric",
|
|
9901
|
+
autoComplete: "tel",
|
|
9902
|
+
placeholder: countryCode === "+1" ? "(555) 123-4567" : "123 456 789",
|
|
9903
|
+
value: formattedValue,
|
|
9904
|
+
onChange: handlePhoneChange,
|
|
9905
|
+
className: cn(showIcon && "pl-10", className),
|
|
9906
|
+
...props
|
|
9907
|
+
}
|
|
9908
|
+
),
|
|
9909
|
+
showIcon && /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Phone, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-muted-foreground" })
|
|
9910
|
+
] })
|
|
9911
|
+
] });
|
|
9912
|
+
}
|
|
9913
|
+
);
|
|
9914
|
+
PhoneInput.displayName = "PhoneInput";
|
|
9501
9915
|
var radioGroupItemVariants = classVarianceAuthority.cva(
|
|
9502
9916
|
"aspect-square border focus:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
9503
9917
|
{
|
|
@@ -9528,7 +9942,7 @@ var RadioGroup2 = t__namespace.forwardRef(
|
|
|
9528
9942
|
{
|
|
9529
9943
|
ref,
|
|
9530
9944
|
role: "radiogroup",
|
|
9531
|
-
className: cn("grid gap-2", className),
|
|
9945
|
+
className: cn("moonui-theme", "grid gap-2", className),
|
|
9532
9946
|
...props
|
|
9533
9947
|
}
|
|
9534
9948
|
) });
|
|
@@ -9687,6 +10101,767 @@ function RichTextEditor({
|
|
|
9687
10101
|
)
|
|
9688
10102
|
] });
|
|
9689
10103
|
}
|
|
10104
|
+
function useCallbackRef(callback) {
|
|
10105
|
+
const callbackRef = t__namespace.useRef(callback);
|
|
10106
|
+
t__namespace.useEffect(() => {
|
|
10107
|
+
callbackRef.current = callback;
|
|
10108
|
+
});
|
|
10109
|
+
return t__namespace.useMemo(() => (...args) => callbackRef.current?.(...args), []);
|
|
10110
|
+
}
|
|
10111
|
+
var DirectionContext = t__namespace.createContext(void 0);
|
|
10112
|
+
function useDirection(localDir) {
|
|
10113
|
+
const globalDir = t__namespace.useContext(DirectionContext);
|
|
10114
|
+
return localDir || globalDir || "ltr";
|
|
10115
|
+
}
|
|
10116
|
+
|
|
10117
|
+
// ../../node_modules/@radix-ui/number/dist/index.mjs
|
|
10118
|
+
function clamp(value, [min2, max2]) {
|
|
10119
|
+
return Math.min(max2, Math.max(min2, value));
|
|
10120
|
+
}
|
|
10121
|
+
function useStateMachine2(initialState, machine) {
|
|
10122
|
+
return t__namespace.useReducer((state, event) => {
|
|
10123
|
+
const nextState = machine[state][event];
|
|
10124
|
+
return nextState ?? state;
|
|
10125
|
+
}, initialState);
|
|
10126
|
+
}
|
|
10127
|
+
var SCROLL_AREA_NAME = "ScrollArea";
|
|
10128
|
+
var [createScrollAreaContext, createScrollAreaScope] = createContextScope(SCROLL_AREA_NAME);
|
|
10129
|
+
var [ScrollAreaProvider, useScrollAreaContext] = createScrollAreaContext(SCROLL_AREA_NAME);
|
|
10130
|
+
var ScrollArea = t__namespace.forwardRef(
|
|
10131
|
+
(props, forwardedRef) => {
|
|
10132
|
+
const {
|
|
10133
|
+
__scopeScrollArea,
|
|
10134
|
+
type = "hover",
|
|
10135
|
+
dir,
|
|
10136
|
+
scrollHideDelay = 600,
|
|
10137
|
+
...scrollAreaProps
|
|
10138
|
+
} = props;
|
|
10139
|
+
const [scrollArea, setScrollArea] = t__namespace.useState(null);
|
|
10140
|
+
const [viewport, setViewport] = t__namespace.useState(null);
|
|
10141
|
+
const [content, setContent] = t__namespace.useState(null);
|
|
10142
|
+
const [scrollbarX, setScrollbarX] = t__namespace.useState(null);
|
|
10143
|
+
const [scrollbarY, setScrollbarY] = t__namespace.useState(null);
|
|
10144
|
+
const [cornerWidth, setCornerWidth] = t__namespace.useState(0);
|
|
10145
|
+
const [cornerHeight, setCornerHeight] = t__namespace.useState(0);
|
|
10146
|
+
const [scrollbarXEnabled, setScrollbarXEnabled] = t__namespace.useState(false);
|
|
10147
|
+
const [scrollbarYEnabled, setScrollbarYEnabled] = t__namespace.useState(false);
|
|
10148
|
+
const composedRefs = useComposedRefs(forwardedRef, (node) => setScrollArea(node));
|
|
10149
|
+
const direction = useDirection(dir);
|
|
10150
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10151
|
+
ScrollAreaProvider,
|
|
10152
|
+
{
|
|
10153
|
+
scope: __scopeScrollArea,
|
|
10154
|
+
type,
|
|
10155
|
+
dir: direction,
|
|
10156
|
+
scrollHideDelay,
|
|
10157
|
+
scrollArea,
|
|
10158
|
+
viewport,
|
|
10159
|
+
onViewportChange: setViewport,
|
|
10160
|
+
content,
|
|
10161
|
+
onContentChange: setContent,
|
|
10162
|
+
scrollbarX,
|
|
10163
|
+
onScrollbarXChange: setScrollbarX,
|
|
10164
|
+
scrollbarXEnabled,
|
|
10165
|
+
onScrollbarXEnabledChange: setScrollbarXEnabled,
|
|
10166
|
+
scrollbarY,
|
|
10167
|
+
onScrollbarYChange: setScrollbarY,
|
|
10168
|
+
scrollbarYEnabled,
|
|
10169
|
+
onScrollbarYEnabledChange: setScrollbarYEnabled,
|
|
10170
|
+
onCornerWidthChange: setCornerWidth,
|
|
10171
|
+
onCornerHeightChange: setCornerHeight,
|
|
10172
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10173
|
+
Primitive.div,
|
|
10174
|
+
{
|
|
10175
|
+
dir: direction,
|
|
10176
|
+
...scrollAreaProps,
|
|
10177
|
+
ref: composedRefs,
|
|
10178
|
+
style: {
|
|
10179
|
+
position: "relative",
|
|
10180
|
+
// Pass corner sizes as CSS vars to reduce re-renders of context consumers
|
|
10181
|
+
["--radix-scroll-area-corner-width"]: cornerWidth + "px",
|
|
10182
|
+
["--radix-scroll-area-corner-height"]: cornerHeight + "px",
|
|
10183
|
+
...props.style
|
|
10184
|
+
}
|
|
10185
|
+
}
|
|
10186
|
+
)
|
|
10187
|
+
}
|
|
10188
|
+
);
|
|
10189
|
+
}
|
|
10190
|
+
);
|
|
10191
|
+
ScrollArea.displayName = SCROLL_AREA_NAME;
|
|
10192
|
+
var VIEWPORT_NAME = "ScrollAreaViewport";
|
|
10193
|
+
var ScrollAreaViewport = t__namespace.forwardRef(
|
|
10194
|
+
(props, forwardedRef) => {
|
|
10195
|
+
const { __scopeScrollArea, children, nonce, ...viewportProps } = props;
|
|
10196
|
+
const context = useScrollAreaContext(VIEWPORT_NAME, __scopeScrollArea);
|
|
10197
|
+
const ref = t__namespace.useRef(null);
|
|
10198
|
+
const composedRefs = useComposedRefs(forwardedRef, ref, context.onViewportChange);
|
|
10199
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10200
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10201
|
+
"style",
|
|
10202
|
+
{
|
|
10203
|
+
dangerouslySetInnerHTML: {
|
|
10204
|
+
__html: `[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}`
|
|
10205
|
+
},
|
|
10206
|
+
nonce
|
|
10207
|
+
}
|
|
10208
|
+
),
|
|
10209
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
10210
|
+
Primitive.div,
|
|
10211
|
+
{
|
|
10212
|
+
"data-radix-scroll-area-viewport": "",
|
|
10213
|
+
...viewportProps,
|
|
10214
|
+
ref: composedRefs,
|
|
10215
|
+
style: {
|
|
10216
|
+
/**
|
|
10217
|
+
* We don't support `visible` because the intention is to have at least one scrollbar
|
|
10218
|
+
* if this component is used and `visible` will behave like `auto` in that case
|
|
10219
|
+
* https://developer.mozilla.org/en-US/docs/Web/CSS/overflow#description
|
|
10220
|
+
*
|
|
10221
|
+
* We don't handle `auto` because the intention is for the native implementation
|
|
10222
|
+
* to be hidden if using this component. We just want to ensure the node is scrollable
|
|
10223
|
+
* so could have used either `scroll` or `auto` here. We picked `scroll` to prevent
|
|
10224
|
+
* the browser from having to work out whether to render native scrollbars or not,
|
|
10225
|
+
* we tell it to with the intention of hiding them in CSS.
|
|
10226
|
+
*/
|
|
10227
|
+
overflowX: context.scrollbarXEnabled ? "scroll" : "hidden",
|
|
10228
|
+
overflowY: context.scrollbarYEnabled ? "scroll" : "hidden",
|
|
10229
|
+
...props.style
|
|
10230
|
+
},
|
|
10231
|
+
children: /* @__PURE__ */ jsxRuntime.jsx("div", { ref: context.onContentChange, style: { minWidth: "100%", display: "table" }, children })
|
|
10232
|
+
}
|
|
10233
|
+
)
|
|
10234
|
+
] });
|
|
10235
|
+
}
|
|
10236
|
+
);
|
|
10237
|
+
ScrollAreaViewport.displayName = VIEWPORT_NAME;
|
|
10238
|
+
var SCROLLBAR_NAME = "ScrollAreaScrollbar";
|
|
10239
|
+
var ScrollAreaScrollbar = t__namespace.forwardRef(
|
|
10240
|
+
(props, forwardedRef) => {
|
|
10241
|
+
const { forceMount, ...scrollbarProps } = props;
|
|
10242
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
10243
|
+
const { onScrollbarXEnabledChange, onScrollbarYEnabledChange } = context;
|
|
10244
|
+
const isHorizontal = props.orientation === "horizontal";
|
|
10245
|
+
t__namespace.useEffect(() => {
|
|
10246
|
+
isHorizontal ? onScrollbarXEnabledChange(true) : onScrollbarYEnabledChange(true);
|
|
10247
|
+
return () => {
|
|
10248
|
+
isHorizontal ? onScrollbarXEnabledChange(false) : onScrollbarYEnabledChange(false);
|
|
10249
|
+
};
|
|
10250
|
+
}, [isHorizontal, onScrollbarXEnabledChange, onScrollbarYEnabledChange]);
|
|
10251
|
+
return context.type === "hover" ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaScrollbarHover, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "scroll" ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaScrollbarScroll, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "auto" ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaScrollbarAuto, { ...scrollbarProps, ref: forwardedRef, forceMount }) : context.type === "always" ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaScrollbarVisible, { ...scrollbarProps, ref: forwardedRef }) : null;
|
|
10252
|
+
}
|
|
10253
|
+
);
|
|
10254
|
+
ScrollAreaScrollbar.displayName = SCROLLBAR_NAME;
|
|
10255
|
+
var ScrollAreaScrollbarHover = t__namespace.forwardRef((props, forwardedRef) => {
|
|
10256
|
+
const { forceMount, ...scrollbarProps } = props;
|
|
10257
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
10258
|
+
const [visible, setVisible] = t__namespace.useState(false);
|
|
10259
|
+
t__namespace.useEffect(() => {
|
|
10260
|
+
const scrollArea = context.scrollArea;
|
|
10261
|
+
let hideTimer = 0;
|
|
10262
|
+
if (scrollArea) {
|
|
10263
|
+
const handlePointerEnter = () => {
|
|
10264
|
+
window.clearTimeout(hideTimer);
|
|
10265
|
+
setVisible(true);
|
|
10266
|
+
};
|
|
10267
|
+
const handlePointerLeave = () => {
|
|
10268
|
+
hideTimer = window.setTimeout(() => setVisible(false), context.scrollHideDelay);
|
|
10269
|
+
};
|
|
10270
|
+
scrollArea.addEventListener("pointerenter", handlePointerEnter);
|
|
10271
|
+
scrollArea.addEventListener("pointerleave", handlePointerLeave);
|
|
10272
|
+
return () => {
|
|
10273
|
+
window.clearTimeout(hideTimer);
|
|
10274
|
+
scrollArea.removeEventListener("pointerenter", handlePointerEnter);
|
|
10275
|
+
scrollArea.removeEventListener("pointerleave", handlePointerLeave);
|
|
10276
|
+
};
|
|
10277
|
+
}
|
|
10278
|
+
}, [context.scrollArea, context.scrollHideDelay]);
|
|
10279
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10280
|
+
ScrollAreaScrollbarAuto,
|
|
10281
|
+
{
|
|
10282
|
+
"data-state": visible ? "visible" : "hidden",
|
|
10283
|
+
...scrollbarProps,
|
|
10284
|
+
ref: forwardedRef
|
|
10285
|
+
}
|
|
10286
|
+
) });
|
|
10287
|
+
});
|
|
10288
|
+
var ScrollAreaScrollbarScroll = t__namespace.forwardRef((props, forwardedRef) => {
|
|
10289
|
+
const { forceMount, ...scrollbarProps } = props;
|
|
10290
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
10291
|
+
const isHorizontal = props.orientation === "horizontal";
|
|
10292
|
+
const debounceScrollEnd = useDebounceCallback(() => send("SCROLL_END"), 100);
|
|
10293
|
+
const [state, send] = useStateMachine2("hidden", {
|
|
10294
|
+
hidden: {
|
|
10295
|
+
SCROLL: "scrolling"
|
|
10296
|
+
},
|
|
10297
|
+
scrolling: {
|
|
10298
|
+
SCROLL_END: "idle",
|
|
10299
|
+
POINTER_ENTER: "interacting"
|
|
10300
|
+
},
|
|
10301
|
+
interacting: {
|
|
10302
|
+
SCROLL: "interacting",
|
|
10303
|
+
POINTER_LEAVE: "idle"
|
|
10304
|
+
},
|
|
10305
|
+
idle: {
|
|
10306
|
+
HIDE: "hidden",
|
|
10307
|
+
SCROLL: "scrolling",
|
|
10308
|
+
POINTER_ENTER: "interacting"
|
|
10309
|
+
}
|
|
10310
|
+
});
|
|
10311
|
+
t__namespace.useEffect(() => {
|
|
10312
|
+
if (state === "idle") {
|
|
10313
|
+
const hideTimer = window.setTimeout(() => send("HIDE"), context.scrollHideDelay);
|
|
10314
|
+
return () => window.clearTimeout(hideTimer);
|
|
10315
|
+
}
|
|
10316
|
+
}, [state, context.scrollHideDelay, send]);
|
|
10317
|
+
t__namespace.useEffect(() => {
|
|
10318
|
+
const viewport = context.viewport;
|
|
10319
|
+
const scrollDirection = isHorizontal ? "scrollLeft" : "scrollTop";
|
|
10320
|
+
if (viewport) {
|
|
10321
|
+
let prevScrollPos = viewport[scrollDirection];
|
|
10322
|
+
const handleScroll = () => {
|
|
10323
|
+
const scrollPos = viewport[scrollDirection];
|
|
10324
|
+
const hasScrollInDirectionChanged = prevScrollPos !== scrollPos;
|
|
10325
|
+
if (hasScrollInDirectionChanged) {
|
|
10326
|
+
send("SCROLL");
|
|
10327
|
+
debounceScrollEnd();
|
|
10328
|
+
}
|
|
10329
|
+
prevScrollPos = scrollPos;
|
|
10330
|
+
};
|
|
10331
|
+
viewport.addEventListener("scroll", handleScroll);
|
|
10332
|
+
return () => viewport.removeEventListener("scroll", handleScroll);
|
|
10333
|
+
}
|
|
10334
|
+
}, [context.viewport, isHorizontal, send, debounceScrollEnd]);
|
|
10335
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || state !== "hidden", children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10336
|
+
ScrollAreaScrollbarVisible,
|
|
10337
|
+
{
|
|
10338
|
+
"data-state": state === "hidden" ? "hidden" : "visible",
|
|
10339
|
+
...scrollbarProps,
|
|
10340
|
+
ref: forwardedRef,
|
|
10341
|
+
onPointerEnter: composeEventHandlers(props.onPointerEnter, () => send("POINTER_ENTER")),
|
|
10342
|
+
onPointerLeave: composeEventHandlers(props.onPointerLeave, () => send("POINTER_LEAVE"))
|
|
10343
|
+
}
|
|
10344
|
+
) });
|
|
10345
|
+
});
|
|
10346
|
+
var ScrollAreaScrollbarAuto = t__namespace.forwardRef((props, forwardedRef) => {
|
|
10347
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
10348
|
+
const { forceMount, ...scrollbarProps } = props;
|
|
10349
|
+
const [visible, setVisible] = t__namespace.useState(false);
|
|
10350
|
+
const isHorizontal = props.orientation === "horizontal";
|
|
10351
|
+
const handleResize = useDebounceCallback(() => {
|
|
10352
|
+
if (context.viewport) {
|
|
10353
|
+
const isOverflowX = context.viewport.offsetWidth < context.viewport.scrollWidth;
|
|
10354
|
+
const isOverflowY = context.viewport.offsetHeight < context.viewport.scrollHeight;
|
|
10355
|
+
setVisible(isHorizontal ? isOverflowX : isOverflowY);
|
|
10356
|
+
}
|
|
10357
|
+
}, 10);
|
|
10358
|
+
useResizeObserver(context.viewport, handleResize);
|
|
10359
|
+
useResizeObserver(context.content, handleResize);
|
|
10360
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || visible, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10361
|
+
ScrollAreaScrollbarVisible,
|
|
10362
|
+
{
|
|
10363
|
+
"data-state": visible ? "visible" : "hidden",
|
|
10364
|
+
...scrollbarProps,
|
|
10365
|
+
ref: forwardedRef
|
|
10366
|
+
}
|
|
10367
|
+
) });
|
|
10368
|
+
});
|
|
10369
|
+
var ScrollAreaScrollbarVisible = t__namespace.forwardRef((props, forwardedRef) => {
|
|
10370
|
+
const { orientation = "vertical", ...scrollbarProps } = props;
|
|
10371
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
10372
|
+
const thumbRef = t__namespace.useRef(null);
|
|
10373
|
+
const pointerOffsetRef = t__namespace.useRef(0);
|
|
10374
|
+
const [sizes, setSizes] = t__namespace.useState({
|
|
10375
|
+
content: 0,
|
|
10376
|
+
viewport: 0,
|
|
10377
|
+
scrollbar: { size: 0, paddingStart: 0, paddingEnd: 0 }
|
|
10378
|
+
});
|
|
10379
|
+
const thumbRatio = getThumbRatio(sizes.viewport, sizes.content);
|
|
10380
|
+
const commonProps = {
|
|
10381
|
+
...scrollbarProps,
|
|
10382
|
+
sizes,
|
|
10383
|
+
onSizesChange: setSizes,
|
|
10384
|
+
hasThumb: Boolean(thumbRatio > 0 && thumbRatio < 1),
|
|
10385
|
+
onThumbChange: (thumb) => thumbRef.current = thumb,
|
|
10386
|
+
onThumbPointerUp: () => pointerOffsetRef.current = 0,
|
|
10387
|
+
onThumbPointerDown: (pointerPos) => pointerOffsetRef.current = pointerPos
|
|
10388
|
+
};
|
|
10389
|
+
function getScrollPosition(pointerPos, dir) {
|
|
10390
|
+
return getScrollPositionFromPointer(pointerPos, pointerOffsetRef.current, sizes, dir);
|
|
10391
|
+
}
|
|
10392
|
+
if (orientation === "horizontal") {
|
|
10393
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10394
|
+
ScrollAreaScrollbarX,
|
|
10395
|
+
{
|
|
10396
|
+
...commonProps,
|
|
10397
|
+
ref: forwardedRef,
|
|
10398
|
+
onThumbPositionChange: () => {
|
|
10399
|
+
if (context.viewport && thumbRef.current) {
|
|
10400
|
+
const scrollPos = context.viewport.scrollLeft;
|
|
10401
|
+
const offset = getThumbOffsetFromScroll(scrollPos, sizes, context.dir);
|
|
10402
|
+
thumbRef.current.style.transform = `translate3d(${offset}px, 0, 0)`;
|
|
10403
|
+
}
|
|
10404
|
+
},
|
|
10405
|
+
onWheelScroll: (scrollPos) => {
|
|
10406
|
+
if (context.viewport)
|
|
10407
|
+
context.viewport.scrollLeft = scrollPos;
|
|
10408
|
+
},
|
|
10409
|
+
onDragScroll: (pointerPos) => {
|
|
10410
|
+
if (context.viewport) {
|
|
10411
|
+
context.viewport.scrollLeft = getScrollPosition(pointerPos, context.dir);
|
|
10412
|
+
}
|
|
10413
|
+
}
|
|
10414
|
+
}
|
|
10415
|
+
);
|
|
10416
|
+
}
|
|
10417
|
+
if (orientation === "vertical") {
|
|
10418
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10419
|
+
ScrollAreaScrollbarY,
|
|
10420
|
+
{
|
|
10421
|
+
...commonProps,
|
|
10422
|
+
ref: forwardedRef,
|
|
10423
|
+
onThumbPositionChange: () => {
|
|
10424
|
+
if (context.viewport && thumbRef.current) {
|
|
10425
|
+
const scrollPos = context.viewport.scrollTop;
|
|
10426
|
+
const offset = getThumbOffsetFromScroll(scrollPos, sizes);
|
|
10427
|
+
thumbRef.current.style.transform = `translate3d(0, ${offset}px, 0)`;
|
|
10428
|
+
}
|
|
10429
|
+
},
|
|
10430
|
+
onWheelScroll: (scrollPos) => {
|
|
10431
|
+
if (context.viewport)
|
|
10432
|
+
context.viewport.scrollTop = scrollPos;
|
|
10433
|
+
},
|
|
10434
|
+
onDragScroll: (pointerPos) => {
|
|
10435
|
+
if (context.viewport)
|
|
10436
|
+
context.viewport.scrollTop = getScrollPosition(pointerPos);
|
|
10437
|
+
}
|
|
10438
|
+
}
|
|
10439
|
+
);
|
|
10440
|
+
}
|
|
10441
|
+
return null;
|
|
10442
|
+
});
|
|
10443
|
+
var ScrollAreaScrollbarX = t__namespace.forwardRef((props, forwardedRef) => {
|
|
10444
|
+
const { sizes, onSizesChange, ...scrollbarProps } = props;
|
|
10445
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
10446
|
+
const [computedStyle, setComputedStyle] = t__namespace.useState();
|
|
10447
|
+
const ref = t__namespace.useRef(null);
|
|
10448
|
+
const composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarXChange);
|
|
10449
|
+
t__namespace.useEffect(() => {
|
|
10450
|
+
if (ref.current)
|
|
10451
|
+
setComputedStyle(getComputedStyle(ref.current));
|
|
10452
|
+
}, [ref]);
|
|
10453
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10454
|
+
ScrollAreaScrollbarImpl,
|
|
10455
|
+
{
|
|
10456
|
+
"data-orientation": "horizontal",
|
|
10457
|
+
...scrollbarProps,
|
|
10458
|
+
ref: composeRefs2,
|
|
10459
|
+
sizes,
|
|
10460
|
+
style: {
|
|
10461
|
+
bottom: 0,
|
|
10462
|
+
left: context.dir === "rtl" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
10463
|
+
right: context.dir === "ltr" ? "var(--radix-scroll-area-corner-width)" : 0,
|
|
10464
|
+
["--radix-scroll-area-thumb-width"]: getThumbSize(sizes) + "px",
|
|
10465
|
+
...props.style
|
|
10466
|
+
},
|
|
10467
|
+
onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.x),
|
|
10468
|
+
onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.x),
|
|
10469
|
+
onWheelScroll: (event, maxScrollPos) => {
|
|
10470
|
+
if (context.viewport) {
|
|
10471
|
+
const scrollPos = context.viewport.scrollLeft + event.deltaX;
|
|
10472
|
+
props.onWheelScroll(scrollPos);
|
|
10473
|
+
if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
|
|
10474
|
+
event.preventDefault();
|
|
10475
|
+
}
|
|
10476
|
+
}
|
|
10477
|
+
},
|
|
10478
|
+
onResize: () => {
|
|
10479
|
+
if (ref.current && context.viewport && computedStyle) {
|
|
10480
|
+
onSizesChange({
|
|
10481
|
+
content: context.viewport.scrollWidth,
|
|
10482
|
+
viewport: context.viewport.offsetWidth,
|
|
10483
|
+
scrollbar: {
|
|
10484
|
+
size: ref.current.clientWidth,
|
|
10485
|
+
paddingStart: toInt(computedStyle.paddingLeft),
|
|
10486
|
+
paddingEnd: toInt(computedStyle.paddingRight)
|
|
10487
|
+
}
|
|
10488
|
+
});
|
|
10489
|
+
}
|
|
10490
|
+
}
|
|
10491
|
+
}
|
|
10492
|
+
);
|
|
10493
|
+
});
|
|
10494
|
+
var ScrollAreaScrollbarY = t__namespace.forwardRef((props, forwardedRef) => {
|
|
10495
|
+
const { sizes, onSizesChange, ...scrollbarProps } = props;
|
|
10496
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, props.__scopeScrollArea);
|
|
10497
|
+
const [computedStyle, setComputedStyle] = t__namespace.useState();
|
|
10498
|
+
const ref = t__namespace.useRef(null);
|
|
10499
|
+
const composeRefs2 = useComposedRefs(forwardedRef, ref, context.onScrollbarYChange);
|
|
10500
|
+
t__namespace.useEffect(() => {
|
|
10501
|
+
if (ref.current)
|
|
10502
|
+
setComputedStyle(getComputedStyle(ref.current));
|
|
10503
|
+
}, [ref]);
|
|
10504
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10505
|
+
ScrollAreaScrollbarImpl,
|
|
10506
|
+
{
|
|
10507
|
+
"data-orientation": "vertical",
|
|
10508
|
+
...scrollbarProps,
|
|
10509
|
+
ref: composeRefs2,
|
|
10510
|
+
sizes,
|
|
10511
|
+
style: {
|
|
10512
|
+
top: 0,
|
|
10513
|
+
right: context.dir === "ltr" ? 0 : void 0,
|
|
10514
|
+
left: context.dir === "rtl" ? 0 : void 0,
|
|
10515
|
+
bottom: "var(--radix-scroll-area-corner-height)",
|
|
10516
|
+
["--radix-scroll-area-thumb-height"]: getThumbSize(sizes) + "px",
|
|
10517
|
+
...props.style
|
|
10518
|
+
},
|
|
10519
|
+
onThumbPointerDown: (pointerPos) => props.onThumbPointerDown(pointerPos.y),
|
|
10520
|
+
onDragScroll: (pointerPos) => props.onDragScroll(pointerPos.y),
|
|
10521
|
+
onWheelScroll: (event, maxScrollPos) => {
|
|
10522
|
+
if (context.viewport) {
|
|
10523
|
+
const scrollPos = context.viewport.scrollTop + event.deltaY;
|
|
10524
|
+
props.onWheelScroll(scrollPos);
|
|
10525
|
+
if (isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos)) {
|
|
10526
|
+
event.preventDefault();
|
|
10527
|
+
}
|
|
10528
|
+
}
|
|
10529
|
+
},
|
|
10530
|
+
onResize: () => {
|
|
10531
|
+
if (ref.current && context.viewport && computedStyle) {
|
|
10532
|
+
onSizesChange({
|
|
10533
|
+
content: context.viewport.scrollHeight,
|
|
10534
|
+
viewport: context.viewport.offsetHeight,
|
|
10535
|
+
scrollbar: {
|
|
10536
|
+
size: ref.current.clientHeight,
|
|
10537
|
+
paddingStart: toInt(computedStyle.paddingTop),
|
|
10538
|
+
paddingEnd: toInt(computedStyle.paddingBottom)
|
|
10539
|
+
}
|
|
10540
|
+
});
|
|
10541
|
+
}
|
|
10542
|
+
}
|
|
10543
|
+
}
|
|
10544
|
+
);
|
|
10545
|
+
});
|
|
10546
|
+
var [ScrollbarProvider, useScrollbarContext] = createScrollAreaContext(SCROLLBAR_NAME);
|
|
10547
|
+
var ScrollAreaScrollbarImpl = t__namespace.forwardRef((props, forwardedRef) => {
|
|
10548
|
+
const {
|
|
10549
|
+
__scopeScrollArea,
|
|
10550
|
+
sizes,
|
|
10551
|
+
hasThumb,
|
|
10552
|
+
onThumbChange,
|
|
10553
|
+
onThumbPointerUp,
|
|
10554
|
+
onThumbPointerDown,
|
|
10555
|
+
onThumbPositionChange,
|
|
10556
|
+
onDragScroll,
|
|
10557
|
+
onWheelScroll,
|
|
10558
|
+
onResize,
|
|
10559
|
+
...scrollbarProps
|
|
10560
|
+
} = props;
|
|
10561
|
+
const context = useScrollAreaContext(SCROLLBAR_NAME, __scopeScrollArea);
|
|
10562
|
+
const [scrollbar, setScrollbar] = t__namespace.useState(null);
|
|
10563
|
+
const composeRefs2 = useComposedRefs(forwardedRef, (node) => setScrollbar(node));
|
|
10564
|
+
const rectRef = t__namespace.useRef(null);
|
|
10565
|
+
const prevWebkitUserSelectRef = t__namespace.useRef("");
|
|
10566
|
+
const viewport = context.viewport;
|
|
10567
|
+
const maxScrollPos = sizes.content - sizes.viewport;
|
|
10568
|
+
const handleWheelScroll = useCallbackRef(onWheelScroll);
|
|
10569
|
+
const handleThumbPositionChange = useCallbackRef(onThumbPositionChange);
|
|
10570
|
+
const handleResize = useDebounceCallback(onResize, 10);
|
|
10571
|
+
function handleDragScroll(event) {
|
|
10572
|
+
if (rectRef.current) {
|
|
10573
|
+
const x = event.clientX - rectRef.current.left;
|
|
10574
|
+
const y = event.clientY - rectRef.current.top;
|
|
10575
|
+
onDragScroll({ x, y });
|
|
10576
|
+
}
|
|
10577
|
+
}
|
|
10578
|
+
t__namespace.useEffect(() => {
|
|
10579
|
+
const handleWheel = (event) => {
|
|
10580
|
+
const element = event.target;
|
|
10581
|
+
const isScrollbarWheel = scrollbar?.contains(element);
|
|
10582
|
+
if (isScrollbarWheel)
|
|
10583
|
+
handleWheelScroll(event, maxScrollPos);
|
|
10584
|
+
};
|
|
10585
|
+
document.addEventListener("wheel", handleWheel, { passive: false });
|
|
10586
|
+
return () => document.removeEventListener("wheel", handleWheel, { passive: false });
|
|
10587
|
+
}, [viewport, scrollbar, maxScrollPos, handleWheelScroll]);
|
|
10588
|
+
t__namespace.useEffect(handleThumbPositionChange, [sizes, handleThumbPositionChange]);
|
|
10589
|
+
useResizeObserver(scrollbar, handleResize);
|
|
10590
|
+
useResizeObserver(context.content, handleResize);
|
|
10591
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10592
|
+
ScrollbarProvider,
|
|
10593
|
+
{
|
|
10594
|
+
scope: __scopeScrollArea,
|
|
10595
|
+
scrollbar,
|
|
10596
|
+
hasThumb,
|
|
10597
|
+
onThumbChange: useCallbackRef(onThumbChange),
|
|
10598
|
+
onThumbPointerUp: useCallbackRef(onThumbPointerUp),
|
|
10599
|
+
onThumbPositionChange: handleThumbPositionChange,
|
|
10600
|
+
onThumbPointerDown: useCallbackRef(onThumbPointerDown),
|
|
10601
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
10602
|
+
Primitive.div,
|
|
10603
|
+
{
|
|
10604
|
+
...scrollbarProps,
|
|
10605
|
+
ref: composeRefs2,
|
|
10606
|
+
style: { position: "absolute", ...scrollbarProps.style },
|
|
10607
|
+
onPointerDown: composeEventHandlers(props.onPointerDown, (event) => {
|
|
10608
|
+
const mainPointer = 0;
|
|
10609
|
+
if (event.button === mainPointer) {
|
|
10610
|
+
const element = event.target;
|
|
10611
|
+
element.setPointerCapture(event.pointerId);
|
|
10612
|
+
rectRef.current = scrollbar.getBoundingClientRect();
|
|
10613
|
+
prevWebkitUserSelectRef.current = document.body.style.webkitUserSelect;
|
|
10614
|
+
document.body.style.webkitUserSelect = "none";
|
|
10615
|
+
if (context.viewport)
|
|
10616
|
+
context.viewport.style.scrollBehavior = "auto";
|
|
10617
|
+
handleDragScroll(event);
|
|
10618
|
+
}
|
|
10619
|
+
}),
|
|
10620
|
+
onPointerMove: composeEventHandlers(props.onPointerMove, handleDragScroll),
|
|
10621
|
+
onPointerUp: composeEventHandlers(props.onPointerUp, (event) => {
|
|
10622
|
+
const element = event.target;
|
|
10623
|
+
if (element.hasPointerCapture(event.pointerId)) {
|
|
10624
|
+
element.releasePointerCapture(event.pointerId);
|
|
10625
|
+
}
|
|
10626
|
+
document.body.style.webkitUserSelect = prevWebkitUserSelectRef.current;
|
|
10627
|
+
if (context.viewport)
|
|
10628
|
+
context.viewport.style.scrollBehavior = "";
|
|
10629
|
+
rectRef.current = null;
|
|
10630
|
+
})
|
|
10631
|
+
}
|
|
10632
|
+
)
|
|
10633
|
+
}
|
|
10634
|
+
);
|
|
10635
|
+
});
|
|
10636
|
+
var THUMB_NAME = "ScrollAreaThumb";
|
|
10637
|
+
var ScrollAreaThumb = t__namespace.forwardRef(
|
|
10638
|
+
(props, forwardedRef) => {
|
|
10639
|
+
const { forceMount, ...thumbProps } = props;
|
|
10640
|
+
const scrollbarContext = useScrollbarContext(THUMB_NAME, props.__scopeScrollArea);
|
|
10641
|
+
return /* @__PURE__ */ jsxRuntime.jsx(Presence, { present: forceMount || scrollbarContext.hasThumb, children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaThumbImpl, { ref: forwardedRef, ...thumbProps }) });
|
|
10642
|
+
}
|
|
10643
|
+
);
|
|
10644
|
+
var ScrollAreaThumbImpl = t__namespace.forwardRef(
|
|
10645
|
+
(props, forwardedRef) => {
|
|
10646
|
+
const { __scopeScrollArea, style, ...thumbProps } = props;
|
|
10647
|
+
const scrollAreaContext = useScrollAreaContext(THUMB_NAME, __scopeScrollArea);
|
|
10648
|
+
const scrollbarContext = useScrollbarContext(THUMB_NAME, __scopeScrollArea);
|
|
10649
|
+
const { onThumbPositionChange } = scrollbarContext;
|
|
10650
|
+
const composedRef = useComposedRefs(
|
|
10651
|
+
forwardedRef,
|
|
10652
|
+
(node) => scrollbarContext.onThumbChange(node)
|
|
10653
|
+
);
|
|
10654
|
+
const removeUnlinkedScrollListenerRef = t__namespace.useRef(void 0);
|
|
10655
|
+
const debounceScrollEnd = useDebounceCallback(() => {
|
|
10656
|
+
if (removeUnlinkedScrollListenerRef.current) {
|
|
10657
|
+
removeUnlinkedScrollListenerRef.current();
|
|
10658
|
+
removeUnlinkedScrollListenerRef.current = void 0;
|
|
10659
|
+
}
|
|
10660
|
+
}, 100);
|
|
10661
|
+
t__namespace.useEffect(() => {
|
|
10662
|
+
const viewport = scrollAreaContext.viewport;
|
|
10663
|
+
if (viewport) {
|
|
10664
|
+
const handleScroll = () => {
|
|
10665
|
+
debounceScrollEnd();
|
|
10666
|
+
if (!removeUnlinkedScrollListenerRef.current) {
|
|
10667
|
+
const listener = addUnlinkedScrollListener(viewport, onThumbPositionChange);
|
|
10668
|
+
removeUnlinkedScrollListenerRef.current = listener;
|
|
10669
|
+
onThumbPositionChange();
|
|
10670
|
+
}
|
|
10671
|
+
};
|
|
10672
|
+
onThumbPositionChange();
|
|
10673
|
+
viewport.addEventListener("scroll", handleScroll);
|
|
10674
|
+
return () => viewport.removeEventListener("scroll", handleScroll);
|
|
10675
|
+
}
|
|
10676
|
+
}, [scrollAreaContext.viewport, debounceScrollEnd, onThumbPositionChange]);
|
|
10677
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
10678
|
+
Primitive.div,
|
|
10679
|
+
{
|
|
10680
|
+
"data-state": scrollbarContext.hasThumb ? "visible" : "hidden",
|
|
10681
|
+
...thumbProps,
|
|
10682
|
+
ref: composedRef,
|
|
10683
|
+
style: {
|
|
10684
|
+
width: "var(--radix-scroll-area-thumb-width)",
|
|
10685
|
+
height: "var(--radix-scroll-area-thumb-height)",
|
|
10686
|
+
...style
|
|
10687
|
+
},
|
|
10688
|
+
onPointerDownCapture: composeEventHandlers(props.onPointerDownCapture, (event) => {
|
|
10689
|
+
const thumb = event.target;
|
|
10690
|
+
const thumbRect = thumb.getBoundingClientRect();
|
|
10691
|
+
const x = event.clientX - thumbRect.left;
|
|
10692
|
+
const y = event.clientY - thumbRect.top;
|
|
10693
|
+
scrollbarContext.onThumbPointerDown({ x, y });
|
|
10694
|
+
}),
|
|
10695
|
+
onPointerUp: composeEventHandlers(props.onPointerUp, scrollbarContext.onThumbPointerUp)
|
|
10696
|
+
}
|
|
10697
|
+
);
|
|
10698
|
+
}
|
|
10699
|
+
);
|
|
10700
|
+
ScrollAreaThumb.displayName = THUMB_NAME;
|
|
10701
|
+
var CORNER_NAME = "ScrollAreaCorner";
|
|
10702
|
+
var ScrollAreaCorner = t__namespace.forwardRef(
|
|
10703
|
+
(props, forwardedRef) => {
|
|
10704
|
+
const context = useScrollAreaContext(CORNER_NAME, props.__scopeScrollArea);
|
|
10705
|
+
const hasBothScrollbarsVisible = Boolean(context.scrollbarX && context.scrollbarY);
|
|
10706
|
+
const hasCorner = context.type !== "scroll" && hasBothScrollbarsVisible;
|
|
10707
|
+
return hasCorner ? /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaCornerImpl, { ...props, ref: forwardedRef }) : null;
|
|
10708
|
+
}
|
|
10709
|
+
);
|
|
10710
|
+
ScrollAreaCorner.displayName = CORNER_NAME;
|
|
10711
|
+
var ScrollAreaCornerImpl = t__namespace.forwardRef((props, forwardedRef) => {
|
|
10712
|
+
const { __scopeScrollArea, ...cornerProps } = props;
|
|
10713
|
+
const context = useScrollAreaContext(CORNER_NAME, __scopeScrollArea);
|
|
10714
|
+
const [width, setWidth] = t__namespace.useState(0);
|
|
10715
|
+
const [height, setHeight] = t__namespace.useState(0);
|
|
10716
|
+
const hasSize = Boolean(width && height);
|
|
10717
|
+
useResizeObserver(context.scrollbarX, () => {
|
|
10718
|
+
const height2 = context.scrollbarX?.offsetHeight || 0;
|
|
10719
|
+
context.onCornerHeightChange(height2);
|
|
10720
|
+
setHeight(height2);
|
|
10721
|
+
});
|
|
10722
|
+
useResizeObserver(context.scrollbarY, () => {
|
|
10723
|
+
const width2 = context.scrollbarY?.offsetWidth || 0;
|
|
10724
|
+
context.onCornerWidthChange(width2);
|
|
10725
|
+
setWidth(width2);
|
|
10726
|
+
});
|
|
10727
|
+
return hasSize ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
10728
|
+
Primitive.div,
|
|
10729
|
+
{
|
|
10730
|
+
...cornerProps,
|
|
10731
|
+
ref: forwardedRef,
|
|
10732
|
+
style: {
|
|
10733
|
+
width,
|
|
10734
|
+
height,
|
|
10735
|
+
position: "absolute",
|
|
10736
|
+
right: context.dir === "ltr" ? 0 : void 0,
|
|
10737
|
+
left: context.dir === "rtl" ? 0 : void 0,
|
|
10738
|
+
bottom: 0,
|
|
10739
|
+
...props.style
|
|
10740
|
+
}
|
|
10741
|
+
}
|
|
10742
|
+
) : null;
|
|
10743
|
+
});
|
|
10744
|
+
function toInt(value) {
|
|
10745
|
+
return value ? parseInt(value, 10) : 0;
|
|
10746
|
+
}
|
|
10747
|
+
function getThumbRatio(viewportSize, contentSize) {
|
|
10748
|
+
const ratio = viewportSize / contentSize;
|
|
10749
|
+
return isNaN(ratio) ? 0 : ratio;
|
|
10750
|
+
}
|
|
10751
|
+
function getThumbSize(sizes) {
|
|
10752
|
+
const ratio = getThumbRatio(sizes.viewport, sizes.content);
|
|
10753
|
+
const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
|
|
10754
|
+
const thumbSize = (sizes.scrollbar.size - scrollbarPadding) * ratio;
|
|
10755
|
+
return Math.max(thumbSize, 18);
|
|
10756
|
+
}
|
|
10757
|
+
function getScrollPositionFromPointer(pointerPos, pointerOffset, sizes, dir = "ltr") {
|
|
10758
|
+
const thumbSizePx = getThumbSize(sizes);
|
|
10759
|
+
const thumbCenter = thumbSizePx / 2;
|
|
10760
|
+
const offset = pointerOffset || thumbCenter;
|
|
10761
|
+
const thumbOffsetFromEnd = thumbSizePx - offset;
|
|
10762
|
+
const minPointerPos = sizes.scrollbar.paddingStart + offset;
|
|
10763
|
+
const maxPointerPos = sizes.scrollbar.size - sizes.scrollbar.paddingEnd - thumbOffsetFromEnd;
|
|
10764
|
+
const maxScrollPos = sizes.content - sizes.viewport;
|
|
10765
|
+
const scrollRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
|
|
10766
|
+
const interpolate = linearScale([minPointerPos, maxPointerPos], scrollRange);
|
|
10767
|
+
return interpolate(pointerPos);
|
|
10768
|
+
}
|
|
10769
|
+
function getThumbOffsetFromScroll(scrollPos, sizes, dir = "ltr") {
|
|
10770
|
+
const thumbSizePx = getThumbSize(sizes);
|
|
10771
|
+
const scrollbarPadding = sizes.scrollbar.paddingStart + sizes.scrollbar.paddingEnd;
|
|
10772
|
+
const scrollbar = sizes.scrollbar.size - scrollbarPadding;
|
|
10773
|
+
const maxScrollPos = sizes.content - sizes.viewport;
|
|
10774
|
+
const maxThumbPos = scrollbar - thumbSizePx;
|
|
10775
|
+
const scrollClampRange = dir === "ltr" ? [0, maxScrollPos] : [maxScrollPos * -1, 0];
|
|
10776
|
+
const scrollWithoutMomentum = clamp(scrollPos, scrollClampRange);
|
|
10777
|
+
const interpolate = linearScale([0, maxScrollPos], [0, maxThumbPos]);
|
|
10778
|
+
return interpolate(scrollWithoutMomentum);
|
|
10779
|
+
}
|
|
10780
|
+
function linearScale(input, output) {
|
|
10781
|
+
return (value) => {
|
|
10782
|
+
if (input[0] === input[1] || output[0] === output[1])
|
|
10783
|
+
return output[0];
|
|
10784
|
+
const ratio = (output[1] - output[0]) / (input[1] - input[0]);
|
|
10785
|
+
return output[0] + ratio * (value - input[0]);
|
|
10786
|
+
};
|
|
10787
|
+
}
|
|
10788
|
+
function isScrollingWithinScrollbarBounds(scrollPos, maxScrollPos) {
|
|
10789
|
+
return scrollPos > 0 && scrollPos < maxScrollPos;
|
|
10790
|
+
}
|
|
10791
|
+
var addUnlinkedScrollListener = (node, handler = () => {
|
|
10792
|
+
}) => {
|
|
10793
|
+
let prevPosition = { left: node.scrollLeft, top: node.scrollTop };
|
|
10794
|
+
let rAF = 0;
|
|
10795
|
+
(function loop() {
|
|
10796
|
+
const position = { left: node.scrollLeft, top: node.scrollTop };
|
|
10797
|
+
const isHorizontalScroll = prevPosition.left !== position.left;
|
|
10798
|
+
const isVerticalScroll = prevPosition.top !== position.top;
|
|
10799
|
+
if (isHorizontalScroll || isVerticalScroll)
|
|
10800
|
+
handler();
|
|
10801
|
+
prevPosition = position;
|
|
10802
|
+
rAF = window.requestAnimationFrame(loop);
|
|
10803
|
+
})();
|
|
10804
|
+
return () => window.cancelAnimationFrame(rAF);
|
|
10805
|
+
};
|
|
10806
|
+
function useDebounceCallback(callback, delay) {
|
|
10807
|
+
const handleCallback = useCallbackRef(callback);
|
|
10808
|
+
const debounceTimerRef = t__namespace.useRef(0);
|
|
10809
|
+
t__namespace.useEffect(() => () => window.clearTimeout(debounceTimerRef.current), []);
|
|
10810
|
+
return t__namespace.useCallback(() => {
|
|
10811
|
+
window.clearTimeout(debounceTimerRef.current);
|
|
10812
|
+
debounceTimerRef.current = window.setTimeout(handleCallback, delay);
|
|
10813
|
+
}, [handleCallback, delay]);
|
|
10814
|
+
}
|
|
10815
|
+
function useResizeObserver(element, onResize) {
|
|
10816
|
+
const handleResize = useCallbackRef(onResize);
|
|
10817
|
+
useLayoutEffect2(() => {
|
|
10818
|
+
let rAF = 0;
|
|
10819
|
+
if (element) {
|
|
10820
|
+
const resizeObserver = new ResizeObserver(() => {
|
|
10821
|
+
cancelAnimationFrame(rAF);
|
|
10822
|
+
rAF = window.requestAnimationFrame(handleResize);
|
|
10823
|
+
});
|
|
10824
|
+
resizeObserver.observe(element);
|
|
10825
|
+
return () => {
|
|
10826
|
+
window.cancelAnimationFrame(rAF);
|
|
10827
|
+
resizeObserver.unobserve(element);
|
|
10828
|
+
};
|
|
10829
|
+
}
|
|
10830
|
+
}, [element, handleResize]);
|
|
10831
|
+
}
|
|
10832
|
+
var Root12 = ScrollArea;
|
|
10833
|
+
var Viewport2 = ScrollAreaViewport;
|
|
10834
|
+
var Corner = ScrollAreaCorner;
|
|
10835
|
+
var ScrollArea2 = t__namespace.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
10836
|
+
Root12,
|
|
10837
|
+
{
|
|
10838
|
+
ref,
|
|
10839
|
+
className: cn("relative overflow-hidden", className),
|
|
10840
|
+
...props,
|
|
10841
|
+
children: [
|
|
10842
|
+
/* @__PURE__ */ jsxRuntime.jsx(Viewport2, { className: "h-full w-full rounded-[inherit]", children }),
|
|
10843
|
+
/* @__PURE__ */ jsxRuntime.jsx(ScrollBar, {}),
|
|
10844
|
+
/* @__PURE__ */ jsxRuntime.jsx(Corner, {})
|
|
10845
|
+
]
|
|
10846
|
+
}
|
|
10847
|
+
));
|
|
10848
|
+
ScrollArea2.displayName = Root12.displayName;
|
|
10849
|
+
var ScrollBar = t__namespace.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
10850
|
+
ScrollAreaScrollbar,
|
|
10851
|
+
{
|
|
10852
|
+
ref,
|
|
10853
|
+
orientation,
|
|
10854
|
+
className: cn(
|
|
10855
|
+
"flex touch-none select-none transition-colors",
|
|
10856
|
+
orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]",
|
|
10857
|
+
orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]",
|
|
10858
|
+
className
|
|
10859
|
+
),
|
|
10860
|
+
...props,
|
|
10861
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
10862
|
+
}
|
|
10863
|
+
));
|
|
10864
|
+
ScrollBar.displayName = ScrollAreaScrollbar.displayName;
|
|
9690
10865
|
var separatorVariants = classVarianceAuthority.cva(
|
|
9691
10866
|
"shrink-0 bg-border",
|
|
9692
10867
|
{
|
|
@@ -9797,7 +10972,7 @@ var Separator3 = t__namespace.forwardRef(
|
|
|
9797
10972
|
{
|
|
9798
10973
|
ref,
|
|
9799
10974
|
decorative,
|
|
9800
|
-
orientation,
|
|
10975
|
+
orientation: orientation || void 0,
|
|
9801
10976
|
className: cn(
|
|
9802
10977
|
separatorVariants({ orientation, variant, size }),
|
|
9803
10978
|
className
|
|
@@ -9807,91 +10982,17 @@ var Separator3 = t__namespace.forwardRef(
|
|
|
9807
10982
|
)
|
|
9808
10983
|
);
|
|
9809
10984
|
Separator3.displayName = SeparatorPrimitive__namespace.Root.displayName;
|
|
9810
|
-
|
|
9811
|
-
// ../../node_modules/@radix-ui/primitive/dist/index.mjs
|
|
9812
|
-
function composeEventHandlers2(originalEventHandler, ourEventHandler, { checkForDefaultPrevented = true } = {}) {
|
|
9813
|
-
return function handleEvent(event) {
|
|
9814
|
-
originalEventHandler?.(event);
|
|
9815
|
-
if (checkForDefaultPrevented === false || !event.defaultPrevented) {
|
|
9816
|
-
return ourEventHandler?.(event);
|
|
9817
|
-
}
|
|
9818
|
-
};
|
|
9819
|
-
}
|
|
9820
|
-
var useInsertionEffect2 = t__namespace[" useInsertionEffect ".trim().toString()] || useLayoutEffect22;
|
|
9821
|
-
function useControllableState2({
|
|
9822
|
-
prop,
|
|
9823
|
-
defaultProp,
|
|
9824
|
-
onChange = () => {
|
|
9825
|
-
},
|
|
9826
|
-
caller
|
|
9827
|
-
}) {
|
|
9828
|
-
const [uncontrolledProp, setUncontrolledProp, onChangeRef] = useUncontrolledState2({
|
|
9829
|
-
defaultProp,
|
|
9830
|
-
onChange
|
|
9831
|
-
});
|
|
9832
|
-
const isControlled = prop !== void 0;
|
|
9833
|
-
const value = isControlled ? prop : uncontrolledProp;
|
|
9834
|
-
{
|
|
9835
|
-
const isControlledRef = t__namespace.useRef(prop !== void 0);
|
|
9836
|
-
t__namespace.useEffect(() => {
|
|
9837
|
-
const wasControlled = isControlledRef.current;
|
|
9838
|
-
if (wasControlled !== isControlled) {
|
|
9839
|
-
const from = wasControlled ? "controlled" : "uncontrolled";
|
|
9840
|
-
const to = isControlled ? "controlled" : "uncontrolled";
|
|
9841
|
-
console.warn(
|
|
9842
|
-
`${caller} is changing from ${from} to ${to}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`
|
|
9843
|
-
);
|
|
9844
|
-
}
|
|
9845
|
-
isControlledRef.current = isControlled;
|
|
9846
|
-
}, [isControlled, caller]);
|
|
9847
|
-
}
|
|
9848
|
-
const setValue = t__namespace.useCallback(
|
|
9849
|
-
(nextValue) => {
|
|
9850
|
-
if (isControlled) {
|
|
9851
|
-
const value2 = isFunction3(nextValue) ? nextValue(prop) : nextValue;
|
|
9852
|
-
if (value2 !== prop) {
|
|
9853
|
-
onChangeRef.current?.(value2);
|
|
9854
|
-
}
|
|
9855
|
-
} else {
|
|
9856
|
-
setUncontrolledProp(nextValue);
|
|
9857
|
-
}
|
|
9858
|
-
},
|
|
9859
|
-
[isControlled, prop, setUncontrolledProp, onChangeRef]
|
|
9860
|
-
);
|
|
9861
|
-
return [value, setValue];
|
|
9862
|
-
}
|
|
9863
|
-
function useUncontrolledState2({
|
|
9864
|
-
defaultProp,
|
|
9865
|
-
onChange
|
|
9866
|
-
}) {
|
|
9867
|
-
const [value, setValue] = t__namespace.useState(defaultProp);
|
|
9868
|
-
const prevValueRef = t__namespace.useRef(value);
|
|
9869
|
-
const onChangeRef = t__namespace.useRef(onChange);
|
|
9870
|
-
useInsertionEffect2(() => {
|
|
9871
|
-
onChangeRef.current = onChange;
|
|
9872
|
-
}, [onChange]);
|
|
9873
|
-
t__namespace.useEffect(() => {
|
|
9874
|
-
if (prevValueRef.current !== value) {
|
|
9875
|
-
onChangeRef.current?.(value);
|
|
9876
|
-
prevValueRef.current = value;
|
|
9877
|
-
}
|
|
9878
|
-
}, [value, prevValueRef]);
|
|
9879
|
-
return [value, setValue, onChangeRef];
|
|
9880
|
-
}
|
|
9881
|
-
function isFunction3(value) {
|
|
9882
|
-
return typeof value === "function";
|
|
9883
|
-
}
|
|
9884
10985
|
var NAME = "Toggle";
|
|
9885
10986
|
var Toggle = t__namespace.forwardRef((props, forwardedRef) => {
|
|
9886
10987
|
const { pressed: pressedProp, defaultPressed, onPressedChange, ...buttonProps } = props;
|
|
9887
|
-
const [pressed, setPressed] =
|
|
10988
|
+
const [pressed, setPressed] = useControllableState({
|
|
9888
10989
|
prop: pressedProp,
|
|
9889
10990
|
onChange: onPressedChange,
|
|
9890
10991
|
defaultProp: defaultPressed ?? false,
|
|
9891
10992
|
caller: NAME
|
|
9892
10993
|
});
|
|
9893
10994
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
9894
|
-
|
|
10995
|
+
Primitive.button,
|
|
9895
10996
|
{
|
|
9896
10997
|
type: "button",
|
|
9897
10998
|
"aria-pressed": pressed,
|
|
@@ -9899,7 +11000,7 @@ var Toggle = t__namespace.forwardRef((props, forwardedRef) => {
|
|
|
9899
11000
|
"data-disabled": props.disabled ? "" : void 0,
|
|
9900
11001
|
...buttonProps,
|
|
9901
11002
|
ref: forwardedRef,
|
|
9902
|
-
onClick:
|
|
11003
|
+
onClick: composeEventHandlers(props.onClick, () => {
|
|
9903
11004
|
if (!props.disabled) {
|
|
9904
11005
|
setPressed(!pressed);
|
|
9905
11006
|
}
|
|
@@ -9908,7 +11009,7 @@ var Toggle = t__namespace.forwardRef((props, forwardedRef) => {
|
|
|
9908
11009
|
);
|
|
9909
11010
|
});
|
|
9910
11011
|
Toggle.displayName = NAME;
|
|
9911
|
-
var
|
|
11012
|
+
var Root14 = Toggle;
|
|
9912
11013
|
var toggleVariants = classVarianceAuthority.cva(
|
|
9913
11014
|
"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",
|
|
9914
11015
|
{
|
|
@@ -9930,14 +11031,14 @@ var toggleVariants = classVarianceAuthority.cva(
|
|
|
9930
11031
|
}
|
|
9931
11032
|
);
|
|
9932
11033
|
var Toggle2 = t__namespace.forwardRef(({ className, variant, size, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
9933
|
-
|
|
11034
|
+
Root14,
|
|
9934
11035
|
{
|
|
9935
11036
|
ref,
|
|
9936
|
-
className: cn(toggleVariants({ variant, size, className })),
|
|
11037
|
+
className: cn("moonui-theme", toggleVariants({ variant, size, className })),
|
|
9937
11038
|
...props
|
|
9938
11039
|
}
|
|
9939
11040
|
));
|
|
9940
|
-
Toggle2.displayName =
|
|
11041
|
+
Toggle2.displayName = Root14.displayName;
|
|
9941
11042
|
var TooltipProvider = TooltipPrimitive__namespace.Provider;
|
|
9942
11043
|
var tooltipVariants = classVarianceAuthority.cva(
|
|
9943
11044
|
"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",
|
|
@@ -9969,7 +11070,7 @@ var TooltipArrow = t__namespace.forwardRef(({ className, ...props }, ref) => /*
|
|
|
9969
11070
|
TooltipPrimitive__namespace.Arrow,
|
|
9970
11071
|
{
|
|
9971
11072
|
ref,
|
|
9972
|
-
className: cn("fill-current", className),
|
|
11073
|
+
className: cn("moonui-theme", "fill-current", className),
|
|
9973
11074
|
...props
|
|
9974
11075
|
}
|
|
9975
11076
|
));
|
|
@@ -9979,7 +11080,7 @@ var TooltipContent = t__namespace.forwardRef(({ className, variant, size, showAr
|
|
|
9979
11080
|
{
|
|
9980
11081
|
ref,
|
|
9981
11082
|
sideOffset,
|
|
9982
|
-
className: cn(tooltipVariants({ variant, size }), className),
|
|
11083
|
+
className: cn("moonui-theme", tooltipVariants({ variant, size }), className),
|
|
9983
11084
|
...props,
|
|
9984
11085
|
children: [
|
|
9985
11086
|
props.children,
|
|
@@ -9997,7 +11098,6 @@ var SimpleTooltip = t__namespace.forwardRef(
|
|
|
9997
11098
|
side = "top",
|
|
9998
11099
|
align = "center",
|
|
9999
11100
|
delayDuration = 400,
|
|
10000
|
-
skipDelayDuration = 300,
|
|
10001
11101
|
sideOffset = 4,
|
|
10002
11102
|
showArrow = false,
|
|
10003
11103
|
className,
|
|
@@ -10013,7 +11113,6 @@ var SimpleTooltip = t__namespace.forwardRef(
|
|
|
10013
11113
|
defaultOpen,
|
|
10014
11114
|
onOpenChange,
|
|
10015
11115
|
delayDuration,
|
|
10016
|
-
skipDelayDuration,
|
|
10017
11116
|
children: [
|
|
10018
11117
|
/* @__PURE__ */ jsxRuntime.jsx(TooltipTrigger, { asChild: true, children }),
|
|
10019
11118
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -10587,7 +11686,7 @@ var SimpleEditor = t__namespace.default.forwardRef(
|
|
|
10587
11686
|
);
|
|
10588
11687
|
SimpleEditor.displayName = "SimpleEditor";
|
|
10589
11688
|
var CharacterCount = ({ content }) => {
|
|
10590
|
-
const [
|
|
11689
|
+
const [count3, setCount] = t.useState(0);
|
|
10591
11690
|
t.useEffect(() => {
|
|
10592
11691
|
const getPlainText = (html) => {
|
|
10593
11692
|
const div = document.createElement("div");
|
|
@@ -10597,7 +11696,7 @@ var CharacterCount = ({ content }) => {
|
|
|
10597
11696
|
setCount(getPlainText(content).length);
|
|
10598
11697
|
}, [content]);
|
|
10599
11698
|
return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
10600
|
-
|
|
11699
|
+
count3,
|
|
10601
11700
|
" characters"
|
|
10602
11701
|
] });
|
|
10603
11702
|
};
|
|
@@ -10651,7 +11750,7 @@ var SwipeableCard = t__namespace.forwardRef(
|
|
|
10651
11750
|
}
|
|
10652
11751
|
);
|
|
10653
11752
|
SwipeableCard.displayName = "SwipeableCard";
|
|
10654
|
-
var Switch = t__namespace.forwardRef(({ className, size = "md", variant = "primary", loading, leftIcon, rightIcon, description, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "inline-flex items-center gap-2", children: [
|
|
11753
|
+
var Switch = t__namespace.forwardRef(({ className, size = "md", variant = "primary", loading, leftIcon, rightIcon, description, ...props }, ref) => /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "moonui-theme inline-flex items-center gap-2", children: [
|
|
10655
11754
|
leftIcon && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: leftIcon }),
|
|
10656
11755
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
10657
11756
|
SwitchPrimitives__namespace.Root,
|
|
@@ -10698,6 +11797,112 @@ var Switch = t__namespace.forwardRef(({ className, size = "md", variant = "prima
|
|
|
10698
11797
|
description && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm text-muted-foreground", children: description })
|
|
10699
11798
|
] }));
|
|
10700
11799
|
Switch.displayName = SwitchPrimitives__namespace.Root.displayName;
|
|
11800
|
+
var TagsInput = t__namespace.forwardRef(
|
|
11801
|
+
({
|
|
11802
|
+
value = [],
|
|
11803
|
+
onChange,
|
|
11804
|
+
maxTags,
|
|
11805
|
+
variant = "primary",
|
|
11806
|
+
allowDuplicates = false,
|
|
11807
|
+
delimiter = ",",
|
|
11808
|
+
placeholder = "Add tag and press Enter",
|
|
11809
|
+
className,
|
|
11810
|
+
disabled,
|
|
11811
|
+
...props
|
|
11812
|
+
}, ref) => {
|
|
11813
|
+
const [inputValue, setInputValue] = t__namespace.useState("");
|
|
11814
|
+
const [error, setError] = t__namespace.useState("");
|
|
11815
|
+
const handleKeyDown = (e) => {
|
|
11816
|
+
if (e.key === "Enter" || e.key === delimiter) {
|
|
11817
|
+
e.preventDefault();
|
|
11818
|
+
addTag();
|
|
11819
|
+
} else if (e.key === "Backspace" && inputValue === "" && value.length > 0) {
|
|
11820
|
+
removeTag(value.length - 1);
|
|
11821
|
+
}
|
|
11822
|
+
};
|
|
11823
|
+
const addTag = () => {
|
|
11824
|
+
const tag = inputValue.trim();
|
|
11825
|
+
if (!tag)
|
|
11826
|
+
return;
|
|
11827
|
+
if (!allowDuplicates && value.includes(tag)) {
|
|
11828
|
+
setError("This tag already exists");
|
|
11829
|
+
setTimeout(() => setError(""), 2e3);
|
|
11830
|
+
return;
|
|
11831
|
+
}
|
|
11832
|
+
if (maxTags && value.length >= maxTags) {
|
|
11833
|
+
setError(`Maximum ${maxTags} tags allowed`);
|
|
11834
|
+
setTimeout(() => setError(""), 2e3);
|
|
11835
|
+
return;
|
|
11836
|
+
}
|
|
11837
|
+
onChange([...value, tag]);
|
|
11838
|
+
setInputValue("");
|
|
11839
|
+
setError("");
|
|
11840
|
+
};
|
|
11841
|
+
const removeTag = (index) => {
|
|
11842
|
+
if (disabled)
|
|
11843
|
+
return;
|
|
11844
|
+
onChange(value.filter((_, i) => i !== index));
|
|
11845
|
+
};
|
|
11846
|
+
return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "relative", children: [
|
|
11847
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
11848
|
+
"div",
|
|
11849
|
+
{
|
|
11850
|
+
className: cn(
|
|
11851
|
+
"flex min-h-[2.5rem] w-full flex-wrap gap-2 rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background",
|
|
11852
|
+
"dark:bg-zinc-950/50 dark:border-zinc-800",
|
|
11853
|
+
"focus-within:outline-none focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2",
|
|
11854
|
+
disabled && "cursor-not-allowed opacity-50",
|
|
11855
|
+
className
|
|
11856
|
+
),
|
|
11857
|
+
children: [
|
|
11858
|
+
value.map((tag, index) => /* @__PURE__ */ jsxRuntime.jsxs(
|
|
11859
|
+
Badge,
|
|
11860
|
+
{
|
|
11861
|
+
variant,
|
|
11862
|
+
className: "gap-1 pr-1.5",
|
|
11863
|
+
children: [
|
|
11864
|
+
/* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-xs", children: tag }),
|
|
11865
|
+
!disabled && /* @__PURE__ */ jsxRuntime.jsx(
|
|
11866
|
+
"button",
|
|
11867
|
+
{
|
|
11868
|
+
type: "button",
|
|
11869
|
+
onClick: () => removeTag(index),
|
|
11870
|
+
className: "ml-1 rounded-full outline-none ring-offset-background focus:ring-2 focus:ring-ring focus:ring-offset-2",
|
|
11871
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.X, { className: "h-3 w-3 text-muted-foreground hover:text-foreground transition-colors" })
|
|
11872
|
+
}
|
|
11873
|
+
)
|
|
11874
|
+
]
|
|
11875
|
+
},
|
|
11876
|
+
index
|
|
11877
|
+
)),
|
|
11878
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
11879
|
+
"input",
|
|
11880
|
+
{
|
|
11881
|
+
ref,
|
|
11882
|
+
type: "text",
|
|
11883
|
+
value: inputValue,
|
|
11884
|
+
onChange: (e) => setInputValue(e.target.value),
|
|
11885
|
+
onKeyDown: handleKeyDown,
|
|
11886
|
+
onBlur: addTag,
|
|
11887
|
+
disabled,
|
|
11888
|
+
placeholder: value.length === 0 ? placeholder : "",
|
|
11889
|
+
className: cn(
|
|
11890
|
+
"flex-1 bg-transparent outline-none placeholder:text-muted-foreground",
|
|
11891
|
+
"dark:placeholder:text-zinc-500",
|
|
11892
|
+
"min-w-[120px]",
|
|
11893
|
+
disabled && "cursor-not-allowed"
|
|
11894
|
+
),
|
|
11895
|
+
...props
|
|
11896
|
+
}
|
|
11897
|
+
)
|
|
11898
|
+
]
|
|
11899
|
+
}
|
|
11900
|
+
),
|
|
11901
|
+
error && /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-xs text-destructive", children: error })
|
|
11902
|
+
] });
|
|
11903
|
+
}
|
|
11904
|
+
);
|
|
11905
|
+
TagsInput.displayName = "TagsInput";
|
|
10701
11906
|
var Textarea = t__namespace.forwardRef(
|
|
10702
11907
|
({
|
|
10703
11908
|
className,
|
|
@@ -10716,6 +11921,7 @@ var Textarea = t__namespace.forwardRef(
|
|
|
10716
11921
|
"textarea",
|
|
10717
11922
|
{
|
|
10718
11923
|
className: cn(
|
|
11924
|
+
"moonui-theme",
|
|
10719
11925
|
"flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
|
10720
11926
|
className
|
|
10721
11927
|
),
|
|
@@ -10761,7 +11967,7 @@ var Toast = t__namespace.forwardRef(({ className, variant, ...props }, ref) => {
|
|
|
10761
11967
|
ToastPrimitives__namespace.Root,
|
|
10762
11968
|
{
|
|
10763
11969
|
ref,
|
|
10764
|
-
className: cn(toastVariants({ variant }), className),
|
|
11970
|
+
className: cn("moonui-theme", toastVariants({ variant }), className),
|
|
10765
11971
|
...props
|
|
10766
11972
|
}
|
|
10767
11973
|
);
|
|
@@ -10797,7 +12003,7 @@ var ToastTitle = t__namespace.forwardRef(({ className, ...props }, ref) => /* @_
|
|
|
10797
12003
|
ToastPrimitives__namespace.Title,
|
|
10798
12004
|
{
|
|
10799
12005
|
ref,
|
|
10800
|
-
className: cn("text-sm font-semibold [&+div]:text-xs", className),
|
|
12006
|
+
className: cn("moonui-theme", "text-sm font-semibold [&+div]:text-xs", className),
|
|
10801
12007
|
...props
|
|
10802
12008
|
}
|
|
10803
12009
|
));
|
|
@@ -10806,7 +12012,7 @@ var ToastDescription = t__namespace.forwardRef(({ className, ...props }, ref) =>
|
|
|
10806
12012
|
ToastPrimitives__namespace.Description,
|
|
10807
12013
|
{
|
|
10808
12014
|
ref,
|
|
10809
|
-
className: cn("text-sm opacity-90", className),
|
|
12015
|
+
className: cn("moonui-theme", "text-sm opacity-90", className),
|
|
10810
12016
|
...props
|
|
10811
12017
|
}
|
|
10812
12018
|
));
|
|
@@ -10871,6 +12077,8 @@ var reducer = (state, action) => {
|
|
|
10871
12077
|
...state,
|
|
10872
12078
|
toasts: state.toasts.filter((t2) => t2.id !== action.toastId)
|
|
10873
12079
|
};
|
|
12080
|
+
default:
|
|
12081
|
+
return state;
|
|
10874
12082
|
}
|
|
10875
12083
|
};
|
|
10876
12084
|
var listeners = [];
|
|
@@ -11001,11 +12209,15 @@ exports.BreadcrumbPage = BreadcrumbPage;
|
|
|
11001
12209
|
exports.BreadcrumbSeparator = BreadcrumbSeparator;
|
|
11002
12210
|
exports.Button = Button;
|
|
11003
12211
|
exports.Card = Card;
|
|
12212
|
+
exports.CardCVCInput = CardCVCInput;
|
|
11004
12213
|
exports.CardContent = CardContent;
|
|
11005
12214
|
exports.CardDescription = CardDescription;
|
|
12215
|
+
exports.CardExpiryInput = CardExpiryInput;
|
|
11006
12216
|
exports.CardFooter = CardFooter;
|
|
11007
12217
|
exports.CardHeader = CardHeader;
|
|
12218
|
+
exports.CardNumberInput = CardNumberInput;
|
|
11008
12219
|
exports.CardTitle = CardTitle;
|
|
12220
|
+
exports.CardZipInput = CardZipInput;
|
|
11009
12221
|
exports.Checkbox = Checkbox;
|
|
11010
12222
|
exports.CheckboxGroup = CheckboxGroup;
|
|
11011
12223
|
exports.CheckboxLabel = CheckboxLabel;
|
|
@@ -11053,16 +12265,172 @@ exports.DropdownMenuSubContent = DropdownMenuSubContent;
|
|
|
11053
12265
|
exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
11054
12266
|
exports.DropdownMenuTrigger = DropdownMenuTrigger;
|
|
11055
12267
|
exports.FileUpload = FileUpload;
|
|
12268
|
+
exports.FreeBadge = FreeBadge;
|
|
11056
12269
|
exports.GestureDrawer = GestureDrawer;
|
|
11057
12270
|
exports.GitHubStarButton = GitHubStarButton;
|
|
11058
12271
|
exports.GitHubStars = GitHubStars;
|
|
11059
12272
|
exports.GradientPicker = GradientPicker;
|
|
11060
12273
|
exports.Input = Input;
|
|
11061
12274
|
exports.Label = Label;
|
|
12275
|
+
exports.LockedComponent = LockedComponent;
|
|
11062
12276
|
exports.MonthPicker = MonthPicker;
|
|
11063
12277
|
exports.MoonLogo = MoonLogo;
|
|
11064
12278
|
exports.MoonLogoAnimated = MoonLogoAnimated;
|
|
11065
12279
|
exports.MoonLogoIcon = MoonLogoIcon;
|
|
12280
|
+
exports.MoonUIAccordion = Accordion;
|
|
12281
|
+
exports.MoonUIAccordionContent = AccordionContent;
|
|
12282
|
+
exports.MoonUIAccordionItem = AccordionItem;
|
|
12283
|
+
exports.MoonUIAccordionTrigger = AccordionTrigger;
|
|
12284
|
+
exports.MoonUIAlert = Alert;
|
|
12285
|
+
exports.MoonUIAlertDescription = AlertDescription;
|
|
12286
|
+
exports.MoonUIAlertTitle = AlertTitle;
|
|
12287
|
+
exports.MoonUIAspectRatio = AspectRatio;
|
|
12288
|
+
exports.MoonUIAvatar = Avatar;
|
|
12289
|
+
exports.MoonUIAvatarFallback = AvatarFallback;
|
|
12290
|
+
exports.MoonUIAvatarGroup = AvatarGroup;
|
|
12291
|
+
exports.MoonUIAvatarImage = AvatarImage;
|
|
12292
|
+
exports.MoonUIBadge = Badge;
|
|
12293
|
+
exports.MoonUIBreadcrumb = Breadcrumb;
|
|
12294
|
+
exports.MoonUIBreadcrumbEllipsis = BreadcrumbEllipsis;
|
|
12295
|
+
exports.MoonUIBreadcrumbItem = BreadcrumbItem;
|
|
12296
|
+
exports.MoonUIBreadcrumbLink = BreadcrumbLink;
|
|
12297
|
+
exports.MoonUIBreadcrumbList = BreadcrumbList;
|
|
12298
|
+
exports.MoonUIBreadcrumbPage = BreadcrumbPage;
|
|
12299
|
+
exports.MoonUIBreadcrumbSeparator = BreadcrumbSeparator;
|
|
12300
|
+
exports.MoonUIButton = Button;
|
|
12301
|
+
exports.MoonUICard = Card;
|
|
12302
|
+
exports.MoonUICardCVCInput = CardCVCInput;
|
|
12303
|
+
exports.MoonUICardContent = CardContent;
|
|
12304
|
+
exports.MoonUICardDescription = CardDescription;
|
|
12305
|
+
exports.MoonUICardExpiryInput = CardExpiryInput;
|
|
12306
|
+
exports.MoonUICardFooter = CardFooter;
|
|
12307
|
+
exports.MoonUICardHeader = CardHeader;
|
|
12308
|
+
exports.MoonUICardNumberInput = CardNumberInput;
|
|
12309
|
+
exports.MoonUICardTitle = CardTitle;
|
|
12310
|
+
exports.MoonUICardZipInput = CardZipInput;
|
|
12311
|
+
exports.MoonUICheckbox = Checkbox;
|
|
12312
|
+
exports.MoonUICheckboxGroup = CheckboxGroup;
|
|
12313
|
+
exports.MoonUICheckboxLabel = CheckboxLabel;
|
|
12314
|
+
exports.MoonUICheckboxWithLabel = CheckboxWithLabel;
|
|
12315
|
+
exports.MoonUICollapsible = Collapsible2;
|
|
12316
|
+
exports.MoonUICollapsibleContent = CollapsibleContent2;
|
|
12317
|
+
exports.MoonUICollapsibleTrigger = CollapsibleTrigger2;
|
|
12318
|
+
exports.MoonUIColorPicker = ColorPicker;
|
|
12319
|
+
exports.MoonUICommand = Command;
|
|
12320
|
+
exports.MoonUICommandDialog = CommandDialog;
|
|
12321
|
+
exports.MoonUICommandEmpty = CommandEmpty;
|
|
12322
|
+
exports.MoonUICommandGroup = CommandGroup;
|
|
12323
|
+
exports.MoonUICommandInput = CommandInput;
|
|
12324
|
+
exports.MoonUICommandItem = CommandItem;
|
|
12325
|
+
exports.MoonUICommandList = CommandList;
|
|
12326
|
+
exports.MoonUICommandSeparator = CommandSeparator;
|
|
12327
|
+
exports.MoonUICommandShortcut = CommandShortcut;
|
|
12328
|
+
exports.MoonUIDataTable = DataTable;
|
|
12329
|
+
exports.MoonUIDatePicker = DatePicker;
|
|
12330
|
+
exports.MoonUIDateRangePicker = DateRangePicker;
|
|
12331
|
+
exports.MoonUIDateTimePicker = DateTimePicker;
|
|
12332
|
+
exports.MoonUIDialog = Dialog;
|
|
12333
|
+
exports.MoonUIDialogClose = DialogClose;
|
|
12334
|
+
exports.MoonUIDialogContent = DialogContent;
|
|
12335
|
+
exports.MoonUIDialogDescription = DialogDescription;
|
|
12336
|
+
exports.MoonUIDialogFooter = DialogFooter;
|
|
12337
|
+
exports.MoonUIDialogHeader = DialogHeader;
|
|
12338
|
+
exports.MoonUIDialogTitle = DialogTitle;
|
|
12339
|
+
exports.MoonUIDialogTrigger = DialogTrigger;
|
|
12340
|
+
exports.MoonUIDraggableList = DraggableList;
|
|
12341
|
+
exports.MoonUIDropdownMenu = DropdownMenu;
|
|
12342
|
+
exports.MoonUIDropdownMenuCheckboxItem = DropdownMenuCheckboxItem;
|
|
12343
|
+
exports.MoonUIDropdownMenuContent = DropdownMenuContent;
|
|
12344
|
+
exports.MoonUIDropdownMenuGroup = DropdownMenuGroup;
|
|
12345
|
+
exports.MoonUIDropdownMenuItem = DropdownMenuItem;
|
|
12346
|
+
exports.MoonUIDropdownMenuLabel = DropdownMenuLabel;
|
|
12347
|
+
exports.MoonUIDropdownMenuPortal = DropdownMenuPortal;
|
|
12348
|
+
exports.MoonUIDropdownMenuRadioGroup = DropdownMenuRadioGroup;
|
|
12349
|
+
exports.MoonUIDropdownMenuRadioItem = DropdownMenuRadioItem;
|
|
12350
|
+
exports.MoonUIDropdownMenuSeparator = DropdownMenuSeparator;
|
|
12351
|
+
exports.MoonUIDropdownMenuShortcut = DropdownMenuShortcut;
|
|
12352
|
+
exports.MoonUIDropdownMenuSub = DropdownMenuSub;
|
|
12353
|
+
exports.MoonUIDropdownMenuSubContent = DropdownMenuSubContent;
|
|
12354
|
+
exports.MoonUIDropdownMenuSubTrigger = DropdownMenuSubTrigger;
|
|
12355
|
+
exports.MoonUIDropdownMenuTrigger = DropdownMenuTrigger;
|
|
12356
|
+
exports.MoonUIFileUpload = FileUpload;
|
|
12357
|
+
exports.MoonUIFreeBadge = FreeBadge;
|
|
12358
|
+
exports.MoonUIGestureDrawer = GestureDrawer;
|
|
12359
|
+
exports.MoonUIGitHubStars = GitHubStars;
|
|
12360
|
+
exports.MoonUIGradientPicker = GradientPicker;
|
|
12361
|
+
exports.MoonUIInput = Input;
|
|
12362
|
+
exports.MoonUILabel = Label;
|
|
12363
|
+
exports.MoonUILockedComponent = LockedComponent;
|
|
12364
|
+
exports.MoonUIMonthPicker = MonthPicker;
|
|
12365
|
+
exports.MoonUIMoonLogo = MoonLogo;
|
|
12366
|
+
exports.MoonUIPagination = Pagination;
|
|
12367
|
+
exports.MoonUIPaginationContent = PaginationContent;
|
|
12368
|
+
exports.MoonUIPaginationEllipsis = PaginationEllipsis;
|
|
12369
|
+
exports.MoonUIPaginationItem = PaginationItem;
|
|
12370
|
+
exports.MoonUIPaginationLink = PaginationLink;
|
|
12371
|
+
exports.MoonUIPaginationNext = PaginationNext;
|
|
12372
|
+
exports.MoonUIPaginationPrevious = PaginationPrevious;
|
|
12373
|
+
exports.MoonUIPhoneInput = PhoneInput;
|
|
12374
|
+
exports.MoonUIPopover = Popover;
|
|
12375
|
+
exports.MoonUIPopoverContent = PopoverContent;
|
|
12376
|
+
exports.MoonUIPopoverTrigger = PopoverTrigger;
|
|
12377
|
+
exports.MoonUIProBadge = ProBadge;
|
|
12378
|
+
exports.MoonUIProComponentWrapper = ProComponentWrapper;
|
|
12379
|
+
exports.MoonUIProgress = Progress;
|
|
12380
|
+
exports.MoonUIRadioGroup = RadioGroup2;
|
|
12381
|
+
exports.MoonUIRadioGroupItem = RadioGroupItem;
|
|
12382
|
+
exports.MoonUIRadioItemWithLabel = RadioItemWithLabel;
|
|
12383
|
+
exports.MoonUIRadioLabel = RadioLabel;
|
|
12384
|
+
exports.MoonUIRichTextEditor = RichTextEditor;
|
|
12385
|
+
exports.MoonUIScrollArea = ScrollArea2;
|
|
12386
|
+
exports.MoonUIScrollBar = ScrollBar;
|
|
12387
|
+
exports.MoonUISelect = Select;
|
|
12388
|
+
exports.MoonUISelectContent = SelectContent;
|
|
12389
|
+
exports.MoonUISelectGroup = SelectGroup;
|
|
12390
|
+
exports.MoonUISelectItem = SelectItem;
|
|
12391
|
+
exports.MoonUISelectLabel = SelectLabel;
|
|
12392
|
+
exports.MoonUISelectScrollDownButton = SelectScrollDownButton;
|
|
12393
|
+
exports.MoonUISelectScrollUpButton = SelectScrollUpButton;
|
|
12394
|
+
exports.MoonUISelectSeparator = SelectSeparator;
|
|
12395
|
+
exports.MoonUISelectTrigger = SelectTrigger;
|
|
12396
|
+
exports.MoonUISelectValue = SelectValue;
|
|
12397
|
+
exports.MoonUISeparator = Separator3;
|
|
12398
|
+
exports.MoonUISimpleColorPicker = SimpleColorPicker;
|
|
12399
|
+
exports.MoonUISimpleEditor = SimpleEditor;
|
|
12400
|
+
exports.MoonUISkeleton = Skeleton;
|
|
12401
|
+
exports.MoonUISkeletonAvatar = SkeletonAvatar;
|
|
12402
|
+
exports.MoonUISkeletonCard = SkeletonCard;
|
|
12403
|
+
exports.MoonUISkeletonText = SkeletonText;
|
|
12404
|
+
exports.MoonUISlider = Slider;
|
|
12405
|
+
exports.MoonUISwipeableCard = SwipeableCard;
|
|
12406
|
+
exports.MoonUISwitch = Switch;
|
|
12407
|
+
exports.MoonUITable = Table;
|
|
12408
|
+
exports.MoonUITableBody = TableBody;
|
|
12409
|
+
exports.MoonUITableCaption = TableCaption;
|
|
12410
|
+
exports.MoonUITableCell = TableCell;
|
|
12411
|
+
exports.MoonUITableFooter = TableFooter;
|
|
12412
|
+
exports.MoonUITableHead = TableHead;
|
|
12413
|
+
exports.MoonUITableHeader = TableHeader;
|
|
12414
|
+
exports.MoonUITableRow = TableRow;
|
|
12415
|
+
exports.MoonUITabs = Tabs;
|
|
12416
|
+
exports.MoonUITabsContent = TabsContent;
|
|
12417
|
+
exports.MoonUITabsList = TabsList;
|
|
12418
|
+
exports.MoonUITabsTrigger = TabsTrigger;
|
|
12419
|
+
exports.MoonUITagsInput = TagsInput;
|
|
12420
|
+
exports.MoonUITextarea = Textarea;
|
|
12421
|
+
exports.MoonUIToast = Toast;
|
|
12422
|
+
exports.MoonUIToastAction = ToastAction;
|
|
12423
|
+
exports.MoonUIToastClose = ToastClose;
|
|
12424
|
+
exports.MoonUIToastDescription = ToastDescription;
|
|
12425
|
+
exports.MoonUIToastProvider = ToastProvider;
|
|
12426
|
+
exports.MoonUIToastTitle = ToastTitle;
|
|
12427
|
+
exports.MoonUIToastViewport = ToastViewport;
|
|
12428
|
+
exports.MoonUIToaster = Toaster;
|
|
12429
|
+
exports.MoonUIToggle = Toggle2;
|
|
12430
|
+
exports.MoonUITooltip = Tooltip;
|
|
12431
|
+
exports.MoonUITooltipContent = TooltipContent;
|
|
12432
|
+
exports.MoonUITooltipProvider = TooltipProvider;
|
|
12433
|
+
exports.MoonUITooltipTrigger = TooltipTrigger;
|
|
11066
12434
|
exports.Pagination = Pagination;
|
|
11067
12435
|
exports.PaginationContent = PaginationContent;
|
|
11068
12436
|
exports.PaginationEllipsis = PaginationEllipsis;
|
|
@@ -11070,6 +12438,7 @@ exports.PaginationItem = PaginationItem;
|
|
|
11070
12438
|
exports.PaginationLink = PaginationLink;
|
|
11071
12439
|
exports.PaginationNext = PaginationNext;
|
|
11072
12440
|
exports.PaginationPrevious = PaginationPrevious;
|
|
12441
|
+
exports.PhoneInput = PhoneInput;
|
|
11073
12442
|
exports.Popover = Popover;
|
|
11074
12443
|
exports.PopoverAnchor = PopoverAnchor;
|
|
11075
12444
|
exports.PopoverClose = PopoverClose;
|
|
@@ -11078,12 +12447,16 @@ exports.PopoverFooter = PopoverFooter;
|
|
|
11078
12447
|
exports.PopoverHeader = PopoverHeader;
|
|
11079
12448
|
exports.PopoverSeparator = PopoverSeparator;
|
|
11080
12449
|
exports.PopoverTrigger = PopoverTrigger;
|
|
12450
|
+
exports.ProBadge = ProBadge;
|
|
12451
|
+
exports.ProComponentWrapper = ProComponentWrapper;
|
|
11081
12452
|
exports.Progress = Progress;
|
|
11082
12453
|
exports.RadioGroup = RadioGroup2;
|
|
11083
12454
|
exports.RadioGroupItem = RadioGroupItem;
|
|
11084
12455
|
exports.RadioItemWithLabel = RadioItemWithLabel;
|
|
11085
12456
|
exports.RadioLabel = RadioLabel;
|
|
11086
12457
|
exports.RichTextEditor = RichTextEditor;
|
|
12458
|
+
exports.ScrollArea = ScrollArea2;
|
|
12459
|
+
exports.ScrollBar = ScrollBar;
|
|
11087
12460
|
exports.Select = Select;
|
|
11088
12461
|
exports.SelectContent = SelectContent;
|
|
11089
12462
|
exports.SelectGroup = SelectGroup;
|
|
@@ -11117,6 +12490,7 @@ exports.Tabs = Tabs;
|
|
|
11117
12490
|
exports.TabsContent = TabsContent;
|
|
11118
12491
|
exports.TabsList = TabsList;
|
|
11119
12492
|
exports.TabsTrigger = TabsTrigger;
|
|
12493
|
+
exports.TagsInput = TagsInput;
|
|
11120
12494
|
exports.Textarea = Textarea;
|
|
11121
12495
|
exports.Toast = Toast;
|
|
11122
12496
|
exports.ToastAction = ToastAction;
|
|
@@ -11140,6 +12514,10 @@ exports.collapsibleContentVariants = collapsibleContentVariants;
|
|
|
11140
12514
|
exports.collapsibleTriggerVariants = collapsibleTriggerVariants;
|
|
11141
12515
|
exports.createFilterableColumn = createFilterableColumn;
|
|
11142
12516
|
exports.createSortableHeader = createSortableHeader;
|
|
12517
|
+
exports.moonUIBadgeVariants = badgeVariants;
|
|
12518
|
+
exports.moonUIButtonVariants = buttonVariants;
|
|
12519
|
+
exports.moonUISkeletonVariants = skeletonVariants;
|
|
12520
|
+
exports.moonUIToggleVariants = toggleVariants;
|
|
11143
12521
|
exports.popoverContentVariants = popoverContentVariants;
|
|
11144
12522
|
exports.progressVariants = progressVariants;
|
|
11145
12523
|
exports.separatorVariants = separatorVariants;
|