pelatform-ui 1.2.0 → 1.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/README.md +60 -42
- package/dist/animation.js +2 -40
- package/dist/base.js +2 -873
- package/dist/{chunk-5YSCAE7Y.js → chunk-NOAZYT3J.js} +2 -4
- package/dist/components.js +156 -140
- package/dist/hooks.js +4 -895
- package/dist/index.js +0 -1
- package/dist/radix.js +2 -20737
- package/package.json +31 -3
- package/dist/chunk-4OZO7TEB.js +0 -57803
- package/dist/chunk-4VNS5WPM.js +0 -42
- package/dist/chunk-B3I74Y4P.js +0 -11228
- package/dist/chunk-BQXV2NHY.js +0 -100
- package/dist/chunk-FC24ZVEO.js +0 -553
- package/dist/chunk-WFCSII5G.js +0 -28043
package/dist/components.js
CHANGED
|
@@ -1,55 +1,7 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import {
|
|
3
|
-
HoverBackground,
|
|
4
|
-
motion,
|
|
5
|
-
useAnimationFrame,
|
|
6
|
-
useMotionTemplate,
|
|
7
|
-
useMotionValue,
|
|
8
|
-
useTransform
|
|
9
|
-
} from "./chunk-B3I74Y4P.js";
|
|
10
|
-
import {
|
|
11
|
-
Alert,
|
|
12
|
-
AlertDialog,
|
|
13
|
-
AlertDialogAction,
|
|
14
|
-
AlertDialogCancel,
|
|
15
|
-
AlertDialogContent,
|
|
16
|
-
AlertDialogDescription,
|
|
17
|
-
AlertDialogFooter,
|
|
18
|
-
AlertDialogHeader,
|
|
19
|
-
AlertDialogTitle,
|
|
20
|
-
AlertTitle,
|
|
21
|
-
Avatar,
|
|
22
|
-
AvatarFallback,
|
|
23
|
-
AvatarImage,
|
|
24
|
-
Badge,
|
|
25
|
-
Button,
|
|
26
|
-
Card,
|
|
27
|
-
CardContent,
|
|
28
|
-
Collapsible,
|
|
29
|
-
CollapsibleContent,
|
|
30
|
-
CollapsibleTrigger,
|
|
31
|
-
CommandDialog,
|
|
32
|
-
CommandInput,
|
|
33
|
-
CommandList,
|
|
34
|
-
Drawer,
|
|
35
|
-
DrawerContent,
|
|
36
|
-
DrawerDescription,
|
|
37
|
-
DrawerTitle,
|
|
38
|
-
DrawerTrigger,
|
|
39
|
-
DropdownMenu,
|
|
40
|
-
DropdownMenuContent,
|
|
41
|
-
DropdownMenuItem,
|
|
42
|
-
DropdownMenuRadioGroup,
|
|
43
|
-
DropdownMenuRadioItem,
|
|
44
|
-
DropdownMenuSub,
|
|
45
|
-
DropdownMenuSubContent,
|
|
46
|
-
DropdownMenuSubTrigger,
|
|
47
|
-
DropdownMenuTrigger,
|
|
48
|
-
TooltipProvider
|
|
49
|
-
} from "./chunk-WFCSII5G.js";
|
|
50
2
|
import {
|
|
51
3
|
useMetaColor
|
|
52
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-NOAZYT3J.js";
|
|
53
5
|
import {
|
|
54
6
|
cn
|
|
55
7
|
} from "./chunk-7EOSDFS3.js";
|
|
@@ -57,44 +9,25 @@ import {
|
|
|
57
9
|
DEFAULT_THEME_MODE,
|
|
58
10
|
THEME_MODES
|
|
59
11
|
} from "./chunk-HW52LCWN.js";
|
|
60
|
-
import {
|
|
61
|
-
toast
|
|
62
|
-
} from "./chunk-4OZO7TEB.js";
|
|
63
|
-
import {
|
|
64
|
-
ArrowUpRight,
|
|
65
|
-
Check,
|
|
66
|
-
ChevronDown,
|
|
67
|
-
ChevronLeft,
|
|
68
|
-
CircleAlert,
|
|
69
|
-
CircleCheck,
|
|
70
|
-
CircleX,
|
|
71
|
-
Download,
|
|
72
|
-
Globe,
|
|
73
|
-
Info,
|
|
74
|
-
Languages,
|
|
75
|
-
Loader,
|
|
76
|
-
Menu,
|
|
77
|
-
Monitor,
|
|
78
|
-
Moon,
|
|
79
|
-
Plus,
|
|
80
|
-
Search,
|
|
81
|
-
Sun,
|
|
82
|
-
TriangleAlert
|
|
83
|
-
} from "./chunk-FC24ZVEO.js";
|
|
84
|
-
import {
|
|
85
|
-
J,
|
|
86
|
-
z
|
|
87
|
-
} from "./chunk-BQXV2NHY.js";
|
|
88
|
-
import "./chunk-4VNS5WPM.js";
|
|
89
12
|
|
|
90
13
|
// src/components/feedback/alert.tsx
|
|
14
|
+
import {
|
|
15
|
+
CheckIcon,
|
|
16
|
+
CircleAlertIcon,
|
|
17
|
+
CircleCheckIcon,
|
|
18
|
+
CircleXIcon,
|
|
19
|
+
InfoIcon,
|
|
20
|
+
TriangleAlertIcon
|
|
21
|
+
} from "lucide-react";
|
|
22
|
+
import { toast } from "sonner";
|
|
23
|
+
import { Alert, AlertTitle } from "@pelatform/ui.components/base";
|
|
91
24
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
92
25
|
var iconMap = {
|
|
93
|
-
primary: /* @__PURE__ */ jsx(
|
|
94
|
-
success: /* @__PURE__ */ jsx(
|
|
95
|
-
info: /* @__PURE__ */ jsx(
|
|
96
|
-
warning: /* @__PURE__ */ jsx(
|
|
97
|
-
destructive: /* @__PURE__ */ jsx(
|
|
26
|
+
primary: /* @__PURE__ */ jsx(CircleAlertIcon, {}),
|
|
27
|
+
success: /* @__PURE__ */ jsx(CircleCheckIcon, {}),
|
|
28
|
+
info: /* @__PURE__ */ jsx(InfoIcon, {}),
|
|
29
|
+
warning: /* @__PURE__ */ jsx(TriangleAlertIcon, {}),
|
|
30
|
+
destructive: /* @__PURE__ */ jsx(CircleXIcon, {})
|
|
98
31
|
};
|
|
99
32
|
function AlertToast({
|
|
100
33
|
message = "This is a toast",
|
|
@@ -119,15 +52,15 @@ function AlertNotification({ message, variant = "info" }) {
|
|
|
119
52
|
const getIcon = () => {
|
|
120
53
|
switch (variant) {
|
|
121
54
|
case "destructive":
|
|
122
|
-
return /* @__PURE__ */ jsx(
|
|
55
|
+
return /* @__PURE__ */ jsx(CircleAlertIcon, {});
|
|
123
56
|
case "success":
|
|
124
|
-
return /* @__PURE__ */ jsx(
|
|
57
|
+
return /* @__PURE__ */ jsx(CheckIcon, {});
|
|
125
58
|
case "info":
|
|
126
|
-
return /* @__PURE__ */ jsx(
|
|
59
|
+
return /* @__PURE__ */ jsx(InfoIcon, {});
|
|
127
60
|
case "warning":
|
|
128
|
-
return /* @__PURE__ */ jsx(
|
|
61
|
+
return /* @__PURE__ */ jsx(TriangleAlertIcon, {});
|
|
129
62
|
default:
|
|
130
|
-
return /* @__PURE__ */ jsx(
|
|
63
|
+
return /* @__PURE__ */ jsx(InfoIcon, {});
|
|
131
64
|
}
|
|
132
65
|
};
|
|
133
66
|
return /* @__PURE__ */ jsxs(Alert, { variant, children: [
|
|
@@ -141,7 +74,7 @@ var AlertComingsoon = ({
|
|
|
141
74
|
} = {}) => {
|
|
142
75
|
toast.custom(
|
|
143
76
|
() => /* @__PURE__ */ jsxs(Alert, { variant, children: [
|
|
144
|
-
/* @__PURE__ */ jsx(
|
|
77
|
+
/* @__PURE__ */ jsx(CircleAlertIcon, {}),
|
|
145
78
|
/* @__PURE__ */ jsx(AlertTitle, { children: message })
|
|
146
79
|
] }),
|
|
147
80
|
{
|
|
@@ -156,6 +89,16 @@ var AlertComingsoon = ({
|
|
|
156
89
|
};
|
|
157
90
|
|
|
158
91
|
// src/components/feedback/dialog.tsx
|
|
92
|
+
import {
|
|
93
|
+
AlertDialog,
|
|
94
|
+
AlertDialogAction,
|
|
95
|
+
AlertDialogCancel,
|
|
96
|
+
AlertDialogContent,
|
|
97
|
+
AlertDialogDescription,
|
|
98
|
+
AlertDialogFooter,
|
|
99
|
+
AlertDialogHeader,
|
|
100
|
+
AlertDialogTitle
|
|
101
|
+
} from "@pelatform/ui.components/base";
|
|
159
102
|
import { jsx as jsx2, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
160
103
|
var ConfirmDismissDialog = ({
|
|
161
104
|
open,
|
|
@@ -188,6 +131,7 @@ var ConfirmDismissDialog = ({
|
|
|
188
131
|
};
|
|
189
132
|
|
|
190
133
|
// src/components/feedback/screen-loader.tsx
|
|
134
|
+
import { LoaderIcon } from "lucide-react";
|
|
191
135
|
import { jsx as jsx3, jsxs as jsxs3 } from "react/jsx-runtime";
|
|
192
136
|
function ScreenLoader({
|
|
193
137
|
loadingText = "Loading...",
|
|
@@ -198,7 +142,7 @@ function ScreenLoader({
|
|
|
198
142
|
} = {}) {
|
|
199
143
|
if (contentLoader) {
|
|
200
144
|
return /* @__PURE__ */ jsx3("div", { className: cn("flex w-full grow items-center justify-center", className), children: /* @__PURE__ */ jsxs3("div", { className: "flex items-center gap-2.5", children: [
|
|
201
|
-
/* @__PURE__ */ jsx3(
|
|
145
|
+
/* @__PURE__ */ jsx3(LoaderIcon, { className: cn("animate-spin", spinnerClassName) }),
|
|
202
146
|
/* @__PURE__ */ jsx3("span", { className: textClassName, children: loadingText })
|
|
203
147
|
] }) });
|
|
204
148
|
}
|
|
@@ -213,7 +157,7 @@ function ScreenLoader({
|
|
|
213
157
|
"aria-live": "polite",
|
|
214
158
|
"aria-label": loadingText,
|
|
215
159
|
children: [
|
|
216
|
-
/* @__PURE__ */ jsx3(
|
|
160
|
+
/* @__PURE__ */ jsx3(LoaderIcon, { className: cn("animate-spin", spinnerClassName) }),
|
|
217
161
|
/* @__PURE__ */ jsx3("div", { className: textClassName, children: loadingText })
|
|
218
162
|
]
|
|
219
163
|
}
|
|
@@ -221,6 +165,7 @@ function ScreenLoader({
|
|
|
221
165
|
}
|
|
222
166
|
|
|
223
167
|
// src/components/layout/auth.tsx
|
|
168
|
+
import { Card, CardContent } from "@pelatform/ui.components/base";
|
|
224
169
|
import { jsx as jsx4, jsxs as jsxs4 } from "react/jsx-runtime";
|
|
225
170
|
function LayoutAuth({
|
|
226
171
|
children,
|
|
@@ -324,6 +269,7 @@ function Body({ slug, children, className }) {
|
|
|
324
269
|
}
|
|
325
270
|
|
|
326
271
|
// src/components/layout/comingsoon.tsx
|
|
272
|
+
import { HoverBackground } from "@pelatform/ui.components/animation";
|
|
327
273
|
import { jsx as jsx8, jsxs as jsxs7 } from "react/jsx-runtime";
|
|
328
274
|
function ComingSoon({ className, title, description }) {
|
|
329
275
|
return /* @__PURE__ */ jsx8("div", { className: cn("h-[calc(100vh-54px)] w-full overflow-hidden", className), children: /* @__PURE__ */ jsx8(
|
|
@@ -351,6 +297,7 @@ function ComingSoon({ className, title, description }) {
|
|
|
351
297
|
}
|
|
352
298
|
|
|
353
299
|
// src/components/layout/error.tsx
|
|
300
|
+
import { Badge } from "@pelatform/ui.components/base";
|
|
354
301
|
import { jsx as jsx9, jsxs as jsxs8 } from "react/jsx-runtime";
|
|
355
302
|
function ErrorComponents({
|
|
356
303
|
className,
|
|
@@ -435,6 +382,9 @@ function ErrorComponents({
|
|
|
435
382
|
] });
|
|
436
383
|
}
|
|
437
384
|
|
|
385
|
+
// src/components/layout/section.tsx
|
|
386
|
+
import { PlusIcon } from "lucide-react";
|
|
387
|
+
|
|
438
388
|
// src/components/ui/grid-background.tsx
|
|
439
389
|
import { jsx as jsx10, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
440
390
|
var GridBackground = ({
|
|
@@ -484,7 +434,7 @@ import { jsx as jsx11, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
|
484
434
|
var Cross = () => /* @__PURE__ */ jsxs10("div", { className: "relative h-6 w-6", children: [
|
|
485
435
|
/* @__PURE__ */ jsx11("div", { className: "absolute start-3 h-6 w-px bg-background" }),
|
|
486
436
|
/* @__PURE__ */ jsx11("div", { className: "absolute top-3 h-px w-6 bg-background" }),
|
|
487
|
-
/* @__PURE__ */ jsx11("div", { className: "absolute start-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsx11(
|
|
437
|
+
/* @__PURE__ */ jsx11("div", { className: "absolute start-1/2 top-1/2 -translate-x-1/2 -translate-y-1/2", children: /* @__PURE__ */ jsx11(PlusIcon, { size: 20, className: "text-border/70 dark:text-border" }) })
|
|
488
438
|
] });
|
|
489
439
|
var Section = ({ children, sectionClassName, className, ...props }) => /* @__PURE__ */ jsx11("section", { className: sectionClassName, ...props, children: /* @__PURE__ */ jsxs10("div", { className: "grid-container relative mx-auto", children: [
|
|
490
440
|
/* @__PURE__ */ jsx11(GridBackground, { maxWidthClass: "grid-container" }),
|
|
@@ -533,10 +483,12 @@ function CodeDisplay({
|
|
|
533
483
|
}
|
|
534
484
|
|
|
535
485
|
// src/components/mdx/download.tsx
|
|
486
|
+
import { DownloadIcon } from "lucide-react";
|
|
487
|
+
import { Button } from "@pelatform/ui.components/base";
|
|
536
488
|
import { jsx as jsx16, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
537
489
|
function DownloadFile({ children, className, href }) {
|
|
538
490
|
return /* @__PURE__ */ jsx16("div", { className: "inline-flex pb-4", children: /* @__PURE__ */ jsx16(Button, { size: "lg", className: cn("rounded-full", className), children: /* @__PURE__ */ jsxs12("a", { href, target: "_blank", rel: "noopener noreferrer", children: [
|
|
539
|
-
/* @__PURE__ */ jsx16(
|
|
491
|
+
/* @__PURE__ */ jsx16(DownloadIcon, { className: "me-2 size-5" }),
|
|
540
492
|
children
|
|
541
493
|
] }) }) });
|
|
542
494
|
}
|
|
@@ -612,6 +564,8 @@ function Youtube({ id }) {
|
|
|
612
564
|
}
|
|
613
565
|
|
|
614
566
|
// src/components/navigation/back-link.tsx
|
|
567
|
+
import { ChevronLeftIcon } from "lucide-react";
|
|
568
|
+
import { Button as Button2 } from "@pelatform/ui.components/base";
|
|
615
569
|
import { jsx as jsx22, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
616
570
|
function BackLink({ Link = DefaultLink, children, href, className }) {
|
|
617
571
|
return /* @__PURE__ */ jsxs13(
|
|
@@ -624,12 +578,12 @@ function BackLink({ Link = DefaultLink, children, href, className }) {
|
|
|
624
578
|
),
|
|
625
579
|
children: [
|
|
626
580
|
/* @__PURE__ */ jsx22(
|
|
627
|
-
|
|
581
|
+
Button2,
|
|
628
582
|
{
|
|
629
583
|
size: "icon",
|
|
630
584
|
variant: "secondary",
|
|
631
585
|
className: "size-7.5! transition-transform duration-100 group-hover:-translate-x-0.5",
|
|
632
|
-
children: /* @__PURE__ */ jsx22(
|
|
586
|
+
children: /* @__PURE__ */ jsx22(ChevronLeftIcon, {})
|
|
633
587
|
}
|
|
634
588
|
),
|
|
635
589
|
/* @__PURE__ */ jsx22("span", { className: "font-semibold text-lg", children })
|
|
@@ -640,6 +594,8 @@ function BackLink({ Link = DefaultLink, children, href, className }) {
|
|
|
640
594
|
|
|
641
595
|
// src/components/navigation/command-menu.tsx
|
|
642
596
|
import * as React from "react";
|
|
597
|
+
import { SearchIcon } from "lucide-react";
|
|
598
|
+
import { Button as Button3, CommandDialog, CommandInput, CommandList } from "@pelatform/ui.components/base";
|
|
643
599
|
import { Fragment as Fragment2, jsx as jsx23, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
644
600
|
function CommandMenu({
|
|
645
601
|
children,
|
|
@@ -674,7 +630,7 @@ function CommandMenu({
|
|
|
674
630
|
}, []);
|
|
675
631
|
return /* @__PURE__ */ jsxs14(Fragment2, { children: [
|
|
676
632
|
/* @__PURE__ */ jsxs14(
|
|
677
|
-
|
|
633
|
+
Button3,
|
|
678
634
|
{
|
|
679
635
|
size: "sm",
|
|
680
636
|
variant: "outline",
|
|
@@ -683,7 +639,7 @@ function CommandMenu({
|
|
|
683
639
|
"aria-label": `Open command menu (${keyHint})`,
|
|
684
640
|
...props,
|
|
685
641
|
children: [
|
|
686
|
-
/* @__PURE__ */ jsx23(
|
|
642
|
+
/* @__PURE__ */ jsx23(SearchIcon, { className: "me-2 size-4" }),
|
|
687
643
|
/* @__PURE__ */ jsx23("span", { className: "inline-flex text-muted-foreground", children: searchButtonText }),
|
|
688
644
|
/* @__PURE__ */ jsx23(
|
|
689
645
|
"kbd",
|
|
@@ -715,6 +671,16 @@ function CommandMenu({
|
|
|
715
671
|
}
|
|
716
672
|
|
|
717
673
|
// src/components/navigation/main-nav.tsx
|
|
674
|
+
import { ArrowUpRightIcon, ChevronDownIcon } from "lucide-react";
|
|
675
|
+
import {
|
|
676
|
+
DropdownMenu,
|
|
677
|
+
DropdownMenuContent,
|
|
678
|
+
DropdownMenuItem,
|
|
679
|
+
DropdownMenuSub,
|
|
680
|
+
DropdownMenuSubContent,
|
|
681
|
+
DropdownMenuSubTrigger,
|
|
682
|
+
DropdownMenuTrigger
|
|
683
|
+
} from "@pelatform/ui.components/base";
|
|
718
684
|
import { jsx as jsx24, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
719
685
|
function MainNav({ Link = DefaultLink, pathname, items, className }) {
|
|
720
686
|
return /* @__PURE__ */ jsx24("div", { className: cn("me-4 hidden items-center justify-center md:flex", className), children: /* @__PURE__ */ jsx24("nav", { className: "flex items-center gap-4 font-medium text-sm xl:gap-6", children: items.map((item) => /* @__PURE__ */ jsx24(NavItemRenderer, { Link, item, pathname, level: 1 }, item.title)) }) });
|
|
@@ -738,7 +704,7 @@ function NavItemRenderer({ Link = DefaultLink, item, pathname, level }) {
|
|
|
738
704
|
children: [
|
|
739
705
|
item.icon && /* @__PURE__ */ jsx24(item.icon, {}),
|
|
740
706
|
item.title,
|
|
741
|
-
/* @__PURE__ */ jsx24(
|
|
707
|
+
/* @__PURE__ */ jsx24(ChevronDownIcon, { className: "size-3.5" })
|
|
742
708
|
]
|
|
743
709
|
}
|
|
744
710
|
) }),
|
|
@@ -775,7 +741,7 @@ function NavItemRenderer({ Link = DefaultLink, item, pathname, level }) {
|
|
|
775
741
|
children: [
|
|
776
742
|
item.icon && /* @__PURE__ */ jsx24(item.icon, {}),
|
|
777
743
|
item.title,
|
|
778
|
-
item.external && /* @__PURE__ */ jsx24(
|
|
744
|
+
item.external && /* @__PURE__ */ jsx24(ArrowUpRightIcon, { className: "size-3.5 opacity-60" })
|
|
779
745
|
]
|
|
780
746
|
}
|
|
781
747
|
);
|
|
@@ -823,7 +789,7 @@ function ChildNavItemRenderer({ Link = DefaultLink, item, pathname, level }) {
|
|
|
823
789
|
children: [
|
|
824
790
|
item.icon && /* @__PURE__ */ jsx24(item.icon, {}),
|
|
825
791
|
item.title,
|
|
826
|
-
item.external && /* @__PURE__ */ jsx24(
|
|
792
|
+
item.external && /* @__PURE__ */ jsx24(ArrowUpRightIcon, { className: "size-3.5 opacity-60" })
|
|
827
793
|
]
|
|
828
794
|
}
|
|
829
795
|
) });
|
|
@@ -831,6 +797,18 @@ function ChildNavItemRenderer({ Link = DefaultLink, item, pathname, level }) {
|
|
|
831
797
|
|
|
832
798
|
// src/components/navigation/mobile-nav.tsx
|
|
833
799
|
import { useCallback as useCallback2, useState as useState2 } from "react";
|
|
800
|
+
import { ArrowUpRightIcon as ArrowUpRightIcon2, ChevronDownIcon as ChevronDownIcon2, MenuIcon } from "lucide-react";
|
|
801
|
+
import {
|
|
802
|
+
Button as Button4,
|
|
803
|
+
Collapsible,
|
|
804
|
+
CollapsibleContent,
|
|
805
|
+
CollapsibleTrigger,
|
|
806
|
+
Drawer,
|
|
807
|
+
DrawerContent,
|
|
808
|
+
DrawerDescription,
|
|
809
|
+
DrawerTitle,
|
|
810
|
+
DrawerTrigger
|
|
811
|
+
} from "@pelatform/ui.components/base";
|
|
834
812
|
import { jsx as jsx25, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
835
813
|
function MobileNav({ children, className }) {
|
|
836
814
|
const { setMetaColor, metaColor } = useMetaColor();
|
|
@@ -843,8 +821,8 @@ function MobileNav({ children, className }) {
|
|
|
843
821
|
[setMetaColor, metaColor]
|
|
844
822
|
);
|
|
845
823
|
return /* @__PURE__ */ jsx25("div", { className: cn("flex items-center gap-2.5 md:hidden", className), children: /* @__PURE__ */ jsxs16(Drawer, { open, onOpenChange, children: [
|
|
846
|
-
/* @__PURE__ */ jsx25(DrawerTrigger, { asChild: true, children: /* @__PURE__ */ jsxs16(
|
|
847
|
-
/* @__PURE__ */ jsx25(
|
|
824
|
+
/* @__PURE__ */ jsx25(DrawerTrigger, { asChild: true, children: /* @__PURE__ */ jsxs16(Button4, { variant: "ghost", className: "group/toggle size-8 px-0 text-foreground", children: [
|
|
825
|
+
/* @__PURE__ */ jsx25(MenuIcon, {}),
|
|
848
826
|
/* @__PURE__ */ jsx25("span", { className: "sr-only", children: "Toggle Menu" })
|
|
849
827
|
] }) }),
|
|
850
828
|
/* @__PURE__ */ jsxs16(DrawerContent, { className: "max-h-[60svh] p-0", children: [
|
|
@@ -884,7 +862,7 @@ function MobileNavItemRenderer({
|
|
|
884
862
|
item.icon && /* @__PURE__ */ jsx25(item.icon, {}),
|
|
885
863
|
item.title,
|
|
886
864
|
/* @__PURE__ */ jsx25(
|
|
887
|
-
|
|
865
|
+
ChevronDownIcon2,
|
|
888
866
|
{
|
|
889
867
|
className: cn(
|
|
890
868
|
"ms-auto size-3.5 opacity-60 transition-transform",
|
|
@@ -925,7 +903,7 @@ function MobileNavItemRenderer({
|
|
|
925
903
|
children: [
|
|
926
904
|
item.icon && /* @__PURE__ */ jsx25(item.icon, {}),
|
|
927
905
|
item.title,
|
|
928
|
-
item.external && /* @__PURE__ */ jsx25(
|
|
906
|
+
item.external && /* @__PURE__ */ jsx25(ArrowUpRightIcon2, { className: "ms-1 size-3.5 opacity-60" })
|
|
929
907
|
]
|
|
930
908
|
}
|
|
931
909
|
);
|
|
@@ -2936,6 +2914,9 @@ var QueryClientProvider = ({
|
|
|
2936
2914
|
};
|
|
2937
2915
|
|
|
2938
2916
|
// src/components/providers/query-provider.tsx
|
|
2917
|
+
import { CircleAlertIcon as CircleAlertIcon2 } from "lucide-react";
|
|
2918
|
+
import { toast as toast2 } from "sonner";
|
|
2919
|
+
import { Alert as Alert2, AlertTitle as AlertTitle2 } from "@pelatform/ui.components/base";
|
|
2939
2920
|
import { jsx as jsx27, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
2940
2921
|
var QueryProvider = ({
|
|
2941
2922
|
client: clientProps,
|
|
@@ -2983,10 +2964,10 @@ var QueryProvider = ({
|
|
|
2983
2964
|
timestamp: (/* @__PURE__ */ new Date()).toISOString()
|
|
2984
2965
|
});
|
|
2985
2966
|
}
|
|
2986
|
-
|
|
2987
|
-
() => /* @__PURE__ */ jsxs17(
|
|
2988
|
-
/* @__PURE__ */ jsx27(
|
|
2989
|
-
/* @__PURE__ */ jsx27(
|
|
2967
|
+
toast2.custom(
|
|
2968
|
+
() => /* @__PURE__ */ jsxs17(Alert2, { variant: "default", children: [
|
|
2969
|
+
/* @__PURE__ */ jsx27(CircleAlertIcon2, {}),
|
|
2970
|
+
/* @__PURE__ */ jsx27(AlertTitle2, { children: message })
|
|
2990
2971
|
] }),
|
|
2991
2972
|
{
|
|
2992
2973
|
position: "top-center",
|
|
@@ -3004,10 +2985,12 @@ var QueryProvider = ({
|
|
|
3004
2985
|
};
|
|
3005
2986
|
|
|
3006
2987
|
// src/components/providers/theme-provider.tsx
|
|
2988
|
+
import { ThemeProvider as NextThemesProvider } from "next-themes";
|
|
2989
|
+
import { TooltipProvider } from "@pelatform/ui.components/base";
|
|
3007
2990
|
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
3008
2991
|
function ThemeProvider({ children, ...props }) {
|
|
3009
2992
|
return /* @__PURE__ */ jsx28(
|
|
3010
|
-
|
|
2993
|
+
NextThemesProvider,
|
|
3011
2994
|
{
|
|
3012
2995
|
attribute: "class",
|
|
3013
2996
|
defaultTheme: DEFAULT_THEME_MODE,
|
|
@@ -3023,6 +3006,7 @@ function ThemeProvider({ children, ...props }) {
|
|
|
3023
3006
|
}
|
|
3024
3007
|
|
|
3025
3008
|
// src/components/ui/announcement.tsx
|
|
3009
|
+
import { Badge as Badge2 } from "@pelatform/ui.components/base";
|
|
3026
3010
|
import { jsx as jsx29 } from "react/jsx-runtime";
|
|
3027
3011
|
var Announcement = ({
|
|
3028
3012
|
variant = "outline",
|
|
@@ -3030,7 +3014,7 @@ var Announcement = ({
|
|
|
3030
3014
|
className,
|
|
3031
3015
|
...props
|
|
3032
3016
|
}) => /* @__PURE__ */ jsx29(
|
|
3033
|
-
|
|
3017
|
+
Badge2,
|
|
3034
3018
|
{
|
|
3035
3019
|
variant,
|
|
3036
3020
|
className: cn(
|
|
@@ -3056,6 +3040,7 @@ var AnnouncementTag = ({ className, ...props }) => /* @__PURE__ */ jsx29(
|
|
|
3056
3040
|
var AnnouncementTitle = ({ className, ...props }) => /* @__PURE__ */ jsx29("div", { className: cn("flex items-center gap-1 truncate py-1", className), ...props });
|
|
3057
3041
|
|
|
3058
3042
|
// src/components/ui/background-paths.tsx
|
|
3043
|
+
import { motion } from "motion/react";
|
|
3059
3044
|
import { jsx as jsx30, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
3060
3045
|
function FloatingPaths({
|
|
3061
3046
|
position,
|
|
@@ -3471,6 +3456,20 @@ var ImageInput = ({
|
|
|
3471
3456
|
|
|
3472
3457
|
// src/components/ui/language-switcher.tsx
|
|
3473
3458
|
import { useTransition } from "react";
|
|
3459
|
+
import { GlobeIcon, LanguagesIcon } from "lucide-react";
|
|
3460
|
+
import {
|
|
3461
|
+
Badge as Badge3,
|
|
3462
|
+
Button as Button5,
|
|
3463
|
+
DropdownMenu as DropdownMenu2,
|
|
3464
|
+
DropdownMenuContent as DropdownMenuContent2,
|
|
3465
|
+
DropdownMenuItem as DropdownMenuItem2,
|
|
3466
|
+
DropdownMenuRadioGroup,
|
|
3467
|
+
DropdownMenuRadioItem,
|
|
3468
|
+
DropdownMenuSub as DropdownMenuSub2,
|
|
3469
|
+
DropdownMenuSubContent as DropdownMenuSubContent2,
|
|
3470
|
+
DropdownMenuSubTrigger as DropdownMenuSubTrigger2,
|
|
3471
|
+
DropdownMenuTrigger as DropdownMenuTrigger2
|
|
3472
|
+
} from "@pelatform/ui.components/base";
|
|
3474
3473
|
import { jsx as jsx35, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
3475
3474
|
function getFlagUrl(flag) {
|
|
3476
3475
|
const flagCode = flag.toLowerCase();
|
|
@@ -3505,9 +3504,9 @@ function LanguageSwitcher({
|
|
|
3505
3504
|
return null;
|
|
3506
3505
|
}
|
|
3507
3506
|
if (type === "dropdown") {
|
|
3508
|
-
return /* @__PURE__ */ jsxs23(
|
|
3509
|
-
/* @__PURE__ */ jsx35(
|
|
3510
|
-
|
|
3507
|
+
return /* @__PURE__ */ jsxs23(DropdownMenu2, { children: [
|
|
3508
|
+
/* @__PURE__ */ jsx35(DropdownMenuTrigger2, { children: /* @__PURE__ */ jsxs23(
|
|
3509
|
+
Button5,
|
|
3511
3510
|
{
|
|
3512
3511
|
variant,
|
|
3513
3512
|
size,
|
|
@@ -3518,13 +3517,13 @@ function LanguageSwitcher({
|
|
|
3518
3517
|
),
|
|
3519
3518
|
disabled: isPending,
|
|
3520
3519
|
children: [
|
|
3521
|
-
/* @__PURE__ */ jsx35(
|
|
3520
|
+
/* @__PURE__ */ jsx35(LanguagesIcon, { className: "size-4" }),
|
|
3522
3521
|
/* @__PURE__ */ jsx35("span", { className: "sr-only", children: isPending ? "Changing language..." : "Language dropdown" })
|
|
3523
3522
|
]
|
|
3524
3523
|
}
|
|
3525
3524
|
) }),
|
|
3526
|
-
/* @__PURE__ */ jsx35(
|
|
3527
|
-
|
|
3525
|
+
/* @__PURE__ */ jsx35(DropdownMenuContent2, { align: "end", className: "min-w-[150px]", children: languages.map((lang) => /* @__PURE__ */ jsxs23(
|
|
3526
|
+
DropdownMenuItem2,
|
|
3528
3527
|
{
|
|
3529
3528
|
onClick: () => handleLanguageChange(lang.code),
|
|
3530
3529
|
className: cn("gap-2", currentLocale === lang.code && "bg-accent"),
|
|
@@ -3538,7 +3537,7 @@ function LanguageSwitcher({
|
|
|
3538
3537
|
width: 24,
|
|
3539
3538
|
height: 24
|
|
3540
3539
|
}
|
|
3541
|
-
) : showFlags ? /* @__PURE__ */ jsx35(
|
|
3540
|
+
) : showFlags ? /* @__PURE__ */ jsx35(GlobeIcon, { className: "size-4" }) : null,
|
|
3542
3541
|
showNames && /* @__PURE__ */ jsx35("span", { className: "text-sm", children: lang.name }),
|
|
3543
3542
|
currentLocale === lang.code && /* @__PURE__ */ jsx35("span", { className: "ms-auto text-muted-foreground text-xs", children: "\u2713" })
|
|
3544
3543
|
]
|
|
@@ -3547,19 +3546,19 @@ function LanguageSwitcher({
|
|
|
3547
3546
|
)) })
|
|
3548
3547
|
] });
|
|
3549
3548
|
}
|
|
3550
|
-
return /* @__PURE__ */ jsxs23(
|
|
3549
|
+
return /* @__PURE__ */ jsxs23(DropdownMenuSub2, { children: [
|
|
3551
3550
|
/* @__PURE__ */ jsxs23(
|
|
3552
|
-
|
|
3551
|
+
DropdownMenuSubTrigger2,
|
|
3553
3552
|
{
|
|
3554
3553
|
className: cn(
|
|
3555
3554
|
"flex items-center gap-2 data-[state=open]:**:data-[slot=badge]:border-input **:data-[slot=dropdown-menu-sub-trigger-indicator]:hidden hover:**:data-[slot=badge]:border-input",
|
|
3556
3555
|
className
|
|
3557
3556
|
),
|
|
3558
3557
|
children: [
|
|
3559
|
-
/* @__PURE__ */ jsx35(
|
|
3558
|
+
/* @__PURE__ */ jsx35(GlobeIcon, { className: "size-4" }),
|
|
3560
3559
|
/* @__PURE__ */ jsxs23("span", { className: "relative flex grow items-center justify-between gap-2", children: [
|
|
3561
3560
|
label,
|
|
3562
|
-
currentLanguage && /* @__PURE__ */ jsxs23(
|
|
3561
|
+
currentLanguage && /* @__PURE__ */ jsxs23(Badge3, { variant: "outline", className: "absolute end-0 top-1/2 -translate-y-1/2", children: [
|
|
3563
3562
|
currentLanguage.name,
|
|
3564
3563
|
showFlags && currentLanguage.flag && /* @__PURE__ */ jsx35(
|
|
3565
3564
|
Image2,
|
|
@@ -3576,7 +3575,7 @@ function LanguageSwitcher({
|
|
|
3576
3575
|
]
|
|
3577
3576
|
}
|
|
3578
3577
|
),
|
|
3579
|
-
/* @__PURE__ */ jsx35(
|
|
3578
|
+
/* @__PURE__ */ jsx35(DropdownMenuSubContent2, { className: "w-48", children: /* @__PURE__ */ jsx35(
|
|
3580
3579
|
DropdownMenuRadioGroup,
|
|
3581
3580
|
{
|
|
3582
3581
|
value: currentLocale,
|
|
@@ -3596,7 +3595,7 @@ function LanguageSwitcher({
|
|
|
3596
3595
|
width: 24,
|
|
3597
3596
|
height: 24
|
|
3598
3597
|
}
|
|
3599
|
-
) : showFlags ? /* @__PURE__ */ jsx35(
|
|
3598
|
+
) : showFlags ? /* @__PURE__ */ jsx35(GlobeIcon, { className: "size-4" }) : null,
|
|
3600
3599
|
/* @__PURE__ */ jsx35("span", { children: item.name })
|
|
3601
3600
|
]
|
|
3602
3601
|
},
|
|
@@ -3629,6 +3628,15 @@ function Logo({ className }) {
|
|
|
3629
3628
|
|
|
3630
3629
|
// src/components/ui/mode-switcher.tsx
|
|
3631
3630
|
import * as React3 from "react";
|
|
3631
|
+
import { MonitorIcon, MoonIcon, SunIcon } from "lucide-react";
|
|
3632
|
+
import { useTheme } from "next-themes";
|
|
3633
|
+
import {
|
|
3634
|
+
Button as Button6,
|
|
3635
|
+
DropdownMenu as DropdownMenu3,
|
|
3636
|
+
DropdownMenuContent as DropdownMenuContent3,
|
|
3637
|
+
DropdownMenuItem as DropdownMenuItem3,
|
|
3638
|
+
DropdownMenuTrigger as DropdownMenuTrigger3
|
|
3639
|
+
} from "@pelatform/ui.components/base";
|
|
3632
3640
|
import { Fragment as Fragment4, jsx as jsx37, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
3633
3641
|
function ModeSwitcher({
|
|
3634
3642
|
className,
|
|
@@ -3642,7 +3650,7 @@ function ModeSwitcher({
|
|
|
3642
3650
|
light: "Light"
|
|
3643
3651
|
}
|
|
3644
3652
|
}) {
|
|
3645
|
-
const { setTheme, theme } =
|
|
3653
|
+
const { setTheme, theme } = useTheme();
|
|
3646
3654
|
const toggleTheme = React3.useCallback(() => {
|
|
3647
3655
|
const currentIndex = cycleOrder.indexOf(theme);
|
|
3648
3656
|
const nextIndex = (currentIndex + 1) % cycleOrder.length;
|
|
@@ -3652,20 +3660,20 @@ function ModeSwitcher({
|
|
|
3652
3660
|
const getCurrentIcon = (withLabel = false) => {
|
|
3653
3661
|
if (theme === THEME_MODES.SYSTEM) {
|
|
3654
3662
|
return /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
3655
|
-
/* @__PURE__ */ jsx37(
|
|
3663
|
+
/* @__PURE__ */ jsx37(MonitorIcon, {}),
|
|
3656
3664
|
" ",
|
|
3657
3665
|
withLabel && /* @__PURE__ */ jsx37("span", { children: label.system })
|
|
3658
3666
|
] });
|
|
3659
3667
|
}
|
|
3660
3668
|
if (theme === THEME_MODES.DARK) {
|
|
3661
3669
|
return /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
3662
|
-
/* @__PURE__ */ jsx37(
|
|
3670
|
+
/* @__PURE__ */ jsx37(MoonIcon, {}),
|
|
3663
3671
|
" ",
|
|
3664
3672
|
withLabel && /* @__PURE__ */ jsx37("span", { children: label.dark })
|
|
3665
3673
|
] });
|
|
3666
3674
|
}
|
|
3667
3675
|
return /* @__PURE__ */ jsxs24(Fragment4, { children: [
|
|
3668
|
-
/* @__PURE__ */ jsx37(
|
|
3676
|
+
/* @__PURE__ */ jsx37(SunIcon, {}),
|
|
3669
3677
|
" ",
|
|
3670
3678
|
withLabel && /* @__PURE__ */ jsx37("span", { children: label.light })
|
|
3671
3679
|
] });
|
|
@@ -3673,7 +3681,7 @@ function ModeSwitcher({
|
|
|
3673
3681
|
const isActive = (val) => theme === val;
|
|
3674
3682
|
if (type === "toogle") {
|
|
3675
3683
|
return /* @__PURE__ */ jsxs24(
|
|
3676
|
-
|
|
3684
|
+
Button6,
|
|
3677
3685
|
{
|
|
3678
3686
|
size,
|
|
3679
3687
|
variant,
|
|
@@ -3688,9 +3696,9 @@ function ModeSwitcher({
|
|
|
3688
3696
|
);
|
|
3689
3697
|
}
|
|
3690
3698
|
if (type === "dropdown") {
|
|
3691
|
-
return /* @__PURE__ */ jsxs24(
|
|
3692
|
-
/* @__PURE__ */ jsx37(
|
|
3693
|
-
|
|
3699
|
+
return /* @__PURE__ */ jsxs24(DropdownMenu3, { children: [
|
|
3700
|
+
/* @__PURE__ */ jsx37(DropdownMenuTrigger3, { children: /* @__PURE__ */ jsxs24(
|
|
3701
|
+
Button6,
|
|
3694
3702
|
{
|
|
3695
3703
|
size,
|
|
3696
3704
|
variant,
|
|
@@ -3704,36 +3712,36 @@ function ModeSwitcher({
|
|
|
3704
3712
|
]
|
|
3705
3713
|
}
|
|
3706
3714
|
) }),
|
|
3707
|
-
/* @__PURE__ */ jsxs24(
|
|
3715
|
+
/* @__PURE__ */ jsxs24(DropdownMenuContent3, { align: "end", children: [
|
|
3708
3716
|
/* @__PURE__ */ jsxs24(
|
|
3709
|
-
|
|
3717
|
+
DropdownMenuItem3,
|
|
3710
3718
|
{
|
|
3711
3719
|
className: isActive("light") ? "bg-accent" : "",
|
|
3712
3720
|
onClick: () => setTheme("light"),
|
|
3713
3721
|
children: [
|
|
3714
|
-
/* @__PURE__ */ jsx37(
|
|
3722
|
+
/* @__PURE__ */ jsx37(SunIcon, {}),
|
|
3715
3723
|
label.light
|
|
3716
3724
|
]
|
|
3717
3725
|
}
|
|
3718
3726
|
),
|
|
3719
3727
|
/* @__PURE__ */ jsxs24(
|
|
3720
|
-
|
|
3728
|
+
DropdownMenuItem3,
|
|
3721
3729
|
{
|
|
3722
3730
|
className: isActive("dark") ? "bg-accent" : "",
|
|
3723
3731
|
onClick: () => setTheme("dark"),
|
|
3724
3732
|
children: [
|
|
3725
|
-
/* @__PURE__ */ jsx37(
|
|
3733
|
+
/* @__PURE__ */ jsx37(MoonIcon, {}),
|
|
3726
3734
|
label.dark
|
|
3727
3735
|
]
|
|
3728
3736
|
}
|
|
3729
3737
|
),
|
|
3730
3738
|
/* @__PURE__ */ jsxs24(
|
|
3731
|
-
|
|
3739
|
+
DropdownMenuItem3,
|
|
3732
3740
|
{
|
|
3733
3741
|
className: isActive("system") ? "bg-accent" : "",
|
|
3734
3742
|
onClick: () => setTheme("system"),
|
|
3735
3743
|
children: [
|
|
3736
|
-
/* @__PURE__ */ jsx37(
|
|
3744
|
+
/* @__PURE__ */ jsx37(MonitorIcon, {}),
|
|
3737
3745
|
label.system
|
|
3738
3746
|
]
|
|
3739
3747
|
}
|
|
@@ -3742,7 +3750,7 @@ function ModeSwitcher({
|
|
|
3742
3750
|
] });
|
|
3743
3751
|
}
|
|
3744
3752
|
return /* @__PURE__ */ jsx37(
|
|
3745
|
-
|
|
3753
|
+
DropdownMenuItem3,
|
|
3746
3754
|
{
|
|
3747
3755
|
className,
|
|
3748
3756
|
onSelect: (e) => {
|
|
@@ -3756,6 +3764,13 @@ function ModeSwitcher({
|
|
|
3756
3764
|
|
|
3757
3765
|
// src/components/ui/moving-border.tsx
|
|
3758
3766
|
import { useRef as useRef2 } from "react";
|
|
3767
|
+
import {
|
|
3768
|
+
motion as motion2,
|
|
3769
|
+
useAnimationFrame,
|
|
3770
|
+
useMotionTemplate,
|
|
3771
|
+
useMotionValue,
|
|
3772
|
+
useTransform
|
|
3773
|
+
} from "motion/react";
|
|
3759
3774
|
import { Fragment as Fragment5, jsx as jsx38, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
3760
3775
|
function MovingLabel({
|
|
3761
3776
|
borderRadius = "1.75rem",
|
|
@@ -3834,7 +3849,7 @@ var MovingBorder = ({
|
|
|
3834
3849
|
}
|
|
3835
3850
|
),
|
|
3836
3851
|
/* @__PURE__ */ jsx38(
|
|
3837
|
-
|
|
3852
|
+
motion2.div,
|
|
3838
3853
|
{
|
|
3839
3854
|
style: {
|
|
3840
3855
|
position: "absolute",
|
|
@@ -3865,6 +3880,7 @@ var ToolbarActions = ({ children }) => {
|
|
|
3865
3880
|
};
|
|
3866
3881
|
|
|
3867
3882
|
// src/components/ui/user-avatar.tsx
|
|
3883
|
+
import { Avatar, AvatarFallback, AvatarImage } from "@pelatform/ui.components/base";
|
|
3868
3884
|
import { jsx as jsx40, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
3869
3885
|
function UserAvatar({ className, src, alt }) {
|
|
3870
3886
|
const name = alt ?? "User";
|