@pelatform/starter 0.1.5 → 0.1.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,36 +1,12 @@
1
1
  "use client";
2
- 'use client';
3
-
4
2
  import {
5
- AppleIcon,
6
- DiscordIcon,
7
- DropboxIcon,
8
- FacebookIcon,
9
- GitHubIcon,
10
- GitLabIcon,
11
- GoogleIcon,
12
- HuggingFaceIcon,
13
- KickIcon,
14
- LinearIcon,
15
- LinkedInIcon,
16
- MicrosoftIcon,
17
- NotionIcon,
18
- RedditIcon,
19
- RobloxIcon,
20
- SlackIcon,
21
- SpotifyIcon,
22
- TikTokIcon,
23
- TwitchIcon,
24
- VKIcon,
25
- XIcon,
26
- ZoomIcon,
27
3
  defaultAuthQueryOptions,
28
4
  fileToBase64,
29
5
  getPasswordSchema,
30
6
  getTranslations,
31
7
  resizeAndCropImage,
32
8
  socialProviders
33
- } from "./chunk-ZWKHMRY6.js";
9
+ } from "./chunk-2ZAZ77F6.js";
34
10
 
35
11
  // src/config/hook.ts
36
12
  import { useContext } from "react";
@@ -123,7 +99,6 @@ var defaultConfig = {
123
99
  PRIVACY: "/privacy"
124
100
  },
125
101
  auth: {
126
- ACCEPT_INVITATION: "/join",
127
102
  CALLBACK: "/callback",
128
103
  EMAIL_OTP: "/otp",
129
104
  FORGOT_PASSWORD: "/forgot-password",
@@ -155,6 +130,10 @@ var defaultConfig = {
155
130
  admin: {
156
131
  OVERVIEW: "/admin/overview",
157
132
  USERS: "/admin/users"
133
+ },
134
+ custom: {
135
+ ACCEPT_INVITATION: "/join",
136
+ NEW_WORKSPACE: "/new"
158
137
  }
159
138
  },
160
139
  ui: {
@@ -235,10 +214,7 @@ import { useContext as useContext5 } from "react";
235
214
 
236
215
  // src/hooks/auth-mutation.ts
237
216
  import { useContext as useContext2 } from "react";
238
- import {
239
- useMutation,
240
- useQueryClient
241
- } from "@pelatform/ui/re/tanstack-query";
217
+ import { useMutation, useQueryClient } from "@tanstack/react-query";
242
218
  function useAuthMutation({
243
219
  queryKey,
244
220
  mutationFn,
@@ -291,11 +267,11 @@ var useOnMutateError = () => {
291
267
  // src/hooks/auth-query.ts
292
268
  import { useContext as useContext4 } from "react";
293
269
  import { skipToken } from "@tanstack/query-core";
294
- import { useQuery as useQuery2 } from "@pelatform/ui/re/tanstack-query";
270
+ import { useQuery as useQuery2 } from "@tanstack/react-query";
295
271
 
296
272
  // src/hooks/use-session.ts
297
273
  import { useContext as useContext3 } from "react";
298
- import { useQuery } from "@pelatform/ui/re/tanstack-query";
274
+ import { useQuery } from "@tanstack/react-query";
299
275
  function useSession(options) {
300
276
  const { authClient } = useConfig();
301
277
  const { sessionQueryOptions, queryOptions, queryKey } = useContext3(QueryContext);
@@ -389,10 +365,7 @@ function useListApiKeys(options) {
389
365
 
390
366
  // src/hooks/device-sessions.ts
391
367
  import { useContext as useContext7 } from "react";
392
- import {
393
- useMutation as useMutation2,
394
- useQueryClient as useQueryClient2
395
- } from "@pelatform/ui/re/tanstack-query";
368
+ import { useMutation as useMutation2, useQueryClient as useQueryClient2 } from "@tanstack/react-query";
396
369
  function useListDeviceSessions(options) {
397
370
  const { authClient } = useConfig();
398
371
  const { queryKey } = useContext7(QueryContext);
@@ -510,13 +483,12 @@ var useLayout = () => {
510
483
  // src/hooks/use-onsuccess-transition.ts
511
484
  import { useCallback, useEffect, useState, useTransition } from "react";
512
485
  import { useRouter, useSearchParams } from "next/navigation";
513
- import { REDIRECT_QUERY_PARAM } from "@pelatform/utils";
514
486
  function useOnSuccessTransition(redirectToProp) {
515
487
  const { auth } = useConfig();
516
488
  const router = useRouter();
517
489
  const searchParams = useSearchParams();
518
490
  const { refetch: refetchSession } = useSession();
519
- const redirectTo = redirectToProp || searchParams?.get(REDIRECT_QUERY_PARAM) || auth.redirectAfterSignIn;
491
+ const redirectTo = redirectToProp || searchParams?.get("redirectTo") || auth.redirectAfterSignIn;
520
492
  const [isPending, startTransition] = useTransition();
521
493
  const [success, setSuccess] = useState(false);
522
494
  useEffect(() => {
@@ -549,15 +521,32 @@ function useUpdateUser(options) {
549
521
  });
550
522
  }
551
523
 
524
+ // src/hooks/use-invitation.ts
525
+ import { useContext as useContext12 } from "react";
526
+ function useInvitation(params, options) {
527
+ const { authClient } = useConfig();
528
+ const { queryKey: key } = useContext12(QueryContext);
529
+ const queryKey = [key.invitationKey, JSON.stringify(params)];
530
+ return useAuthQuery({
531
+ queryKey,
532
+ queryFn: (fnParams) => authClient.organization.getInvitation({
533
+ ...params,
534
+ ...fnParams
535
+ }),
536
+ options
537
+ });
538
+ }
539
+
552
540
  // src/ui/account/dialogs/backup-codes.tsx
553
541
  import { CheckIcon, CopyIcon } from "lucide-react";
554
542
  import { useTranslations as useTranslations2 } from "next-intl";
555
- import { Button as Button2 } from "@pelatform/ui/default";
556
- import { useCopyToClipboard } from "@pelatform/ui/hooks";
557
- import { cn as cn2 } from "@pelatform/utils";
543
+ import { cn as cn2 } from "pelatform-ui";
544
+ import { Button as Button2 } from "pelatform-ui/default";
545
+ import { useCopyToClipboard } from "pelatform-ui/hooks";
558
546
 
559
547
  // src/ui/shared/components/dialog.tsx
560
548
  import { useTranslations } from "next-intl";
549
+ import { cn } from "pelatform-ui";
561
550
  import {
562
551
  Button,
563
552
  Dialog,
@@ -566,8 +555,7 @@ import {
566
555
  DialogFooter,
567
556
  DialogHeader,
568
557
  DialogTitle
569
- } from "@pelatform/ui/default";
570
- import { cn } from "@pelatform/utils";
558
+ } from "pelatform-ui/default";
571
559
  import { jsx as jsx2, jsxs } from "react/jsx-runtime";
572
560
  function DialogComponent({
573
561
  children,
@@ -686,8 +674,12 @@ function BackupCodesDialog({
686
674
 
687
675
  // src/ui/account/dialogs/delete-account.tsx
688
676
  import { useRouter as useRouter2 } from "next/navigation";
677
+ import { zodResolver } from "@hookform/resolvers/zod";
689
678
  import { useTranslations as useTranslations5 } from "next-intl";
690
- import { AlertToast } from "@pelatform/ui/components";
679
+ import { useForm } from "react-hook-form";
680
+ import { z } from "zod";
681
+ import { cn as cn6 } from "pelatform-ui";
682
+ import { AlertToast } from "pelatform-ui/components";
691
683
  import {
692
684
  Button as Button4,
693
685
  Card,
@@ -698,17 +690,13 @@ import {
698
690
  FormLabel,
699
691
  FormMessage,
700
692
  Spinner
701
- } from "@pelatform/ui/default";
702
- import { useForm } from "@pelatform/ui/re/react-hook-form";
703
- import { zodResolver } from "@pelatform/ui/re/resolver";
704
- import { z } from "@pelatform/ui/re/zod";
705
- import { cn as cn6 } from "@pelatform/utils";
693
+ } from "pelatform-ui/default";
706
694
 
707
695
  // src/ui/shared/password-input.tsx
708
696
  import { useState as useState2 } from "react";
709
697
  import { EyeIcon, EyeOffIcon } from "lucide-react";
710
- import { Button as Button3, Input } from "@pelatform/ui/default";
711
- import { cn as cn3 } from "@pelatform/utils";
698
+ import { cn as cn3 } from "pelatform-ui";
699
+ import { Button as Button3, Input } from "pelatform-ui/default";
712
700
  import { Fragment as Fragment2, jsx as jsx4, jsxs as jsxs3 } from "react/jsx-runtime";
713
701
  function PasswordInput({
714
702
  className,
@@ -761,15 +749,15 @@ function PasswordInput({
761
749
  // src/ui/shared/view.tsx
762
750
  import { KeyRoundIcon } from "lucide-react";
763
751
  import { useLocale, useTranslations as useTranslations4 } from "next-intl";
764
- import { Skeleton as Skeleton2 } from "@pelatform/ui/default";
765
- import { cn as cn5 } from "@pelatform/utils";
752
+ import { cn as cn5 } from "pelatform-ui";
753
+ import { Skeleton as Skeleton2 } from "pelatform-ui/default";
766
754
 
767
755
  // src/ui/shared/avatar.tsx
768
- import { UserRoundIcon } from "lucide-react";
756
+ import { BuildingIcon, UserRoundIcon } from "lucide-react";
769
757
  import { useTranslations as useTranslations3 } from "next-intl";
770
- import { getInitials } from "@pelatform/ui/components";
771
- import { Avatar, AvatarFallback, AvatarImage, Skeleton } from "@pelatform/ui/default";
772
- import { cn as cn4 } from "@pelatform/utils";
758
+ import { cn as cn4 } from "pelatform-ui";
759
+ import { getInitials } from "pelatform-ui/components";
760
+ import { Avatar, AvatarFallback, AvatarImage, Skeleton } from "pelatform-ui/default";
773
761
  import { jsx as jsx5, jsxs as jsxs4 } from "react/jsx-runtime";
774
762
  function getSize(size) {
775
763
  return size === "sm" ? "size-6" : size === "lg" ? "size-10" : "size-8";
@@ -828,6 +816,57 @@ function UserAvatar({
828
816
  }
829
817
  );
830
818
  }
819
+ function WorkspaceLogo({
820
+ className,
821
+ classNames,
822
+ isPending,
823
+ size,
824
+ workspace,
825
+ ...props
826
+ }) {
827
+ const t = useTranslations3();
828
+ const name = workspace?.name;
829
+ const src = workspace?.logo;
830
+ if (isPending) {
831
+ return /* @__PURE__ */ jsx5(
832
+ Skeleton,
833
+ {
834
+ className: cn4(
835
+ "shrink-0 rounded-full",
836
+ getSize(size),
837
+ className,
838
+ classNames?.base,
839
+ classNames?.skeleton
840
+ )
841
+ }
842
+ );
843
+ }
844
+ return /* @__PURE__ */ jsxs4(
845
+ Avatar,
846
+ {
847
+ className: cn4("rounded-full bg-accent", getSize(size), className, classNames?.base),
848
+ ...props,
849
+ children: [
850
+ /* @__PURE__ */ jsx5(
851
+ AvatarImage,
852
+ {
853
+ src: src || void 0,
854
+ alt: name || t("systems.ORGANIZATION"),
855
+ className: classNames?.image
856
+ }
857
+ ),
858
+ /* @__PURE__ */ jsx5(
859
+ AvatarFallback,
860
+ {
861
+ className: cn4("text-foreground", classNames?.fallback),
862
+ delayMs: src ? 600 : void 0,
863
+ children: /* @__PURE__ */ jsx5(BuildingIcon, { className: cn4("size-[50%]", classNames?.fallbackIcon) })
864
+ }
865
+ )
866
+ ]
867
+ }
868
+ );
869
+ }
831
870
 
832
871
  // src/ui/shared/view.tsx
833
872
  import { Fragment as Fragment3, jsx as jsx6, jsxs as jsxs5 } from "react/jsx-runtime";
@@ -919,6 +958,68 @@ function ApiKeyView({ className, classNames, apiKey }) {
919
958
  ] })
920
959
  ] });
921
960
  }
961
+ function WorkspaceView({ className, classNames, isPending, size, workspace }) {
962
+ const t = useTranslations4();
963
+ return /* @__PURE__ */ jsxs5("div", { className: cn5("flex items-center gap-2 truncate", className, classNames?.base), children: [
964
+ /* @__PURE__ */ jsx6(
965
+ WorkspaceLogo,
966
+ {
967
+ className: cn5(size !== "sm" && "my-0.5"),
968
+ classNames: classNames?.avatar,
969
+ isPending,
970
+ workspace,
971
+ size
972
+ }
973
+ ),
974
+ /* @__PURE__ */ jsx6("div", { className: cn5("flex flex-col truncate text-start leading-tight", classNames?.content), children: isPending ? /* @__PURE__ */ jsxs5(Fragment3, { children: [
975
+ /* @__PURE__ */ jsx6(
976
+ Skeleton2,
977
+ {
978
+ className: cn5(
979
+ "max-w-full",
980
+ size === "lg" ? "h-4.5 w-32" : "h-3.5 w-24",
981
+ classNames?.title,
982
+ classNames?.skeleton
983
+ )
984
+ }
985
+ ),
986
+ size !== "sm" && /* @__PURE__ */ jsx6(
987
+ Skeleton2,
988
+ {
989
+ className: cn5(
990
+ "mt-1.5 max-w-full",
991
+ size === "lg" ? "h-3.5 w-24" : "h-3 w-16",
992
+ classNames?.subtitle,
993
+ classNames?.skeleton
994
+ )
995
+ }
996
+ )
997
+ ] }) : /* @__PURE__ */ jsxs5(Fragment3, { children: [
998
+ /* @__PURE__ */ jsx6(
999
+ "span",
1000
+ {
1001
+ className: cn5(
1002
+ "truncate font-semibold",
1003
+ size === "lg" ? "text-base" : "text-sm",
1004
+ classNames?.title
1005
+ ),
1006
+ children: workspace?.name || t("systems.ORGANIZATION")
1007
+ }
1008
+ ),
1009
+ size !== "sm" && workspace?.slug && /* @__PURE__ */ jsx6(
1010
+ "span",
1011
+ {
1012
+ className: cn5(
1013
+ "truncate opacity-70",
1014
+ size === "lg" ? "text-sm" : "text-xs",
1015
+ classNames?.subtitle
1016
+ ),
1017
+ children: workspace.slug
1018
+ }
1019
+ )
1020
+ ] }) })
1021
+ ] });
1022
+ }
922
1023
 
923
1024
  // src/ui/account/dialogs/delete-account.tsx
924
1025
  import { jsx as jsx7, jsxs as jsxs6 } from "react/jsx-runtime";
@@ -1046,8 +1147,8 @@ function DeleteAccountDialog({
1046
1147
  // src/ui/account/dialogs/session-freshness.tsx
1047
1148
  import { useRouter as useRouter3 } from "next/navigation";
1048
1149
  import { useTranslations as useTranslations6 } from "next-intl";
1049
- import { Button as Button5 } from "@pelatform/ui/default";
1050
- import { cn as cn7 } from "@pelatform/utils";
1150
+ import { cn as cn7 } from "pelatform-ui";
1151
+ import { Button as Button5 } from "pelatform-ui/default";
1051
1152
  import { jsx as jsx8 } from "react/jsx-runtime";
1052
1153
  function SessionFreshnessDialog({
1053
1154
  classNames,
@@ -1088,8 +1189,12 @@ function SessionFreshnessDialog({
1088
1189
  // src/ui/account/dialogs/two-factor-password.tsx
1089
1190
  import { useState as useState3 } from "react";
1090
1191
  import { useRouter as useRouter4 } from "next/navigation";
1192
+ import { zodResolver as zodResolver2 } from "@hookform/resolvers/zod";
1091
1193
  import { useTranslations as useTranslations7 } from "next-intl";
1092
- import { AlertToast as AlertToast2 } from "@pelatform/ui/components";
1194
+ import { useForm as useForm2 } from "react-hook-form";
1195
+ import { z as z2 } from "zod";
1196
+ import { cn as cn8 } from "pelatform-ui";
1197
+ import { AlertToast as AlertToast2 } from "pelatform-ui/components";
1093
1198
  import {
1094
1199
  Button as Button6,
1095
1200
  Form as Form2,
@@ -1099,11 +1204,7 @@ import {
1099
1204
  FormLabel as FormLabel2,
1100
1205
  FormMessage as FormMessage2,
1101
1206
  Spinner as Spinner2
1102
- } from "@pelatform/ui/default";
1103
- import { useForm as useForm2 } from "@pelatform/ui/re/react-hook-form";
1104
- import { zodResolver as zodResolver2 } from "@pelatform/ui/re/resolver";
1105
- import { z as z2 } from "@pelatform/ui/re/zod";
1106
- import { cn as cn8 } from "@pelatform/utils";
1207
+ } from "pelatform-ui/default";
1107
1208
  import { Fragment as Fragment4, jsx as jsx9, jsxs as jsxs7 } from "react/jsx-runtime";
1108
1209
  function TwoFactorPasswordDialog({
1109
1210
  classNames,
@@ -1250,9 +1351,9 @@ import { useState as useState4 } from "react";
1250
1351
  import { useTranslations as useTranslations8 } from "next-intl";
1251
1352
 
1252
1353
  // src/ui/shared/components/card.tsx
1253
- import { Button as Button7, Card as Card2, CardContent, CardFooter, Skeleton as Skeleton3, Spinner as Spinner3 } from "@pelatform/ui/default";
1254
- import { useFormState } from "@pelatform/ui/re/react-hook-form";
1255
- import { cn as cn9 } from "@pelatform/utils";
1354
+ import { useFormState } from "react-hook-form";
1355
+ import { cn as cn9 } from "pelatform-ui";
1356
+ import { Button as Button7, Card as Card2, CardContent, CardFooter, Skeleton as Skeleton3, Spinner as Spinner3 } from "pelatform-ui/default";
1256
1357
  import { Fragment as Fragment5, jsx as jsx10, jsxs as jsxs8 } from "react/jsx-runtime";
1257
1358
  function CardComponent({
1258
1359
  children,
@@ -1467,14 +1568,14 @@ function DeleteAccountCard({
1467
1568
  import { useRef, useState as useState5 } from "react";
1468
1569
  import { Trash2Icon, UploadCloudIcon } from "lucide-react";
1469
1570
  import { useTranslations as useTranslations9 } from "next-intl";
1470
- import { AlertToast as AlertToast3 } from "@pelatform/ui/components";
1571
+ import { AlertToast as AlertToast3 } from "pelatform-ui/components";
1471
1572
  import {
1472
1573
  Button as Button8,
1473
1574
  DropdownMenu,
1474
1575
  DropdownMenuContent,
1475
1576
  DropdownMenuItem,
1476
1577
  DropdownMenuTrigger
1477
- } from "@pelatform/ui/default";
1578
+ } from "pelatform-ui/default";
1478
1579
  import { jsx as jsx12, jsxs as jsxs10 } from "react/jsx-runtime";
1479
1580
  function FormAvatarCard({
1480
1581
  className,
@@ -1597,8 +1698,12 @@ function FormAvatarCard({
1597
1698
 
1598
1699
  // src/ui/account/partials/form-email.tsx
1599
1700
  import { useState as useState6 } from "react";
1701
+ import { zodResolver as zodResolver3 } from "@hookform/resolvers/zod";
1600
1702
  import { useTranslations as useTranslations10 } from "next-intl";
1601
- import { AlertToast as AlertToast4 } from "@pelatform/ui/components";
1703
+ import { useForm as useForm3 } from "react-hook-form";
1704
+ import { z as z3 } from "zod";
1705
+ import { cn as cn10 } from "pelatform-ui";
1706
+ import { AlertToast as AlertToast4 } from "pelatform-ui/components";
1602
1707
  import {
1603
1708
  Form as Form3,
1604
1709
  FormControl as FormControl3,
@@ -1607,11 +1712,7 @@ import {
1607
1712
  FormMessage as FormMessage3,
1608
1713
  Input as Input2,
1609
1714
  Skeleton as Skeleton4
1610
- } from "@pelatform/ui/default";
1611
- import { useForm as useForm3 } from "@pelatform/ui/re/react-hook-form";
1612
- import { zodResolver as zodResolver3 } from "@pelatform/ui/re/resolver";
1613
- import { z as z3 } from "@pelatform/ui/re/zod";
1614
- import { cn as cn10 } from "@pelatform/utils";
1715
+ } from "pelatform-ui/default";
1615
1716
  import { Fragment as Fragment7, jsx as jsx13, jsxs as jsxs11 } from "react/jsx-runtime";
1616
1717
  function FormEmailCard({ className, classNames, ...props }) {
1617
1718
  const { authClient, auth } = useConfig();
@@ -1730,8 +1831,12 @@ function FormEmailCard({ className, classNames, ...props }) {
1730
1831
  }
1731
1832
 
1732
1833
  // src/ui/account/partials/form-fields.tsx
1834
+ import { zodResolver as zodResolver4 } from "@hookform/resolvers/zod";
1733
1835
  import { useTranslations as useTranslations11 } from "next-intl";
1734
- import { AlertToast as AlertToast5 } from "@pelatform/ui/components";
1836
+ import { useForm as useForm4 } from "react-hook-form";
1837
+ import { z as z4 } from "zod";
1838
+ import { cn as cn11 } from "pelatform-ui";
1839
+ import { AlertToast as AlertToast5 } from "pelatform-ui/components";
1735
1840
  import {
1736
1841
  Checkbox,
1737
1842
  Form as Form4,
@@ -1743,11 +1848,7 @@ import {
1743
1848
  Input as Input3,
1744
1849
  Skeleton as Skeleton5,
1745
1850
  Textarea
1746
- } from "@pelatform/ui/default";
1747
- import { useForm as useForm4 } from "@pelatform/ui/re/react-hook-form";
1748
- import { zodResolver as zodResolver4 } from "@pelatform/ui/re/resolver";
1749
- import { z as z4 } from "@pelatform/ui/re/zod";
1750
- import { cn as cn11 } from "@pelatform/utils";
1851
+ } from "pelatform-ui/default";
1751
1852
  import { Fragment as Fragment8, jsx as jsx14, jsxs as jsxs12 } from "react/jsx-runtime";
1752
1853
  function FormFieldsCard({
1753
1854
  className,
@@ -1930,8 +2031,12 @@ function FormNameCard({ className, classNames, ...props }) {
1930
2031
  }
1931
2032
 
1932
2033
  // src/ui/account/partials/form-password.tsx
2034
+ import { zodResolver as zodResolver5 } from "@hookform/resolvers/zod";
1933
2035
  import { useTranslations as useTranslations13 } from "next-intl";
1934
- import { AlertToast as AlertToast6 } from "@pelatform/ui/components";
2036
+ import { useForm as useForm5 } from "react-hook-form";
2037
+ import { z as z5 } from "zod";
2038
+ import { cn as cn13 } from "pelatform-ui";
2039
+ import { AlertToast as AlertToast6 } from "pelatform-ui/components";
1935
2040
  import {
1936
2041
  Form as Form5,
1937
2042
  FormControl as FormControl5,
@@ -1939,15 +2044,11 @@ import {
1939
2044
  FormItem as FormItem5,
1940
2045
  FormLabel as FormLabel4,
1941
2046
  FormMessage as FormMessage5
1942
- } from "@pelatform/ui/default";
1943
- import { useForm as useForm5 } from "@pelatform/ui/re/react-hook-form";
1944
- import { zodResolver as zodResolver5 } from "@pelatform/ui/re/resolver";
1945
- import { z as z5 } from "@pelatform/ui/re/zod";
1946
- import { cn as cn13 } from "@pelatform/utils";
2047
+ } from "pelatform-ui/default";
1947
2048
 
1948
2049
  // src/ui/shared/components/skeleton.tsx
1949
- import { Card as Card3, Skeleton as Skeleton6 } from "@pelatform/ui/default";
1950
- import { cn as cn12 } from "@pelatform/utils";
2050
+ import { cn as cn12 } from "pelatform-ui";
2051
+ import { Card as Card3, Skeleton as Skeleton6 } from "pelatform-ui/default";
1951
2052
  import { jsx as jsx16, jsxs as jsxs13 } from "react/jsx-runtime";
1952
2053
  function SkeletonViewComponent({ classNames }) {
1953
2054
  return /* @__PURE__ */ jsxs13(Card3, { className: cn12("flex-row items-center gap-3 px-4 py-3", classNames?.cell), children: [
@@ -2171,7 +2272,8 @@ import { useState as useState7 } from "react";
2171
2272
  import { useRouter as useRouter5 } from "next/navigation";
2172
2273
  import { EllipsisIcon, LogOutIcon, RepeatIcon, UserX2Icon } from "lucide-react";
2173
2274
  import { useTranslations as useTranslations15 } from "next-intl";
2174
- import { AlertToast as AlertToast7 } from "@pelatform/ui/components";
2275
+ import { cn as cn14 } from "pelatform-ui";
2276
+ import { AlertToast as AlertToast7 } from "pelatform-ui/components";
2175
2277
  import {
2176
2278
  Button as Button9,
2177
2279
  Card as Card4,
@@ -2180,8 +2282,7 @@ import {
2180
2282
  DropdownMenuItem as DropdownMenuItem2,
2181
2283
  DropdownMenuTrigger as DropdownMenuTrigger2,
2182
2284
  Spinner as Spinner4
2183
- } from "@pelatform/ui/default";
2184
- import { cn as cn14 } from "@pelatform/utils";
2285
+ } from "pelatform-ui/default";
2185
2286
  import { jsx as jsx19, jsxs as jsxs15 } from "react/jsx-runtime";
2186
2287
  function MultiAccountCard({ className, classNames, ...props }) {
2187
2288
  const { path } = useConfig();
@@ -2323,10 +2424,10 @@ function MultiAccountCell({
2323
2424
  import { useState as useState8 } from "react";
2324
2425
  import { FingerprintIcon } from "lucide-react";
2325
2426
  import { useTranslations as useTranslations16 } from "next-intl";
2326
- import { AlertToast as AlertToast8 } from "@pelatform/ui/components";
2327
- import { Button as Button10, Card as Card5, Form as Form6, Spinner as Spinner5 } from "@pelatform/ui/default";
2328
- import { useForm as useForm6 } from "@pelatform/ui/re/react-hook-form";
2329
- import { cn as cn15 } from "@pelatform/utils";
2427
+ import { useForm as useForm6 } from "react-hook-form";
2428
+ import { cn as cn15 } from "pelatform-ui";
2429
+ import { AlertToast as AlertToast8 } from "pelatform-ui/components";
2430
+ import { Button as Button10, Card as Card5, Form as Form6, Spinner as Spinner5 } from "pelatform-ui/default";
2330
2431
  import { Fragment as Fragment10, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
2331
2432
  function PasskeysCard({ className, classNames, ...props }) {
2332
2433
  const { authClient, auth } = useConfig();
@@ -2449,9 +2550,9 @@ function PasskeyCell({
2449
2550
  // src/ui/account/partials/providers.tsx
2450
2551
  import { useState as useState9 } from "react";
2451
2552
  import { useTranslations as useTranslations17 } from "next-intl";
2452
- import { AlertToast as AlertToast9 } from "@pelatform/ui/components";
2453
- import { Button as Button11, Card as Card6, Skeleton as Skeleton7, Spinner as Spinner6 } from "@pelatform/ui/default";
2454
- import { cn as cn16 } from "@pelatform/utils";
2553
+ import { cn as cn16 } from "pelatform-ui";
2554
+ import { AlertToast as AlertToast9 } from "pelatform-ui/components";
2555
+ import { Button as Button11, Card as Card6, Skeleton as Skeleton7, Spinner as Spinner6 } from "pelatform-ui/default";
2455
2556
  import { jsx as jsx21, jsxs as jsxs17 } from "react/jsx-runtime";
2456
2557
  function ProvidersCard({
2457
2558
  className,
@@ -2581,9 +2682,9 @@ import { useRouter as useRouter6 } from "next/navigation";
2581
2682
  import { LaptopIcon, SmartphoneIcon } from "lucide-react";
2582
2683
  import { useTranslations as useTranslations18 } from "next-intl";
2583
2684
  import { UAParser } from "ua-parser-js";
2584
- import { AlertToast as AlertToast10 } from "@pelatform/ui/components";
2585
- import { Button as Button12, Card as Card7, Spinner as Spinner7 } from "@pelatform/ui/default";
2586
- import { cn as cn17 } from "@pelatform/utils";
2685
+ import { cn as cn17 } from "pelatform-ui";
2686
+ import { AlertToast as AlertToast10 } from "pelatform-ui/components";
2687
+ import { Button as Button12, Card as Card7, Spinner as Spinner7 } from "pelatform-ui/default";
2587
2688
  import { jsx as jsx22, jsxs as jsxs18 } from "react/jsx-runtime";
2588
2689
  function SessionsCard({ className, classNames, ...props }) {
2589
2690
  const t = useTranslations18();
@@ -2704,7 +2805,7 @@ function TwoFactorCard({ className, classNames, ...props }) {
2704
2805
  }
2705
2806
 
2706
2807
  // src/ui/account/security.tsx
2707
- import { cn as cn18 } from "@pelatform/utils";
2808
+ import { cn as cn18 } from "pelatform-ui";
2708
2809
  import { jsx as jsx24, jsxs as jsxs20 } from "react/jsx-runtime";
2709
2810
  function SecurityCards({
2710
2811
  className,
@@ -2751,12 +2852,13 @@ function SecurityCards({
2751
2852
 
2752
2853
  // src/ui/account/settings.tsx
2753
2854
  import { useTranslations as useTranslations21 } from "next-intl";
2754
- import { cn as cn20 } from "@pelatform/utils";
2855
+ import { cn as cn20 } from "pelatform-ui";
2755
2856
 
2756
2857
  // src/ui/shared/display-id.tsx
2757
2858
  import { useRef as useRef2 } from "react";
2758
2859
  import { CheckIcon as CheckIcon2, CopyIcon as CopyIcon2 } from "lucide-react";
2759
2860
  import { useTranslations as useTranslations20 } from "next-intl";
2861
+ import { cn as cn19 } from "pelatform-ui";
2760
2862
  import {
2761
2863
  Button as Button13,
2762
2864
  Input as Input4,
@@ -2765,9 +2867,8 @@ import {
2765
2867
  TooltipContent,
2766
2868
  TooltipProvider,
2767
2869
  TooltipTrigger
2768
- } from "@pelatform/ui/default";
2769
- import { useCopyToClipboard as useCopyToClipboard2 } from "@pelatform/ui/hooks";
2770
- import { cn as cn19 } from "@pelatform/utils";
2870
+ } from "pelatform-ui/default";
2871
+ import { useCopyToClipboard as useCopyToClipboard2 } from "pelatform-ui/hooks";
2771
2872
  import { jsx as jsx25, jsxs as jsxs21 } from "react/jsx-runtime";
2772
2873
  function DisplayIdCard({
2773
2874
  className,
@@ -2847,12 +2948,16 @@ function SettingsCards({
2847
2948
  // src/ui/apikeys/apikeys.tsx
2848
2949
  import { useMemo as useMemo2, useState as useState13 } from "react";
2849
2950
  import { useTranslations as useTranslations25 } from "next-intl";
2850
- import { Button as Button17, Card as Card9 } from "@pelatform/ui/default";
2851
- import { cn as cn24 } from "@pelatform/utils";
2951
+ import { cn as cn24 } from "pelatform-ui";
2952
+ import { Button as Button17, Card as Card9 } from "pelatform-ui/default";
2852
2953
 
2853
2954
  // src/ui/apikeys/create-apikey.tsx
2955
+ import { zodResolver as zodResolver6 } from "@hookform/resolvers/zod";
2854
2956
  import { useLocale as useLocale2, useTranslations as useTranslations22 } from "next-intl";
2855
- import { AlertToast as AlertToast11 } from "@pelatform/ui/components";
2957
+ import { useForm as useForm7 } from "react-hook-form";
2958
+ import { z as z6 } from "zod";
2959
+ import { cn as cn21 } from "pelatform-ui";
2960
+ import { AlertToast as AlertToast11 } from "pelatform-ui/components";
2856
2961
  import {
2857
2962
  Button as Button14,
2858
2963
  Form as Form7,
@@ -2868,11 +2973,7 @@ import {
2868
2973
  SelectTrigger,
2869
2974
  SelectValue,
2870
2975
  Spinner as Spinner8
2871
- } from "@pelatform/ui/default";
2872
- import { useForm as useForm7 } from "@pelatform/ui/re/react-hook-form";
2873
- import { zodResolver as zodResolver6 } from "@pelatform/ui/re/resolver";
2874
- import { z as z6 } from "@pelatform/ui/re/zod";
2875
- import { cn as cn21 } from "@pelatform/utils";
2976
+ } from "pelatform-ui/default";
2876
2977
  import { jsx as jsx27, jsxs as jsxs23 } from "react/jsx-runtime";
2877
2978
  function CreateApiKeyDialog({
2878
2979
  classNames,
@@ -3011,9 +3112,9 @@ function CreateApiKeyDialog({
3011
3112
  // src/ui/apikeys/delete-apikey.tsx
3012
3113
  import { useState as useState12 } from "react";
3013
3114
  import { useTranslations as useTranslations23 } from "next-intl";
3014
- import { AlertToast as AlertToast12 } from "@pelatform/ui/components";
3015
- import { Button as Button15, Card as Card8, Spinner as Spinner9 } from "@pelatform/ui/default";
3016
- import { cn as cn22 } from "@pelatform/utils";
3115
+ import { cn as cn22 } from "pelatform-ui";
3116
+ import { AlertToast as AlertToast12 } from "pelatform-ui/components";
3117
+ import { Button as Button15, Card as Card8, Spinner as Spinner9 } from "pelatform-ui/default";
3017
3118
  import { jsx as jsx28, jsxs as jsxs24 } from "react/jsx-runtime";
3018
3119
  function ApiKeyDeleteDialog({
3019
3120
  classNames,
@@ -3073,9 +3174,9 @@ function ApiKeyDeleteDialog({
3073
3174
  // src/ui/apikeys/display-apikey.tsx
3074
3175
  import { CheckIcon as CheckIcon3, CopyIcon as CopyIcon3 } from "lucide-react";
3075
3176
  import { useTranslations as useTranslations24 } from "next-intl";
3076
- import { Button as Button16 } from "@pelatform/ui/default";
3077
- import { useCopyToClipboard as useCopyToClipboard3 } from "@pelatform/ui/hooks";
3078
- import { cn as cn23 } from "@pelatform/utils";
3177
+ import { cn as cn23 } from "pelatform-ui";
3178
+ import { Button as Button16 } from "pelatform-ui/default";
3179
+ import { useCopyToClipboard as useCopyToClipboard3 } from "pelatform-ui/hooks";
3079
3180
  import { Fragment as Fragment12, jsx as jsx29, jsxs as jsxs25 } from "react/jsx-runtime";
3080
3181
  function ApiKeyDisplayDialog({
3081
3182
  classNames,
@@ -3237,13 +3338,13 @@ function ApiKeyCell({
3237
3338
  import { useRouter as useRouter7 } from "next/navigation";
3238
3339
  import { LockIcon, MailIcon } from "lucide-react";
3239
3340
  import { useTranslations as useTranslations27 } from "next-intl";
3240
- import { Button as Button18 } from "@pelatform/ui/default";
3241
- import { cn as cn26 } from "@pelatform/utils";
3341
+ import { cn as cn26 } from "pelatform-ui";
3342
+ import { Button as Button18 } from "pelatform-ui/default";
3242
3343
 
3243
3344
  // src/ui/auth/partials/last-used-button.tsx
3244
3345
  import { useTranslations as useTranslations26 } from "next-intl";
3245
- import { Badge } from "@pelatform/ui/default";
3246
- import { cn as cn25 } from "@pelatform/utils";
3346
+ import { cn as cn25 } from "pelatform-ui";
3347
+ import { Badge } from "pelatform-ui/default";
3247
3348
  import { jsx as jsx31 } from "react/jsx-runtime";
3248
3349
  function LastUsedButton({
3249
3350
  className,
@@ -3304,8 +3405,8 @@ function EmailOTPButton({ className, classNames, isSubmitting, view }) {
3304
3405
  import { useRouter as useRouter8 } from "next/navigation";
3305
3406
  import { LockIcon as LockIcon2, MailIcon as MailIcon2 } from "lucide-react";
3306
3407
  import { useTranslations as useTranslations28 } from "next-intl";
3307
- import { Button as Button19 } from "@pelatform/ui/default";
3308
- import { cn as cn27 } from "@pelatform/utils";
3408
+ import { cn as cn27 } from "pelatform-ui";
3409
+ import { Button as Button19 } from "pelatform-ui/default";
3309
3410
  import { jsx as jsx33, jsxs as jsxs28 } from "react/jsx-runtime";
3310
3411
  function MagicLinkButton({ className, classNames, isSubmitting, view }) {
3311
3412
  const { path } = useConfig();
@@ -3341,7 +3442,7 @@ function MagicLinkButton({ className, classNames, isSubmitting, view }) {
3341
3442
  // src/ui/auth/partials/one-tap.tsx
3342
3443
  import { useEffect as useEffect2, useRef as useRef3 } from "react";
3343
3444
  import { useTranslations as useTranslations29 } from "next-intl";
3344
- import { AlertToast as AlertToast13 } from "@pelatform/ui/components";
3445
+ import { AlertToast as AlertToast13 } from "pelatform-ui/components";
3345
3446
  function OneTap({ redirectTo }) {
3346
3447
  const { authClient } = useConfig();
3347
3448
  const t = useTranslations29();
@@ -3373,9 +3474,9 @@ function OneTap({ redirectTo }) {
3373
3474
  // src/ui/auth/partials/passkey-button.tsx
3374
3475
  import { FingerprintIcon as FingerprintIcon2 } from "lucide-react";
3375
3476
  import { useTranslations as useTranslations30 } from "next-intl";
3376
- import { AlertToast as AlertToast14 } from "@pelatform/ui/components";
3377
- import { Button as Button20 } from "@pelatform/ui/default";
3378
- import { cn as cn28 } from "@pelatform/utils";
3477
+ import { cn as cn28 } from "pelatform-ui";
3478
+ import { AlertToast as AlertToast14 } from "pelatform-ui/components";
3479
+ import { Button as Button20 } from "pelatform-ui/default";
3379
3480
  import { jsx as jsx34, jsxs as jsxs29 } from "react/jsx-runtime";
3380
3481
  function PasskeyButton({
3381
3482
  className,
@@ -3439,9 +3540,9 @@ function PasskeyButton({
3439
3540
  // src/ui/auth/partials/provider-button.tsx
3440
3541
  import { useSearchParams as useSearchParams2 } from "next/navigation";
3441
3542
  import { useTranslations as useTranslations31 } from "next-intl";
3442
- import { AlertToast as AlertToast15 } from "@pelatform/ui/components";
3443
- import { Button as Button21 } from "@pelatform/ui/default";
3444
- import { cn as cn29, REDIRECT_QUERY_PARAM as REDIRECT_QUERY_PARAM2 } from "@pelatform/utils";
3543
+ import { cn as cn29, REDIRECT_QUERY_PARAM } from "pelatform-ui";
3544
+ import { AlertToast as AlertToast15 } from "pelatform-ui/components";
3545
+ import { Button as Button21 } from "pelatform-ui/default";
3445
3546
  import { jsx as jsx35, jsxs as jsxs30 } from "react/jsx-runtime";
3446
3547
  function ProviderButton({
3447
3548
  className,
@@ -3459,7 +3560,7 @@ function ProviderButton({
3459
3560
  try {
3460
3561
  await authClient.signIn.social({
3461
3562
  provider: provider.provider,
3462
- callbackURL: `${app.url}${path.auth.CALLBACK}?redirectTo=${searchParams?.get(REDIRECT_QUERY_PARAM2)}`,
3563
+ callbackURL: `${app.url}${path.auth.CALLBACK}?redirectTo=${searchParams?.get(REDIRECT_QUERY_PARAM)}`,
3463
3564
  fetchOptions: { throw: true }
3464
3565
  });
3465
3566
  } catch (error) {
@@ -3503,7 +3604,7 @@ function ProviderButton({
3503
3604
 
3504
3605
  // src/ui/auth/callback.tsx
3505
3606
  import { useEffect as useEffect3, useRef as useRef4 } from "react";
3506
- import { Spinner as Spinner10 } from "@pelatform/ui/default";
3607
+ import { Spinner as Spinner10 } from "pelatform-ui/default";
3507
3608
  import { jsx as jsx36 } from "react/jsx-runtime";
3508
3609
  function AuthCallback({ redirectTo }) {
3509
3610
  const { onSuccess } = useOnSuccessTransition(redirectTo);
@@ -3518,8 +3619,12 @@ function AuthCallback({ redirectTo }) {
3518
3619
 
3519
3620
  // src/ui/auth/email-otp.tsx
3520
3621
  import { useEffect as useEffect4, useState as useState14 } from "react";
3622
+ import { zodResolver as zodResolver7 } from "@hookform/resolvers/zod";
3521
3623
  import { useTranslations as useTranslations32 } from "next-intl";
3522
- import { AlertToast as AlertToast16 } from "@pelatform/ui/components";
3624
+ import { useForm as useForm8 } from "react-hook-form";
3625
+ import { z as z7 } from "zod";
3626
+ import { cn as cn30 } from "pelatform-ui";
3627
+ import { AlertToast as AlertToast16 } from "pelatform-ui/components";
3523
3628
  import {
3524
3629
  Button as Button22,
3525
3630
  Form as Form8,
@@ -3531,14 +3636,10 @@ import {
3531
3636
  Input as Input6,
3532
3637
  InputOTP,
3533
3638
  Spinner as Spinner11
3534
- } from "@pelatform/ui/default";
3535
- import { useForm as useForm8 } from "@pelatform/ui/re/react-hook-form";
3536
- import { zodResolver as zodResolver7 } from "@pelatform/ui/re/resolver";
3537
- import { z as z7 } from "@pelatform/ui/re/zod";
3538
- import { cn as cn30 } from "@pelatform/utils";
3639
+ } from "pelatform-ui/default";
3539
3640
 
3540
3641
  // src/ui/shared/otp-input-group.tsx
3541
- import { InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "@pelatform/ui/default";
3642
+ import { InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "pelatform-ui/default";
3542
3643
  import { Fragment as Fragment14, jsx as jsx37, jsxs as jsxs31 } from "react/jsx-runtime";
3543
3644
  function OTPInputGroup({ otpSeparators = 0 }) {
3544
3645
  if (otpSeparators === 0) {
@@ -3770,8 +3871,12 @@ function OTPForm({
3770
3871
  // src/ui/auth/forgot-password.tsx
3771
3872
  import { useEffect as useEffect5 } from "react";
3772
3873
  import { useRouter as useRouter9 } from "next/navigation";
3874
+ import { zodResolver as zodResolver8 } from "@hookform/resolvers/zod";
3773
3875
  import { useTranslations as useTranslations33 } from "next-intl";
3774
- import { AlertToast as AlertToast17 } from "@pelatform/ui/components";
3876
+ import { useForm as useForm9 } from "react-hook-form";
3877
+ import { z as z8 } from "zod";
3878
+ import { cn as cn31 } from "pelatform-ui";
3879
+ import { AlertToast as AlertToast17 } from "pelatform-ui/components";
3775
3880
  import {
3776
3881
  Button as Button23,
3777
3882
  Form as Form9,
@@ -3782,11 +3887,7 @@ import {
3782
3887
  FormMessage as FormMessage8,
3783
3888
  Input as Input7,
3784
3889
  Spinner as Spinner12
3785
- } from "@pelatform/ui/default";
3786
- import { useForm as useForm9 } from "@pelatform/ui/re/react-hook-form";
3787
- import { zodResolver as zodResolver8 } from "@pelatform/ui/re/resolver";
3788
- import { z as z8 } from "@pelatform/ui/re/zod";
3789
- import { cn as cn31 } from "@pelatform/utils";
3890
+ } from "pelatform-ui/default";
3790
3891
  import { jsx as jsx39, jsxs as jsxs33 } from "react/jsx-runtime";
3791
3892
  function ForgotPasswordForm({
3792
3893
  className,
@@ -3875,8 +3976,12 @@ function ForgotPasswordForm({
3875
3976
  // src/ui/auth/magic-link.tsx
3876
3977
  import { useEffect as useEffect6 } from "react";
3877
3978
  import { useSearchParams as useSearchParams3 } from "next/navigation";
3979
+ import { zodResolver as zodResolver9 } from "@hookform/resolvers/zod";
3878
3980
  import { useTranslations as useTranslations34 } from "next-intl";
3879
- import { AlertToast as AlertToast18 } from "@pelatform/ui/components";
3981
+ import { useForm as useForm10 } from "react-hook-form";
3982
+ import { z as z9 } from "zod";
3983
+ import { cn as cn32, REDIRECT_QUERY_PARAM as REDIRECT_QUERY_PARAM2 } from "pelatform-ui";
3984
+ import { AlertToast as AlertToast18 } from "pelatform-ui/components";
3880
3985
  import {
3881
3986
  Button as Button24,
3882
3987
  Form as Form10,
@@ -3887,11 +3992,7 @@ import {
3887
3992
  FormMessage as FormMessage9,
3888
3993
  Input as Input8,
3889
3994
  Spinner as Spinner13
3890
- } from "@pelatform/ui/default";
3891
- import { useForm as useForm10 } from "@pelatform/ui/re/react-hook-form";
3892
- import { zodResolver as zodResolver9 } from "@pelatform/ui/re/resolver";
3893
- import { z as z9 } from "@pelatform/ui/re/zod";
3894
- import { cn as cn32, REDIRECT_QUERY_PARAM as REDIRECT_QUERY_PARAM3 } from "@pelatform/utils";
3995
+ } from "pelatform-ui/default";
3895
3996
  import { jsx as jsx40, jsxs as jsxs34 } from "react/jsx-runtime";
3896
3997
  function MagicLinkForm({
3897
3998
  className,
@@ -3921,7 +4022,7 @@ function MagicLinkForm({
3921
4022
  try {
3922
4023
  await authClient.signIn.magicLink({
3923
4024
  email,
3924
- callbackURL: `${app.url}${path.auth.CALLBACK}?redirectTo=${searchParams?.get(REDIRECT_QUERY_PARAM3)}`,
4025
+ callbackURL: `${app.url}${path.auth.CALLBACK}?redirectTo=${searchParams?.get(REDIRECT_QUERY_PARAM2)}`,
3925
4026
  fetchOptions: { throw: true }
3926
4027
  });
3927
4028
  AlertToast18({
@@ -3979,8 +4080,12 @@ function MagicLinkForm({
3979
4080
 
3980
4081
  // src/ui/auth/recover-account.tsx
3981
4082
  import { useEffect as useEffect7 } from "react";
4083
+ import { zodResolver as zodResolver10 } from "@hookform/resolvers/zod";
3982
4084
  import { useTranslations as useTranslations35 } from "next-intl";
3983
- import { AlertToast as AlertToast19 } from "@pelatform/ui/components";
4085
+ import { useForm as useForm11 } from "react-hook-form";
4086
+ import { z as z10 } from "zod";
4087
+ import { cn as cn33 } from "pelatform-ui";
4088
+ import { AlertToast as AlertToast19 } from "pelatform-ui/components";
3984
4089
  import {
3985
4090
  Button as Button25,
3986
4091
  Form as Form11,
@@ -3991,11 +4096,7 @@ import {
3991
4096
  FormMessage as FormMessage10,
3992
4097
  Input as Input9,
3993
4098
  Spinner as Spinner14
3994
- } from "@pelatform/ui/default";
3995
- import { useForm as useForm11 } from "@pelatform/ui/re/react-hook-form";
3996
- import { zodResolver as zodResolver10 } from "@pelatform/ui/re/resolver";
3997
- import { z as z10 } from "@pelatform/ui/re/zod";
3998
- import { cn as cn33 } from "@pelatform/utils";
4099
+ } from "pelatform-ui/default";
3999
4100
  import { jsx as jsx41, jsxs as jsxs35 } from "react/jsx-runtime";
4000
4101
  function RecoverAccountForm({
4001
4102
  className,
@@ -4079,8 +4180,12 @@ function RecoverAccountForm({
4079
4180
  // src/ui/auth/reset-password.tsx
4080
4181
  import { useEffect as useEffect8, useMemo as useMemo3, useRef as useRef5 } from "react";
4081
4182
  import { useRouter as useRouter10, useSearchParams as useSearchParams4 } from "next/navigation";
4183
+ import { zodResolver as zodResolver11 } from "@hookform/resolvers/zod";
4082
4184
  import { useTranslations as useTranslations36 } from "next-intl";
4083
- import { AlertToast as AlertToast20 } from "@pelatform/ui/components";
4185
+ import { useForm as useForm12 } from "react-hook-form";
4186
+ import { z as z11 } from "zod";
4187
+ import { cn as cn34 } from "pelatform-ui";
4188
+ import { AlertToast as AlertToast20 } from "pelatform-ui/components";
4084
4189
  import {
4085
4190
  Button as Button26,
4086
4191
  Form as Form12,
@@ -4090,11 +4195,7 @@ import {
4090
4195
  FormLabel as FormLabel10,
4091
4196
  FormMessage as FormMessage11,
4092
4197
  Spinner as Spinner15
4093
- } from "@pelatform/ui/default";
4094
- import { useForm as useForm12 } from "@pelatform/ui/re/react-hook-form";
4095
- import { zodResolver as zodResolver11 } from "@pelatform/ui/re/resolver";
4096
- import { z as z11 } from "@pelatform/ui/re/zod";
4097
- import { cn as cn34 } from "@pelatform/utils";
4198
+ } from "pelatform-ui/default";
4098
4199
  import { jsx as jsx42, jsxs as jsxs36 } from "react/jsx-runtime";
4099
4200
  function ResetPasswordForm({
4100
4201
  className,
@@ -4234,8 +4335,12 @@ function ResetPasswordForm({
4234
4335
  import { useEffect as useEffect9 } from "react";
4235
4336
  import Link from "next/link";
4236
4337
  import { useRouter as useRouter11 } from "next/navigation";
4338
+ import { zodResolver as zodResolver12 } from "@hookform/resolvers/zod";
4237
4339
  import { useTranslations as useTranslations37 } from "next-intl";
4238
- import { AlertToast as AlertToast21 } from "@pelatform/ui/components";
4340
+ import { useForm as useForm13 } from "react-hook-form";
4341
+ import { z as z12 } from "zod";
4342
+ import { cn as cn35, validateEmail } from "pelatform-ui";
4343
+ import { AlertToast as AlertToast21 } from "pelatform-ui/components";
4239
4344
  import {
4240
4345
  Button as Button27,
4241
4346
  Checkbox as Checkbox2,
@@ -4247,11 +4352,7 @@ import {
4247
4352
  FormMessage as FormMessage12,
4248
4353
  Input as Input10,
4249
4354
  Spinner as Spinner16
4250
- } from "@pelatform/ui/default";
4251
- import { useForm as useForm13 } from "@pelatform/ui/re/react-hook-form";
4252
- import { zodResolver as zodResolver12 } from "@pelatform/ui/re/resolver";
4253
- import { z as z12 } from "@pelatform/ui/re/zod";
4254
- import { cn as cn35, validateEmail } from "@pelatform/utils";
4355
+ } from "pelatform-ui/default";
4255
4356
  import { jsx as jsx43, jsxs as jsxs37 } from "react/jsx-runtime";
4256
4357
  function SignInForm({
4257
4358
  className,
@@ -4424,7 +4525,7 @@ function SignInForm({
4424
4525
 
4425
4526
  // src/ui/auth/sign-out.tsx
4426
4527
  import { useEffect as useEffect10, useRef as useRef6 } from "react";
4427
- import { Spinner as Spinner17 } from "@pelatform/ui/default";
4528
+ import { Spinner as Spinner17 } from "pelatform-ui/default";
4428
4529
  import { jsx as jsx44 } from "react/jsx-runtime";
4429
4530
  function SignOut({ redirectTo }) {
4430
4531
  const { authClient, auth } = useConfig();
@@ -4441,8 +4542,12 @@ function SignOut({ redirectTo }) {
4441
4542
  // src/ui/auth/sign-up.tsx
4442
4543
  import { useEffect as useEffect11 } from "react";
4443
4544
  import { useRouter as useRouter12 } from "next/navigation";
4545
+ import { zodResolver as zodResolver13 } from "@hookform/resolvers/zod";
4444
4546
  import { useTranslations as useTranslations38 } from "next-intl";
4445
- import { AlertToast as AlertToast22 } from "@pelatform/ui/components";
4547
+ import { useForm as useForm14 } from "react-hook-form";
4548
+ import { z as z13 } from "zod";
4549
+ import { cn as cn36 } from "pelatform-ui";
4550
+ import { AlertToast as AlertToast22 } from "pelatform-ui/components";
4446
4551
  import {
4447
4552
  Button as Button28,
4448
4553
  Form as Form14,
@@ -4453,11 +4558,7 @@ import {
4453
4558
  FormMessage as FormMessage13,
4454
4559
  Input as Input11,
4455
4560
  Spinner as Spinner18
4456
- } from "@pelatform/ui/default";
4457
- import { useForm as useForm14 } from "@pelatform/ui/re/react-hook-form";
4458
- import { zodResolver as zodResolver13 } from "@pelatform/ui/re/resolver";
4459
- import { z as z13 } from "@pelatform/ui/re/zod";
4460
- import { cn as cn36 } from "@pelatform/utils";
4561
+ } from "pelatform-ui/default";
4461
4562
  import { jsx as jsx45, jsxs as jsxs38 } from "react/jsx-runtime";
4462
4563
  function SignUpForm({
4463
4564
  className,
@@ -4610,10 +4711,14 @@ function SignUpForm({
4610
4711
  import { useCallback as useCallback2, useEffect as useEffect12, useMemo as useMemo4, useRef as useRef7, useState as useState15 } from "react";
4611
4712
  import Link2 from "next/link";
4612
4713
  import { useSearchParams as useSearchParams5 } from "next/navigation";
4714
+ import { zodResolver as zodResolver14 } from "@hookform/resolvers/zod";
4613
4715
  import { QrCodeIcon, SendIcon } from "lucide-react";
4614
4716
  import { useTranslations as useTranslations39 } from "next-intl";
4615
4717
  import QRCode from "qrcode";
4616
- import { AlertToast as AlertToast23 } from "@pelatform/ui/components";
4718
+ import { useForm as useForm15 } from "react-hook-form";
4719
+ import { z as z14 } from "zod";
4720
+ import { cn as cn37 } from "pelatform-ui";
4721
+ import { AlertToast as AlertToast23 } from "pelatform-ui/components";
4617
4722
  import {
4618
4723
  Button as Button29,
4619
4724
  Checkbox as Checkbox3,
@@ -4626,11 +4731,7 @@ import {
4626
4731
  InputOTP as InputOTP2,
4627
4732
  Label,
4628
4733
  Spinner as Spinner19
4629
- } from "@pelatform/ui/default";
4630
- import { useForm as useForm15 } from "@pelatform/ui/re/react-hook-form";
4631
- import { zodResolver as zodResolver14 } from "@pelatform/ui/re/resolver";
4632
- import { z as z14 } from "@pelatform/ui/re/zod";
4633
- import { cn as cn37 } from "@pelatform/utils";
4734
+ } from "pelatform-ui/default";
4634
4735
  import { Fragment as Fragment15, jsx as jsx46, jsxs as jsxs39 } from "react/jsx-runtime";
4635
4736
  function TwoFactorForm({
4636
4737
  className,
@@ -4896,6 +4997,7 @@ import Link3 from "next/link";
4896
4997
  import { useRouter as useRouter13 } from "next/navigation";
4897
4998
  import { ArrowLeftIcon } from "lucide-react";
4898
4999
  import { useTranslations as useTranslations40 } from "next-intl";
5000
+ import { cn as cn38 } from "pelatform-ui";
4899
5001
  import {
4900
5002
  Button as Button30,
4901
5003
  Card as Card10,
@@ -4906,8 +5008,7 @@ import {
4906
5008
  CardHeading,
4907
5009
  CardTitle,
4908
5010
  Separator
4909
- } from "@pelatform/ui/default";
4910
- import { cn as cn38 } from "@pelatform/utils";
5011
+ } from "pelatform-ui/default";
4911
5012
  import { Fragment as Fragment16, jsx as jsx47, jsxs as jsxs40 } from "react/jsx-runtime";
4912
5013
  function getViewByPath(pathConfig, path) {
4913
5014
  if (!path) return null;
@@ -4923,6 +5024,7 @@ function AuthView({
4923
5024
  className,
4924
5025
  classNames,
4925
5026
  cardHeader,
5027
+ enableAcceptInvitation: enableAcceptInvitationProp,
4926
5028
  otpSeparators = 1,
4927
5029
  path: pathProp,
4928
5030
  pathname,
@@ -4930,7 +5032,7 @@ function AuthView({
4930
5032
  socialLayout: socialLayoutProp = "auto",
4931
5033
  view: viewProp
4932
5034
  }) {
4933
- const { auth, path: pathConfig } = useConfig();
5035
+ const { auth, features, path: pathConfig } = useConfig();
4934
5036
  const t = useTranslations40();
4935
5037
  const auths = auth.authentication;
4936
5038
  let socialLayout = socialLayoutProp;
@@ -4948,6 +5050,7 @@ function AuthView({
4948
5050
  window.removeEventListener("pagehide", handlePageHide);
4949
5051
  };
4950
5052
  }, []);
5053
+ const _enableAcceptInvitation = enableAcceptInvitationProp ?? features.workspace;
4951
5054
  if (view === "CALLBACK") return /* @__PURE__ */ jsx47(AuthCallback, { redirectTo });
4952
5055
  if (view === "SIGN_OUT") return /* @__PURE__ */ jsx47(SignOut, {});
4953
5056
  const description = !auths.password && !auths.magicLink && !auths.emailOtp ? t("systems.DISABLED_CREDENTIALS_DESCRIPTION") : t(`systems.${view}_DESCRIPTION`);
@@ -5268,15 +5371,15 @@ function AuthForm({
5268
5371
  }
5269
5372
 
5270
5373
  // src/ui/layouts/auth.tsx
5271
- import Link6 from "next/link";
5374
+ import Link5 from "next/link";
5272
5375
  import { usePathname } from "next/navigation";
5273
- import { useTranslations as useTranslations44 } from "next-intl";
5274
- import { LayoutBlank } from "@pelatform/ui/components";
5376
+ import { useTranslations as useTranslations43 } from "next-intl";
5377
+ import { LayoutBlank } from "pelatform-ui/components";
5275
5378
 
5276
5379
  // src/ui/shared/logo.tsx
5277
5380
  import Link4 from "next/link";
5278
- import { Logo } from "@pelatform/ui/components";
5279
- import { cn as cn39 } from "@pelatform/utils";
5381
+ import { cn as cn39 } from "pelatform-ui";
5382
+ import { Logo } from "pelatform-ui/components";
5280
5383
  import { jsx as jsx48, jsxs as jsxs41 } from "react/jsx-runtime";
5281
5384
  function LogoWithName({ className }) {
5282
5385
  const { app } = useConfig();
@@ -5293,50 +5396,32 @@ function LogoWithHref({ className, href = "/" }) {
5293
5396
  ] });
5294
5397
  }
5295
5398
 
5296
- // src/ui/shared/signed-in-hint.tsx
5297
- import Link5 from "next/link";
5298
- import { useTranslations as useTranslations41 } from "next-intl";
5299
- import { Button as Button31 } from "@pelatform/ui/default";
5300
- import { jsx as jsx49, jsxs as jsxs42 } from "react/jsx-runtime";
5301
- function SignedInHint({ linkHref = "/signin" }) {
5302
- const t = useTranslations41("customs.common.signed");
5303
- const { isPending, user } = useSession();
5304
- return /* @__PURE__ */ jsxs42("div", { className: "fixed start-0 bottom-0 z-40 m-5 flex flex-col gap-2", children: [
5305
- /* @__PURE__ */ jsxs42("div", { className: "flex items-center gap-1 text-muted-foreground text-xs", children: [
5306
- t("text"),
5307
- " ",
5308
- isPending || !user ? /* @__PURE__ */ jsx49("span", { className: "h-3 w-32 animate-pulse rounded-md border bg-muted-foreground" }) : /* @__PURE__ */ jsx49("b", { className: "text-foreground", children: user.email })
5309
- ] }),
5310
- /* @__PURE__ */ jsx49(Button31, { variant: "mono", className: "h-8 w-fit rounded-lg px-3 text-xs shadow-sm", children: /* @__PURE__ */ jsx49(Link5, { href: linkHref, children: t("button") }) })
5311
- ] });
5312
- }
5313
-
5314
5399
  // src/ui/layouts/loader.tsx
5315
- import { useTranslations as useTranslations42 } from "next-intl";
5316
- import { ScreenLoader } from "@pelatform/ui/components";
5317
- import { jsx as jsx50 } from "react/jsx-runtime";
5400
+ import { useTranslations as useTranslations41 } from "next-intl";
5401
+ import { ScreenLoader } from "pelatform-ui/components";
5402
+ import { jsx as jsx49 } from "react/jsx-runtime";
5318
5403
  function LayoutLoader({ children }) {
5319
- const t = useTranslations42();
5404
+ const t = useTranslations41();
5320
5405
  const { isPending } = useSession();
5321
5406
  if (isPending) {
5322
- return /* @__PURE__ */ jsx50(ScreenLoader, { loadingText: t("systems.common.status.loading") });
5407
+ return /* @__PURE__ */ jsx49(ScreenLoader, { loadingText: t("systems.common.status.loading") });
5323
5408
  }
5324
5409
  return children;
5325
5410
  }
5326
5411
 
5327
5412
  // src/ui/layouts/toolbar.tsx
5328
5413
  import { Suspense } from "react";
5329
- import { ModeSwitcher } from "@pelatform/ui/components";
5330
- import { cn as cn40 } from "@pelatform/utils";
5414
+ import { cn as cn40 } from "pelatform-ui";
5415
+ import { ModeSwitcher } from "pelatform-ui/components";
5331
5416
 
5332
5417
  // src/ui/shared/language-switcher.tsx
5333
5418
  import Image from "next/image";
5334
5419
  import { useRouter as useRouter14 } from "next/navigation";
5335
- import { useLocale as useLocale3, useTranslations as useTranslations43 } from "next-intl";
5420
+ import { useLocale as useLocale3, useTranslations as useTranslations42 } from "next-intl";
5336
5421
  import {
5337
5422
  LanguageSwitcher as LanguageSwitcherBase
5338
- } from "@pelatform/ui/components";
5339
- import { jsx as jsx51 } from "react/jsx-runtime";
5423
+ } from "pelatform-ui/components";
5424
+ import { jsx as jsx50 } from "react/jsx-runtime";
5340
5425
  function LanguageSwitcher({
5341
5426
  className,
5342
5427
  type,
@@ -5347,7 +5432,7 @@ function LanguageSwitcher({
5347
5432
  }) {
5348
5433
  const { i18n } = useConfig();
5349
5434
  const router = useRouter14();
5350
- const t = useTranslations43();
5435
+ const t = useTranslations42();
5351
5436
  const currentLocale = useLocale3();
5352
5437
  const availableLocales = (() => {
5353
5438
  if (!i18n.enabled) {
@@ -5371,7 +5456,7 @@ function LanguageSwitcher({
5371
5456
  document.cookie = `${i18n.localeCookieName}=${newLocale}; max-age=${60 * 60 * 24 * 365}; path=/`;
5372
5457
  router.refresh();
5373
5458
  }
5374
- return /* @__PURE__ */ jsx51(
5459
+ return /* @__PURE__ */ jsx50(
5375
5460
  LanguageSwitcherBase,
5376
5461
  {
5377
5462
  className,
@@ -5392,34 +5477,34 @@ function LanguageSwitcher({
5392
5477
  }
5393
5478
 
5394
5479
  // src/ui/layouts/toolbar.tsx
5395
- import { jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
5480
+ import { jsx as jsx51, jsxs as jsxs42 } from "react/jsx-runtime";
5396
5481
  var DEFAULT_SHOW = ["darkmode"];
5397
5482
  function Toolbar(props) {
5398
- return /* @__PURE__ */ jsx52(Suspense, { fallback: null, children: /* @__PURE__ */ jsx52("div", { className: cn40("fixed end-0 bottom-0 z-40 m-5", props.className), children: /* @__PURE__ */ jsx52(ToolbarRSC, { ...props }) }) });
5483
+ return /* @__PURE__ */ jsx51(Suspense, { fallback: null, children: /* @__PURE__ */ jsx51("div", { className: cn40("fixed end-0 bottom-0 z-40 m-5", props.className), children: /* @__PURE__ */ jsx51(ToolbarRSC, { ...props }) }) });
5399
5484
  }
5400
5485
  function ToolbarRSC({ show = DEFAULT_SHOW }) {
5401
- return /* @__PURE__ */ jsx52("div", { className: "flex flex-col items-center gap-2.5", children: /* @__PURE__ */ jsxs43("div", { className: "shrink-0", children: [
5402
- show.includes("darkmode") && /* @__PURE__ */ jsx52(ModeSwitcher, { variant: "outline", size: "lg", className: "size-10 rounded-full border" }),
5403
- show.includes("help") && /* @__PURE__ */ jsx52("div", { className: "hidden" }),
5404
- show.includes("language") && /* @__PURE__ */ jsx52(LanguageSwitcher, { variant: "outline", size: "lg", className: "size-10 rounded-full border" }),
5405
- show.includes("onboarding") && /* @__PURE__ */ jsx52("div", { className: "hidden" })
5486
+ return /* @__PURE__ */ jsx51("div", { className: "flex flex-col items-center gap-2.5", children: /* @__PURE__ */ jsxs42("div", { className: "shrink-0", children: [
5487
+ show.includes("darkmode") && /* @__PURE__ */ jsx51(ModeSwitcher, { variant: "outline", size: "lg", className: "size-10 rounded-full border" }),
5488
+ show.includes("help") && /* @__PURE__ */ jsx51("div", { className: "hidden" }),
5489
+ show.includes("language") && /* @__PURE__ */ jsx51(LanguageSwitcher, { variant: "outline", size: "lg", className: "size-10 rounded-full border" }),
5490
+ show.includes("onboarding") && /* @__PURE__ */ jsx51("div", { className: "hidden" })
5406
5491
  ] }) });
5407
5492
  }
5408
5493
 
5409
5494
  // src/ui/layouts/auth.tsx
5410
- import { jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
5495
+ import { jsx as jsx52, jsxs as jsxs43 } from "react/jsx-runtime";
5411
5496
  function AuthLayout({
5412
5497
  children,
5413
- logo = /* @__PURE__ */ jsx53(LogoWithName, {})
5498
+ logo = /* @__PURE__ */ jsx52(LogoWithName, {})
5414
5499
  }) {
5415
5500
  const { app, path } = useConfig();
5416
5501
  const pathname = usePathname();
5417
- const t = useTranslations44();
5418
- const footer = /* @__PURE__ */ jsxs44("p", { className: "px-20 py-4 text-center font-medium text-muted-foreground text-xs md:px-0", children: [
5502
+ const t = useTranslations43();
5503
+ const footer = /* @__PURE__ */ jsxs43("p", { className: "px-20 py-4 text-center font-medium text-muted-foreground text-xs md:px-0", children: [
5419
5504
  t("customs.common.agree"),
5420
5505
  " ",
5421
- /* @__PURE__ */ jsx53(
5422
- Link6,
5506
+ /* @__PURE__ */ jsx52(
5507
+ Link5,
5423
5508
  {
5424
5509
  href: path.main.TERMS,
5425
5510
  target: "_blank",
@@ -5428,8 +5513,8 @@ function AuthLayout({
5428
5513
  }
5429
5514
  ),
5430
5515
  " ",
5431
- /* @__PURE__ */ jsx53(
5432
- Link6,
5516
+ /* @__PURE__ */ jsx52(
5517
+ Link5,
5433
5518
  {
5434
5519
  href: path.main.PRIVACY,
5435
5520
  target: "_blank",
@@ -5438,20 +5523,19 @@ function AuthLayout({
5438
5523
  }
5439
5524
  )
5440
5525
  ] });
5441
- return /* @__PURE__ */ jsxs44(LayoutLoader, { children: [
5442
- /* @__PURE__ */ jsx53(Toolbar, { show: ["language"], className: "top-0!" }),
5443
- /* @__PURE__ */ jsx53(
5526
+ return /* @__PURE__ */ jsxs43(LayoutLoader, { children: [
5527
+ /* @__PURE__ */ jsx52(Toolbar, { show: ["language"], className: "top-0!" }),
5528
+ /* @__PURE__ */ jsx52(
5444
5529
  LayoutBlank,
5445
5530
  {
5446
5531
  className: "[&_.max-w-4xl]:max-w-sm [&_.max-w-4xl]:px-0",
5447
5532
  logo,
5448
5533
  logoHref: app.url,
5449
- footer: pathname === path.auth.SIGN_OUT || pathname === path.auth.CALLBACK || pathname === path.auth.ACCEPT_INVITATION ? null : footer,
5534
+ footer: pathname === path.auth.SIGN_OUT || pathname === path.auth.CALLBACK ? null : footer,
5450
5535
  children
5451
5536
  }
5452
5537
  ),
5453
- /* @__PURE__ */ jsx53(Toolbar, { show: ["darkmode"] }),
5454
- pathname === path.auth.ACCEPT_INVITATION && /* @__PURE__ */ jsx53(SignedInHint, { linkHref: path.auth.SIGN_IN })
5538
+ /* @__PURE__ */ jsx52(Toolbar, { show: ["darkmode"] })
5455
5539
  ] });
5456
5540
  }
5457
5541
 
@@ -5460,7 +5544,7 @@ import { useEffect as useEffect15, useState as useState18 } from "react";
5460
5544
  import { usePathname as usePathname2 } from "next/navigation";
5461
5545
  import { Menu, PanelRight } from "lucide-react";
5462
5546
  import {
5463
- Button as Button32,
5547
+ Button as Button31,
5464
5548
  Sheet,
5465
5549
  SheetBody,
5466
5550
  SheetContent,
@@ -5468,15 +5552,15 @@ import {
5468
5552
  SheetHeader,
5469
5553
  SheetTitle,
5470
5554
  SheetTrigger
5471
- } from "@pelatform/ui/default";
5555
+ } from "pelatform-ui/default";
5472
5556
 
5473
5557
  // src/ui/shared/user-menu.tsx
5474
5558
  import { Fragment as Fragment17, useCallback as useCallback3, useEffect as useEffect14, useState as useState17 } from "react";
5475
- import Link7 from "next/link";
5559
+ import Link6 from "next/link";
5476
5560
  import { useRouter as useRouter15 } from "next/navigation";
5477
5561
  import { LogOut, PlusCircleIcon, Settings, Shield, UserStar } from "lucide-react";
5478
- import { useTranslations as useTranslations45 } from "next-intl";
5479
- import { ModeSwitcher as ModeSwitcher2, UserAvatar as UserAvatar2 } from "@pelatform/ui/components";
5562
+ import { useTranslations as useTranslations44 } from "next-intl";
5563
+ import { ModeSwitcher as ModeSwitcher2, UserAvatar as UserAvatar2 } from "pelatform-ui/components";
5480
5564
  import {
5481
5565
  Badge as Badge2,
5482
5566
  DropdownMenu as DropdownMenu3,
@@ -5485,12 +5569,12 @@ import {
5485
5569
  DropdownMenuSeparator,
5486
5570
  DropdownMenuTrigger as DropdownMenuTrigger3,
5487
5571
  Skeleton as Skeleton9
5488
- } from "@pelatform/ui/default";
5489
- import { Fragment as Fragment18, jsx as jsx54, jsxs as jsxs45 } from "react/jsx-runtime";
5572
+ } from "pelatform-ui/default";
5573
+ import { Fragment as Fragment18, jsx as jsx53, jsxs as jsxs44 } from "react/jsx-runtime";
5490
5574
  function UserMenu({ hiddenSwitcher = false }) {
5491
5575
  const { features, path } = useConfig();
5492
5576
  const router = useRouter15();
5493
- const t = useTranslations45();
5577
+ const t = useTranslations44();
5494
5578
  const { isPending: sessionPending, user } = useSession();
5495
5579
  const { setActiveSessionAsync } = useSetActiveSession();
5496
5580
  const { data: deviceSessions, isPending: deviceSessionsPending } = useListDeviceSessions({
@@ -5523,33 +5607,33 @@ function UserMenu({ hiddenSwitcher = false }) {
5523
5607
  const userName = getName(user);
5524
5608
  const userAvatar = user?.image || void 0;
5525
5609
  const userRole = user?.role || "user";
5526
- return /* @__PURE__ */ jsxs45(DropdownMenu3, { children: [
5527
- /* @__PURE__ */ jsx54(DropdownMenuTrigger3, { className: "focus:outline-none focus:ring-0", children: isPending ? /* @__PURE__ */ jsx54(Skeleton9, { className: "size-8 shrink-0 rounded-full" }) : /* @__PURE__ */ jsx54(UserAvatar2, { className: "size-8", indicator: true, src: userAvatar, alt: userName }) }),
5528
- /* @__PURE__ */ jsxs45(DropdownMenuContent3, { className: "w-56", side: "bottom", align: "end", sideOffset: 11, children: [
5529
- /* @__PURE__ */ jsxs45("div", { className: "flex items-center gap-3 px-3 py-2", children: [
5530
- /* @__PURE__ */ jsx54(UserAvatar2, { src: userAvatar, alt: userName }),
5531
- /* @__PURE__ */ jsxs45("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
5532
- /* @__PURE__ */ jsx54("span", { className: "truncate font-semibold text-foreground text-sm", children: userName }),
5533
- /* @__PURE__ */ jsx54("span", { className: "block w-full truncate text-muted-foreground text-xs", children: userEmail }),
5534
- /* @__PURE__ */ jsx54(Badge2, { variant: "success", appearance: "outline", size: "sm", className: "mt-1", children: userRole.toUpperCase() })
5610
+ return /* @__PURE__ */ jsxs44(DropdownMenu3, { children: [
5611
+ /* @__PURE__ */ jsx53(DropdownMenuTrigger3, { className: "focus:outline-none focus:ring-0", children: isPending ? /* @__PURE__ */ jsx53(Skeleton9, { className: "size-8 shrink-0 rounded-full" }) : /* @__PURE__ */ jsx53(UserAvatar2, { className: "size-8", indicator: true, src: userAvatar, alt: userName }) }),
5612
+ /* @__PURE__ */ jsxs44(DropdownMenuContent3, { className: "w-56", side: "bottom", align: "end", sideOffset: 11, children: [
5613
+ /* @__PURE__ */ jsxs44("div", { className: "flex items-center gap-3 px-3 py-2", children: [
5614
+ /* @__PURE__ */ jsx53(UserAvatar2, { src: userAvatar, alt: userName }),
5615
+ /* @__PURE__ */ jsxs44("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
5616
+ /* @__PURE__ */ jsx53("span", { className: "truncate font-semibold text-foreground text-sm", children: userName }),
5617
+ /* @__PURE__ */ jsx53("span", { className: "block w-full truncate text-muted-foreground text-xs", children: userEmail }),
5618
+ /* @__PURE__ */ jsx53(Badge2, { variant: "success", appearance: "outline", size: "sm", className: "mt-1", children: userRole.toUpperCase() })
5535
5619
  ] })
5536
5620
  ] }),
5537
- /* @__PURE__ */ jsx54(DropdownMenuSeparator, {}),
5538
- /* @__PURE__ */ jsx54(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs45(Link7, { href: path.account.SETTINGS, children: [
5539
- /* @__PURE__ */ jsx54(Settings, {}),
5540
- /* @__PURE__ */ jsx54("span", { children: t("systems.navigation.preferences") })
5621
+ /* @__PURE__ */ jsx53(DropdownMenuSeparator, {}),
5622
+ /* @__PURE__ */ jsx53(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs44(Link6, { href: path.account.SETTINGS, children: [
5623
+ /* @__PURE__ */ jsx53(Settings, {}),
5624
+ /* @__PURE__ */ jsx53("span", { children: t("systems.navigation.preferences") })
5541
5625
  ] }) }),
5542
- /* @__PURE__ */ jsx54(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs45(Link7, { href: path.account.SECURITY, children: [
5543
- /* @__PURE__ */ jsx54(Shield, {}),
5544
- /* @__PURE__ */ jsx54("span", { children: t("systems.navigation.security") })
5626
+ /* @__PURE__ */ jsx53(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs44(Link6, { href: path.account.SECURITY, children: [
5627
+ /* @__PURE__ */ jsx53(Shield, {}),
5628
+ /* @__PURE__ */ jsx53("span", { children: t("systems.navigation.security") })
5545
5629
  ] }) }),
5546
- "admin" === userRole && /* @__PURE__ */ jsx54(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs45(Link7, { href: path.admin.OVERVIEW, children: [
5547
- /* @__PURE__ */ jsx54(UserStar, {}),
5548
- /* @__PURE__ */ jsx54("span", { children: "Admin Dashboard" })
5630
+ "admin" === userRole && /* @__PURE__ */ jsx53(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs44(Link6, { href: path.admin.OVERVIEW, children: [
5631
+ /* @__PURE__ */ jsx53(UserStar, {}),
5632
+ /* @__PURE__ */ jsx53("span", { children: "Admin Dashboard" })
5549
5633
  ] }) }),
5550
- !hiddenSwitcher && /* @__PURE__ */ jsxs45(Fragment18, { children: [
5551
- /* @__PURE__ */ jsx54(DropdownMenuSeparator, {}),
5552
- /* @__PURE__ */ jsx54(
5634
+ !hiddenSwitcher && /* @__PURE__ */ jsxs44(Fragment18, { children: [
5635
+ /* @__PURE__ */ jsx53(DropdownMenuSeparator, {}),
5636
+ /* @__PURE__ */ jsx53(
5553
5637
  ModeSwitcher2,
5554
5638
  {
5555
5639
  type: "sub-dropdown",
@@ -5560,31 +5644,31 @@ function UserMenu({ hiddenSwitcher = false }) {
5560
5644
  }
5561
5645
  }
5562
5646
  ),
5563
- /* @__PURE__ */ jsx54(LanguageSwitcher, { type: "sub-dropdown" })
5647
+ /* @__PURE__ */ jsx53(LanguageSwitcher, { type: "sub-dropdown" })
5564
5648
  ] }),
5565
- /* @__PURE__ */ jsx54(DropdownMenuSeparator, {}),
5566
- /* @__PURE__ */ jsx54(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs45(Link7, { href: path.auth.SIGN_OUT, children: [
5567
- /* @__PURE__ */ jsx54(LogOut, {}),
5568
- /* @__PURE__ */ jsx54("span", { children: t("systems.navigation.logout") })
5649
+ /* @__PURE__ */ jsx53(DropdownMenuSeparator, {}),
5650
+ /* @__PURE__ */ jsx53(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs44(Link6, { href: path.auth.SIGN_OUT, children: [
5651
+ /* @__PURE__ */ jsx53(LogOut, {}),
5652
+ /* @__PURE__ */ jsx53("span", { children: t("systems.navigation.logout") })
5569
5653
  ] }) }),
5570
- user && features.multiSession && /* @__PURE__ */ jsxs45(Fragment18, { children: [
5571
- /* @__PURE__ */ jsx54(DropdownMenuSeparator, {}),
5572
- !deviceSessions && deviceSessionsPending && /* @__PURE__ */ jsxs45(Fragment18, { children: [
5573
- /* @__PURE__ */ jsx54(DropdownMenuItem3, { disabled: true, children: /* @__PURE__ */ jsx54(UserView, { isPending: true }) }),
5574
- /* @__PURE__ */ jsx54(DropdownMenuSeparator, {})
5654
+ user && features.multiSession && /* @__PURE__ */ jsxs44(Fragment18, { children: [
5655
+ /* @__PURE__ */ jsx53(DropdownMenuSeparator, {}),
5656
+ !deviceSessions && deviceSessionsPending && /* @__PURE__ */ jsxs44(Fragment18, { children: [
5657
+ /* @__PURE__ */ jsx53(DropdownMenuItem3, { disabled: true, children: /* @__PURE__ */ jsx53(UserView, { isPending: true }) }),
5658
+ /* @__PURE__ */ jsx53(DropdownMenuSeparator, {})
5575
5659
  ] }),
5576
- deviceSessions?.filter((sessionData) => sessionData.user.id !== user?.id).map(({ session, user: multiUser }) => /* @__PURE__ */ jsxs45(Fragment17, { children: [
5577
- /* @__PURE__ */ jsxs45(DropdownMenuItem3, { onClick: () => switchAccount(session.token), children: [
5578
- /* @__PURE__ */ jsx54(UserAvatar2, { src: multiUser?.image || void 0, alt: getName(multiUser) }),
5579
- /* @__PURE__ */ jsxs45("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
5580
- /* @__PURE__ */ jsx54("span", { className: "truncate font-semibold text-foreground text-xs", children: getName(multiUser) }),
5581
- /* @__PURE__ */ jsx54("span", { className: "block w-full truncate text-muted-foreground text-xs", children: multiUser?.email })
5660
+ deviceSessions?.filter((sessionData) => sessionData.user.id !== user?.id).map(({ session, user: multiUser }) => /* @__PURE__ */ jsxs44(Fragment17, { children: [
5661
+ /* @__PURE__ */ jsxs44(DropdownMenuItem3, { onClick: () => switchAccount(session.token), children: [
5662
+ /* @__PURE__ */ jsx53(UserAvatar2, { src: multiUser?.image || void 0, alt: getName(multiUser) }),
5663
+ /* @__PURE__ */ jsxs44("div", { className: "flex min-w-0 flex-1 flex-col items-start", children: [
5664
+ /* @__PURE__ */ jsx53("span", { className: "truncate font-semibold text-foreground text-xs", children: getName(multiUser) }),
5665
+ /* @__PURE__ */ jsx53("span", { className: "block w-full truncate text-muted-foreground text-xs", children: multiUser?.email })
5582
5666
  ] })
5583
5667
  ] }),
5584
- /* @__PURE__ */ jsx54(DropdownMenuSeparator, {})
5668
+ /* @__PURE__ */ jsx53(DropdownMenuSeparator, {})
5585
5669
  ] }, session.id)),
5586
- /* @__PURE__ */ jsx54(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs45(Link7, { href: path.auth.SIGN_IN, children: [
5587
- /* @__PURE__ */ jsx54(PlusCircleIcon, {}),
5670
+ /* @__PURE__ */ jsx53(DropdownMenuItem3, { asChild: true, children: /* @__PURE__ */ jsxs44(Link6, { href: path.auth.SIGN_IN, children: [
5671
+ /* @__PURE__ */ jsx53(PlusCircleIcon, {}),
5588
5672
  t("systems.ADD_ACCOUNT")
5589
5673
  ] }) })
5590
5674
  ] })
@@ -5593,32 +5677,32 @@ function UserMenu({ hiddenSwitcher = false }) {
5593
5677
  }
5594
5678
 
5595
5679
  // src/ui/layouts/header.tsx
5596
- import { jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
5680
+ import { jsx as jsx54, jsxs as jsxs45 } from "react/jsx-runtime";
5597
5681
  function Header({ children }) {
5598
- return /* @__PURE__ */ jsx55("header", { className: "fixed start-0 end-0 top-0 z-10 flex h-(--header-height-mobile) shrink-0 items-stretch border-border border-b bg-background/95 pe-(--removed-body-scroll-bar-size,0px) backdrop-blur-sm supports-backdrop-filter:bg-background/60 lg:h-(--header-height)", children: /* @__PURE__ */ jsx55("div", { className: "@container flex grow items-stretch justify-between gap-2.5 pe-5", children }) });
5682
+ return /* @__PURE__ */ jsx54("header", { className: "fixed start-0 end-0 top-0 z-10 flex h-(--header-height-mobile) shrink-0 items-stretch border-border border-b bg-background/95 pe-(--removed-body-scroll-bar-size,0px) backdrop-blur-sm supports-backdrop-filter:bg-background/60 lg:h-(--header-height)", children: /* @__PURE__ */ jsx54("div", { className: "@container flex grow items-stretch justify-between gap-2.5 pe-5", children }) });
5599
5683
  }
5600
5684
  function HeaderLeft() {
5601
5685
  const { logoHeader, sidebarToggle } = useLayout();
5602
- return /* @__PURE__ */ jsx55("div", { className: "flex items-center gap-2 px-5 lg:w-(--sidebar-width)", children: /* @__PURE__ */ jsxs46("div", { className: "flex w-full items-center justify-between", children: [
5686
+ return /* @__PURE__ */ jsx54("div", { className: "flex items-center gap-2 px-5 lg:w-(--sidebar-width)", children: /* @__PURE__ */ jsxs45("div", { className: "flex w-full items-center justify-between", children: [
5603
5687
  logoHeader,
5604
- /* @__PURE__ */ jsx55(
5605
- Button32,
5688
+ /* @__PURE__ */ jsx54(
5689
+ Button31,
5606
5690
  {
5607
5691
  mode: "icon",
5608
5692
  variant: "ghost",
5609
5693
  onClick: sidebarToggle,
5610
5694
  className: "hidden text-muted-foreground hover:text-foreground lg:inline-flex",
5611
- children: /* @__PURE__ */ jsx55(PanelRight, { className: "-rotate-180 in-data-[sidebar-open=false]:rotate-0 opacity-100" })
5695
+ children: /* @__PURE__ */ jsx54(PanelRight, { className: "-rotate-180 in-data-[sidebar-open=false]:rotate-0 opacity-100" })
5612
5696
  }
5613
5697
  )
5614
5698
  ] }) });
5615
5699
  }
5616
5700
  function HeaderRight({ sidebar, button }) {
5617
5701
  const { isMobile } = useLayout();
5618
- return /* @__PURE__ */ jsxs46("nav", { className: "flex items-center gap-1.5 lg:gap-2.5", children: [
5702
+ return /* @__PURE__ */ jsxs45("nav", { className: "flex items-center gap-1.5 lg:gap-2.5", children: [
5619
5703
  button,
5620
5704
  isMobile && sidebar,
5621
- /* @__PURE__ */ jsx55(UserMenu, {})
5705
+ /* @__PURE__ */ jsx54(UserMenu, {})
5622
5706
  ] });
5623
5707
  }
5624
5708
  function HeaderSidebarMobile({ children }) {
@@ -5627,24 +5711,24 @@ function HeaderSidebarMobile({ children }) {
5627
5711
  useEffect15(() => {
5628
5712
  setIsSheetOpen(false);
5629
5713
  }, [pathname]);
5630
- return /* @__PURE__ */ jsxs46(Sheet, { open: isSheetOpen, onOpenChange: setIsSheetOpen, children: [
5631
- /* @__PURE__ */ jsx55(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx55(Button32, { variant: "ghost", mode: "icon", size: "icon", children: /* @__PURE__ */ jsx55(Menu, { className: "size-4" }) }) }),
5632
- /* @__PURE__ */ jsxs46(SheetContent, { className: "w-(--sidebar-width) gap-0 p-0", side: "left", close: false, children: [
5633
- /* @__PURE__ */ jsxs46(SheetHeader, { className: "hidden space-y-0 p-0", children: [
5634
- /* @__PURE__ */ jsx55(SheetTitle, { className: "sr-only", children: "Navigation menu" }),
5635
- /* @__PURE__ */ jsx55(SheetDescription, { className: "sr-only", children: "NavigatSheet Description" })
5714
+ return /* @__PURE__ */ jsxs45(Sheet, { open: isSheetOpen, onOpenChange: setIsSheetOpen, children: [
5715
+ /* @__PURE__ */ jsx54(SheetTrigger, { asChild: true, children: /* @__PURE__ */ jsx54(Button31, { variant: "ghost", mode: "icon", size: "icon", children: /* @__PURE__ */ jsx54(Menu, { className: "size-4" }) }) }),
5716
+ /* @__PURE__ */ jsxs45(SheetContent, { className: "w-(--sidebar-width) gap-0 p-0", side: "left", close: false, children: [
5717
+ /* @__PURE__ */ jsxs45(SheetHeader, { className: "hidden space-y-0 p-0", children: [
5718
+ /* @__PURE__ */ jsx54(SheetTitle, { className: "sr-only", children: "Navigation menu" }),
5719
+ /* @__PURE__ */ jsx54(SheetDescription, { className: "sr-only", children: "NavigatSheet Description" })
5636
5720
  ] }),
5637
- /* @__PURE__ */ jsx55(SheetBody, { className: "flex grow flex-col p-0", children })
5721
+ /* @__PURE__ */ jsx54(SheetBody, { className: "flex grow flex-col p-0", children })
5638
5722
  ] })
5639
5723
  ] });
5640
5724
  }
5641
5725
 
5642
5726
  // src/ui/layouts/sidebar.tsx
5643
5727
  import { useCallback as useCallback4, useMemo as useMemo5 } from "react";
5644
- import Link8 from "next/link";
5728
+ import Link7 from "next/link";
5645
5729
  import { usePathname as usePathname3 } from "next/navigation";
5646
- import { useTranslations as useTranslations46 } from "next-intl";
5647
- import { BackLink } from "@pelatform/ui/components";
5730
+ import { useTranslations as useTranslations45 } from "next-intl";
5731
+ import { BackLink } from "pelatform-ui/components";
5648
5732
  import {
5649
5733
  AccordionMenu,
5650
5734
  AccordionMenuGroup,
@@ -5656,27 +5740,27 @@ import {
5656
5740
  AccordionMenuSubTrigger,
5657
5741
  Badge as Badge3,
5658
5742
  ScrollArea
5659
- } from "@pelatform/ui/default";
5660
- import { Fragment as Fragment19, jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
5743
+ } from "pelatform-ui/default";
5744
+ import { Fragment as Fragment19, jsx as jsx55, jsxs as jsxs46 } from "react/jsx-runtime";
5661
5745
  function Sidebar({ children }) {
5662
5746
  const { isMobile } = useLayout();
5663
5747
  if (isMobile) {
5664
5748
  return null;
5665
5749
  }
5666
- return /* @__PURE__ */ jsxs47("aside", { className: "in-data-[sidebar-open=false]:-start-full fixed start-0 top-(--header-height) bottom-0 flex w-(--sidebar-width) shrink-0 flex-col items-stretch border-border border-e transition-all duration-300", children: [
5750
+ return /* @__PURE__ */ jsxs46("aside", { className: "in-data-[sidebar-open=false]:-start-full fixed start-0 top-(--header-height) bottom-0 flex w-(--sidebar-width) shrink-0 flex-col items-stretch border-border border-e transition-all duration-300", children: [
5667
5751
  children,
5668
- /* @__PURE__ */ jsx56("div", {})
5752
+ /* @__PURE__ */ jsx55("div", {})
5669
5753
  ] });
5670
5754
  }
5671
5755
  function SidebarHeaderBack({
5672
5756
  linkHref = "/",
5673
5757
  admin = false
5674
5758
  }) {
5675
- const t = useTranslations46();
5676
- return /* @__PURE__ */ jsx56("div", { className: "flex h-14 shrink-0 items-center gap-2 border-border border-b px-2.5 lg:h-15", children: /* @__PURE__ */ jsx56(BackLink, { Link: Link8, href: linkHref, children: admin ? t("systems.common.actions.back") : t("systems.navigation.settings") }) });
5759
+ const t = useTranslations45();
5760
+ return /* @__PURE__ */ jsx55("div", { className: "flex h-14 shrink-0 items-center gap-2 border-border border-b px-2.5 lg:h-15", children: /* @__PURE__ */ jsx55(BackLink, { Link: Link7, href: linkHref, children: admin ? t("systems.common.actions.back") : t("systems.navigation.settings") }) });
5677
5761
  }
5678
5762
  function SidebarContent({ children }) {
5679
- return /* @__PURE__ */ jsx56(ScrollArea, { className: "mt-2 mb-2.5 h-[calc(100vh-5.5rem)] grow lg:mt-4 lg:mb-7.5 lg:h-[calc(100vh-4rem)]", children });
5763
+ return /* @__PURE__ */ jsx55(ScrollArea, { className: "mt-2 mb-2.5 h-[calc(100vh-5.5rem)] grow lg:mt-4 lg:mb-7.5 lg:h-[calc(100vh-4rem)]", children });
5680
5764
  }
5681
5765
  function SidebarContentMenu({
5682
5766
  menu,
@@ -5718,7 +5802,7 @@ function SidebarContentMenu({
5718
5802
  [activePath, normalize]
5719
5803
  );
5720
5804
  if (type === "toggle") {
5721
- return /* @__PURE__ */ jsx56(
5805
+ return /* @__PURE__ */ jsx55(
5722
5806
  AccordionMenu,
5723
5807
  {
5724
5808
  type: "single",
@@ -5732,16 +5816,16 @@ function SidebarContentMenu({
5732
5816
  subTrigger: "text-xs font-normal text-muted-foreground hover:bg-transparent",
5733
5817
  subContent: "ps-0"
5734
5818
  },
5735
- children: menu.map((item, index) => /* @__PURE__ */ jsxs47(AccordionMenuSub, { value: item.title || "menu", children: [
5736
- /* @__PURE__ */ jsxs47(AccordionMenuSubTrigger, { value: "menu-trigger", children: [
5737
- /* @__PURE__ */ jsx56("span", { children: item.title }),
5738
- /* @__PURE__ */ jsx56(AccordionMenuIndicator, {})
5819
+ children: menu.map((item, index) => /* @__PURE__ */ jsxs46(AccordionMenuSub, { value: item.title || "menu", children: [
5820
+ /* @__PURE__ */ jsxs46(AccordionMenuSubTrigger, { value: "menu-trigger", children: [
5821
+ /* @__PURE__ */ jsx55("span", { children: item.title }),
5822
+ /* @__PURE__ */ jsx55(AccordionMenuIndicator, {})
5739
5823
  ] }),
5740
- /* @__PURE__ */ jsx56(AccordionMenuSubContent, { type: "single", collapsible: true, parentValue: "menu-trigger", children: item.children?.map((child, idx) => {
5741
- const content = /* @__PURE__ */ jsxs47(Fragment19, { children: [
5742
- child.icon && /* @__PURE__ */ jsx56(child.icon, {}),
5743
- /* @__PURE__ */ jsx56("span", { children: child.title }),
5744
- child.badge && /* @__PURE__ */ jsx56(
5824
+ /* @__PURE__ */ jsx55(AccordionMenuSubContent, { type: "single", collapsible: true, parentValue: "menu-trigger", children: item.children?.map((child, idx) => {
5825
+ const content = /* @__PURE__ */ jsxs46(Fragment19, { children: [
5826
+ child.icon && /* @__PURE__ */ jsx55(child.icon, {}),
5827
+ /* @__PURE__ */ jsx55("span", { children: child.title }),
5828
+ child.badge && /* @__PURE__ */ jsx55(
5745
5829
  Badge3,
5746
5830
  {
5747
5831
  size: "sm",
@@ -5752,8 +5836,8 @@ function SidebarContentMenu({
5752
5836
  )
5753
5837
  ] });
5754
5838
  if (child.external && child.path) {
5755
- return /* @__PURE__ */ jsx56(
5756
- Link8,
5839
+ return /* @__PURE__ */ jsx55(
5840
+ Link7,
5757
5841
  {
5758
5842
  href: child.path,
5759
5843
  target: "_blank",
@@ -5764,13 +5848,13 @@ function SidebarContentMenu({
5764
5848
  child.path || `ext-${idx}`
5765
5849
  );
5766
5850
  }
5767
- return /* @__PURE__ */ jsx56(AccordionMenuItem, { value: child.path || "#", children: /* @__PURE__ */ jsx56(Link8, { href: child.path || "#", children: content }) }, idx);
5851
+ return /* @__PURE__ */ jsx55(AccordionMenuItem, { value: child.path || "#", children: /* @__PURE__ */ jsx55(Link7, { href: child.path || "#", children: content }) }, idx);
5768
5852
  }) })
5769
5853
  ] }, index))
5770
5854
  }
5771
5855
  );
5772
5856
  }
5773
- return /* @__PURE__ */ jsx56(
5857
+ return /* @__PURE__ */ jsx55(
5774
5858
  AccordionMenu,
5775
5859
  {
5776
5860
  type: "multiple",
@@ -5783,13 +5867,13 @@ function SidebarContentMenu({
5783
5867
  group: ""
5784
5868
  },
5785
5869
  children: menu.map((item, index) => {
5786
- return /* @__PURE__ */ jsxs47(AccordionMenuGroup, { children: [
5787
- /* @__PURE__ */ jsx56(AccordionMenuLabel, { children: item.title }),
5870
+ return /* @__PURE__ */ jsxs46(AccordionMenuGroup, { children: [
5871
+ /* @__PURE__ */ jsx55(AccordionMenuLabel, { children: item.title }),
5788
5872
  item.children?.map((child, idx) => {
5789
- const content = /* @__PURE__ */ jsxs47(Fragment19, { children: [
5790
- child.icon && /* @__PURE__ */ jsx56(child.icon, {}),
5791
- /* @__PURE__ */ jsx56("span", { children: child.title }),
5792
- child.badge && /* @__PURE__ */ jsx56(
5873
+ const content = /* @__PURE__ */ jsxs46(Fragment19, { children: [
5874
+ child.icon && /* @__PURE__ */ jsx55(child.icon, {}),
5875
+ /* @__PURE__ */ jsx55("span", { children: child.title }),
5876
+ child.badge && /* @__PURE__ */ jsx55(
5793
5877
  Badge3,
5794
5878
  {
5795
5879
  size: "sm",
@@ -5800,8 +5884,8 @@ function SidebarContentMenu({
5800
5884
  )
5801
5885
  ] });
5802
5886
  if (child.external && child.path) {
5803
- return /* @__PURE__ */ jsx56(
5804
- Link8,
5887
+ return /* @__PURE__ */ jsx55(
5888
+ Link7,
5805
5889
  {
5806
5890
  href: child.path,
5807
5891
  target: "_blank",
@@ -5812,7 +5896,7 @@ function SidebarContentMenu({
5812
5896
  child.path || `ext-${idx}`
5813
5897
  );
5814
5898
  }
5815
- return /* @__PURE__ */ jsx56(AccordionMenuItem, { value: child.path || "#", children: /* @__PURE__ */ jsx56(Link8, { href: child.path || "#", children: content }) }, idx);
5899
+ return /* @__PURE__ */ jsx55(AccordionMenuItem, { value: child.path || "#", children: /* @__PURE__ */ jsx55(Link7, { href: child.path || "#", children: content }) }, idx);
5816
5900
  })
5817
5901
  ] }, index);
5818
5902
  })
@@ -5821,16 +5905,17 @@ function SidebarContentMenu({
5821
5905
  }
5822
5906
 
5823
5907
  // src/ui/layouts/site-footer.tsx
5824
- import Link9 from "next/link";
5825
- import { useTranslations as useTranslations47 } from "next-intl";
5826
- import { SiteFooter as UISiteFooter } from "@pelatform/ui/components";
5827
- import { Button as Button33 } from "@pelatform/ui/default";
5828
- import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
5829
- function SiteFooter() {
5908
+ import Link8 from "next/link";
5909
+ import { useTranslations as useTranslations46 } from "next-intl";
5910
+ import { cn as cn41 } from "pelatform-ui";
5911
+ import { SiteFooter as UISiteFooter } from "pelatform-ui/components";
5912
+ import { Button as Button32 } from "pelatform-ui/default";
5913
+ import { jsx as jsx56, jsxs as jsxs47 } from "react/jsx-runtime";
5914
+ function SiteFooter({ disableProjectBy = false }) {
5830
5915
  const { app } = useConfig();
5831
- const t = useTranslations47();
5832
- return /* @__PURE__ */ jsxs48(UISiteFooter, { className: "*:gap-2! *:py-0!", children: [
5833
- /* @__PURE__ */ jsxs48("div", { className: "text-balance text-center text-muted-foreground text-sm leading-loose md:text-left", children: [
5916
+ const t = useTranslations46();
5917
+ return /* @__PURE__ */ jsxs47(UISiteFooter, { className: cn41("*:gap-2! *:py-0!", disableProjectBy ? "*:justify-center!" : ""), children: [
5918
+ /* @__PURE__ */ jsxs47("div", { className: "text-balance text-center text-muted-foreground text-sm leading-loose md:text-left", children: [
5834
5919
  "\xA9 ",
5835
5920
  (/* @__PURE__ */ new Date()).getFullYear(),
5836
5921
  " ",
@@ -5838,11 +5923,11 @@ function SiteFooter() {
5838
5923
  ". ",
5839
5924
  t("customs.common.copyright")
5840
5925
  ] }),
5841
- /* @__PURE__ */ jsx57("div", { className: "flex items-center gap-2.5 text-balance text-sm leading-loose", children: /* @__PURE__ */ jsxs48("div", { className: "inline-flex items-center gap-1", children: [
5842
- /* @__PURE__ */ jsx57("span", { className: "text-muted-foreground", children: t("customs.common.project_by") }),
5926
+ !disableProjectBy && /* @__PURE__ */ jsx56("div", { className: "flex items-center gap-2.5 text-balance text-sm leading-loose", children: /* @__PURE__ */ jsxs47("div", { className: "inline-flex items-center gap-1", children: [
5927
+ /* @__PURE__ */ jsx56("span", { className: "text-muted-foreground", children: t("customs.common.project_by") }),
5843
5928
  " ",
5844
- /* @__PURE__ */ jsx57(Button33, { mode: "link", underline: "dashed", children: /* @__PURE__ */ jsx57(
5845
- Link9,
5929
+ /* @__PURE__ */ jsx56(Button32, { mode: "link", underline: "dashed", children: /* @__PURE__ */ jsx56(
5930
+ Link8,
5846
5931
  {
5847
5932
  href: "https://pelatform.com",
5848
5933
  target: "_blank",
@@ -5856,45 +5941,45 @@ function SiteFooter() {
5856
5941
 
5857
5942
  // src/ui/layouts/site-header.tsx
5858
5943
  import { useState as useState19 } from "react";
5859
- import Link10 from "next/link";
5944
+ import Link9 from "next/link";
5860
5945
  import { usePathname as usePathname4, useRouter as useRouter16 } from "next/navigation";
5861
- import { useTranslations as useTranslations48 } from "next-intl";
5946
+ import { useTranslations as useTranslations47 } from "next-intl";
5862
5947
  import {
5863
5948
  MainNav,
5864
5949
  MobileNav,
5865
5950
  MobileNavItemRenderer,
5866
5951
  ModeSwitcher as ModeSwitcher3,
5867
5952
  SiteHeader as UISiteHeader
5868
- } from "@pelatform/ui/components";
5869
- import { Button as Button34, Separator as Separator2 } from "@pelatform/ui/default";
5870
- import { jsx as jsx58, jsxs as jsxs49 } from "react/jsx-runtime";
5953
+ } from "pelatform-ui/components";
5954
+ import { Button as Button33, Separator as Separator2 } from "pelatform-ui/default";
5955
+ import { jsx as jsx57, jsxs as jsxs48 } from "react/jsx-runtime";
5871
5956
  function SiteHeader({
5872
5957
  menu,
5873
- logo = /* @__PURE__ */ jsx58(LogoWithHref, { href: "/home" })
5958
+ logo = /* @__PURE__ */ jsx57(LogoWithHref, { href: "/home" })
5874
5959
  }) {
5875
5960
  const { path } = useConfig();
5876
5961
  const pathname = usePathname4();
5877
5962
  const router = useRouter16();
5878
- const t = useTranslations48();
5963
+ const t = useTranslations47();
5879
5964
  const { isPending, session, user } = useSession();
5880
5965
  const [, setMobileNavOpen] = useState19(false);
5881
5966
  const isAuthenticated = !isPending && session && user;
5882
- return /* @__PURE__ */ jsxs49(UISiteHeader, { className: "backdrop-blur-none supports-backdrop-filter:bg-background", children: [
5883
- /* @__PURE__ */ jsxs49("div", { className: "flex items-center gap-4.5", children: [
5967
+ return /* @__PURE__ */ jsxs48(UISiteHeader, { className: "backdrop-blur-none supports-backdrop-filter:bg-background", children: [
5968
+ /* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-4.5", children: [
5884
5969
  logo,
5885
- /* @__PURE__ */ jsx58(MainNav, { Link: Link10, pathname, items: menu })
5970
+ /* @__PURE__ */ jsx57(MainNav, { Link: Link9, pathname, items: menu })
5886
5971
  ] }),
5887
- /* @__PURE__ */ jsx58("div", { className: "flex items-center justify-end gap-3", children: /* @__PURE__ */ jsxs49("nav", { className: "flex items-center gap-0 md:gap-1", children: [
5888
- /* @__PURE__ */ jsx58(ModeSwitcher3, {}),
5889
- /* @__PURE__ */ jsx58(LanguageSwitcher, {}),
5890
- /* @__PURE__ */ jsx58(Separator2, { orientation: "vertical", className: "mx-3 h-5 max-lg:hidden" }),
5891
- /* @__PURE__ */ jsx58(MobileNav, { children: /* @__PURE__ */ jsxs49("div", { className: "flex flex-col space-y-3", children: [
5972
+ /* @__PURE__ */ jsx57("div", { className: "flex items-center justify-end gap-3", children: /* @__PURE__ */ jsxs48("nav", { className: "flex items-center gap-0 md:gap-1", children: [
5973
+ /* @__PURE__ */ jsx57(ModeSwitcher3, {}),
5974
+ /* @__PURE__ */ jsx57(LanguageSwitcher, {}),
5975
+ /* @__PURE__ */ jsx57(Separator2, { orientation: "vertical", className: "mx-3 h-5 max-lg:hidden" }),
5976
+ /* @__PURE__ */ jsx57(MobileNav, { children: /* @__PURE__ */ jsxs48("div", { className: "flex flex-col space-y-3", children: [
5892
5977
  menu?.map(
5893
- (item, navIndex) => item.href || item.children ? /* @__PURE__ */ jsx58(
5978
+ (item, navIndex) => item.href || item.children ? /* @__PURE__ */ jsx57(
5894
5979
  MobileNavItemRenderer,
5895
5980
  {
5896
5981
  item,
5897
- Link: Link10,
5982
+ Link: Link9,
5898
5983
  pathname,
5899
5984
  level: 1,
5900
5985
  onOpenChange: setMobileNavOpen
@@ -5902,8 +5987,8 @@ function SiteHeader({
5902
5987
  `nav-${navIndex}-${item.href}`
5903
5988
  ) : null
5904
5989
  ),
5905
- /* @__PURE__ */ jsx58("div", { className: "border-t pt-3", children: isAuthenticated ? /* @__PURE__ */ jsx58(
5906
- Button34,
5990
+ /* @__PURE__ */ jsx57("div", { className: "border-t pt-3", children: isAuthenticated ? /* @__PURE__ */ jsx57(
5991
+ Button33,
5907
5992
  {
5908
5993
  variant: "outline",
5909
5994
  size: "sm",
@@ -5911,18 +5996,55 @@ function SiteHeader({
5911
5996
  onClick: () => router.push(path.auth.SIGN_OUT),
5912
5997
  children: t("systems.navigation.logout")
5913
5998
  }
5914
- ) : /* @__PURE__ */ jsx58(Button34, { variant: "secondary", size: "sm", className: "w-full", children: /* @__PURE__ */ jsx58(Link10, { href: path.auth.SIGN_IN, children: t("systems.navigation.login") }) }) })
5999
+ ) : /* @__PURE__ */ jsx57(Button33, { variant: "secondary", size: "sm", className: "w-full", children: /* @__PURE__ */ jsx57(Link9, { href: path.auth.SIGN_IN, children: t("systems.navigation.login") }) }) })
5915
6000
  ] }) }),
5916
- isAuthenticated ? /* @__PURE__ */ jsx58(UserMenu, { hiddenSwitcher: true }) : /* @__PURE__ */ jsx58(Button34, { variant: "secondary", size: "sm", className: "hidden md:flex", children: /* @__PURE__ */ jsx58(Link10, { href: path.auth.SIGN_IN, children: t("systems.navigation.login") }) })
6001
+ isAuthenticated ? /* @__PURE__ */ jsx57(UserMenu, { hiddenSwitcher: true }) : /* @__PURE__ */ jsx57(Button33, { variant: "secondary", size: "sm", className: "hidden md:flex", children: /* @__PURE__ */ jsx57(Link9, { href: path.auth.SIGN_IN, children: t("systems.navigation.login") }) })
6002
+ ] }) })
6003
+ ] });
6004
+ }
6005
+ function SiteHeaderSecondary({
6006
+ menu,
6007
+ logo = /* @__PURE__ */ jsx57(LogoWithHref, { href: "/home" }),
6008
+ loginLink
6009
+ }) {
6010
+ const pathname = usePathname4();
6011
+ const t = useTranslations47();
6012
+ const [, setMobileNavOpen] = useState19(false);
6013
+ return /* @__PURE__ */ jsxs48(UISiteHeader, { className: "backdrop-blur-none supports-backdrop-filter:bg-background", children: [
6014
+ /* @__PURE__ */ jsxs48("div", { className: "flex items-center gap-4.5", children: [
6015
+ logo,
6016
+ /* @__PURE__ */ jsx57(MainNav, { Link: Link9, pathname, items: menu })
6017
+ ] }),
6018
+ /* @__PURE__ */ jsx57("div", { className: "flex items-center justify-end gap-3", children: /* @__PURE__ */ jsxs48("nav", { className: "flex items-center gap-0 md:gap-1", children: [
6019
+ /* @__PURE__ */ jsx57(ModeSwitcher3, {}),
6020
+ /* @__PURE__ */ jsx57(LanguageSwitcher, {}),
6021
+ /* @__PURE__ */ jsx57(Separator2, { orientation: "vertical", className: "mx-3 h-5 max-lg:hidden" }),
6022
+ /* @__PURE__ */ jsx57(MobileNav, { children: /* @__PURE__ */ jsxs48("div", { className: "flex flex-col space-y-3", children: [
6023
+ menu?.map(
6024
+ (item, navIndex) => item.href || item.children ? /* @__PURE__ */ jsx57(
6025
+ MobileNavItemRenderer,
6026
+ {
6027
+ item,
6028
+ Link: Link9,
6029
+ pathname,
6030
+ level: 1,
6031
+ onOpenChange: setMobileNavOpen
6032
+ },
6033
+ `nav-${navIndex}-${item.href}`
6034
+ ) : null
6035
+ ),
6036
+ loginLink && /* @__PURE__ */ jsx57("div", { className: "border-t pt-3", children: /* @__PURE__ */ jsx57(Button33, { variant: "secondary", size: "sm", className: "w-full", children: /* @__PURE__ */ jsx57(Link9, { href: loginLink, children: t("systems.navigation.login") }) }) })
6037
+ ] }) }),
6038
+ loginLink && /* @__PURE__ */ jsx57(Button33, { variant: "secondary", size: "sm", className: "hidden md:flex", children: /* @__PURE__ */ jsx57(Link9, { href: loginLink, children: t("systems.navigation.login") }) })
5917
6039
  ] }) })
5918
6040
  ] });
5919
6041
  }
5920
6042
 
5921
6043
  // src/ui/providers/layout.tsx
5922
6044
  import { useEffect as useEffect16, useState as useState20 } from "react";
5923
- import { useIsMobile } from "@pelatform/ui/hooks";
5924
- import { cn as cn41 } from "@pelatform/utils";
5925
- import { jsx as jsx59 } from "react/jsx-runtime";
6045
+ import { cn as cn42 } from "pelatform-ui";
6046
+ import { useIsMobile } from "pelatform-ui/hooks";
6047
+ import { jsx as jsx58 } from "react/jsx-runtime";
5926
6048
  var SIDEBAR_WIDTH = "240px";
5927
6049
  var HEADER_HEIGHT = "54px";
5928
6050
  var SIDEBAR_WIDTH_MOBILE = "240px";
@@ -5932,7 +6054,7 @@ function LayoutProvider({
5932
6054
  style: customStyle,
5933
6055
  bodyClassName = "",
5934
6056
  className = "",
5935
- logoHeader = /* @__PURE__ */ jsx59(LogoWithHref, {})
6057
+ logoHeader = /* @__PURE__ */ jsx58(LogoWithHref, {})
5936
6058
  }) {
5937
6059
  const isMobile = useIsMobile();
5938
6060
  const [isSidebarOpen, setIsSidebarOpen] = useState20(true);
@@ -5957,7 +6079,7 @@ function LayoutProvider({
5957
6079
  };
5958
6080
  }
5959
6081
  }, [bodyClassName]);
5960
- return /* @__PURE__ */ jsx59(
6082
+ return /* @__PURE__ */ jsx58(
5961
6083
  LayoutContext.Provider,
5962
6084
  {
5963
6085
  value: {
@@ -5968,11 +6090,11 @@ function LayoutProvider({
5968
6090
  sidebarToggle,
5969
6091
  logoHeader
5970
6092
  },
5971
- children: /* @__PURE__ */ jsx59(
6093
+ children: /* @__PURE__ */ jsx58(
5972
6094
  "div",
5973
6095
  {
5974
6096
  "data-slot": "layout-wrapper",
5975
- className: cn41("flex grow", className),
6097
+ className: cn42("flex grow", className),
5976
6098
  "data-sidebar-open": isSidebarOpen,
5977
6099
  style,
5978
6100
  children
@@ -5983,25 +6105,225 @@ function LayoutProvider({
5983
6105
  }
5984
6106
 
5985
6107
  // src/ui/layouts/wrapper.tsx
5986
- import { Fragment as Fragment20, jsx as jsx60, jsxs as jsxs50 } from "react/jsx-runtime";
6108
+ import { Fragment as Fragment20, jsx as jsx59, jsxs as jsxs49 } from "react/jsx-runtime";
5987
6109
  function LayoutWrapper({
5988
6110
  children,
5989
6111
  sidebarHeader,
5990
6112
  sidebarMenu,
5991
6113
  logoHeader
5992
6114
  }) {
5993
- const sidebarContent = /* @__PURE__ */ jsxs50(Fragment20, { children: [
6115
+ const sidebarContent = /* @__PURE__ */ jsxs49(Fragment20, { children: [
5994
6116
  sidebarHeader,
5995
- /* @__PURE__ */ jsx60(SidebarContent, { children: sidebarMenu })
6117
+ /* @__PURE__ */ jsx59(SidebarContent, { children: sidebarMenu })
5996
6118
  ] });
5997
- return /* @__PURE__ */ jsxs50(LayoutProvider, { logoHeader, children: [
5998
- /* @__PURE__ */ jsxs50(Header, { children: [
5999
- /* @__PURE__ */ jsx60(HeaderLeft, {}),
6000
- /* @__PURE__ */ jsx60(HeaderRight, { sidebar: /* @__PURE__ */ jsx60(HeaderSidebarMobile, { children: sidebarContent }) })
6119
+ return /* @__PURE__ */ jsxs49(LayoutProvider, { logoHeader, children: [
6120
+ /* @__PURE__ */ jsxs49(Header, { children: [
6121
+ /* @__PURE__ */ jsx59(HeaderLeft, {}),
6122
+ /* @__PURE__ */ jsx59(HeaderRight, { sidebar: /* @__PURE__ */ jsx59(HeaderSidebarMobile, { children: sidebarContent }) })
6001
6123
  ] }),
6002
- /* @__PURE__ */ jsxs50("div", { className: "flex grow pt-(--header-height-mobile) lg:pt-(--header-height)", children: [
6003
- /* @__PURE__ */ jsx60(Sidebar, { children: sidebarContent }),
6004
- /* @__PURE__ */ jsx60("main", { className: "grow transition-all duration-300 lg:in-data-[sidebar-open=false]:ps-0 lg:ps-(--sidebar-width)", children })
6124
+ /* @__PURE__ */ jsxs49("div", { className: "flex grow pt-(--header-height-mobile) lg:pt-(--header-height)", children: [
6125
+ /* @__PURE__ */ jsx59(Sidebar, { children: sidebarContent }),
6126
+ /* @__PURE__ */ jsx59("main", { className: "grow transition-all duration-300 lg:in-data-[sidebar-open=false]:ps-0 lg:ps-(--sidebar-width)", children })
6127
+ ] })
6128
+ ] });
6129
+ }
6130
+
6131
+ // src/ui/pages/accept-invitation.tsx
6132
+ import { useEffect as useEffect17, useState as useState21 } from "react";
6133
+ import { useRouter as useRouter17, useSearchParams as useSearchParams6 } from "next/navigation";
6134
+ import { CheckIcon as CheckIcon4, XIcon } from "lucide-react";
6135
+ import { useTranslations as useTranslations48 } from "next-intl";
6136
+ import { cn as cn43 } from "pelatform-ui";
6137
+ import { AlertToast as AlertToast24 } from "pelatform-ui/components";
6138
+ import { Button as Button34, Card as Card11, CardContent as CardContent3, CardHeader as CardHeader2, Skeleton as Skeleton10, Spinner as Spinner20 } from "pelatform-ui/default";
6139
+ import { jsx as jsx60, jsxs as jsxs50 } from "react/jsx-runtime";
6140
+ function AcceptInvitation({
6141
+ className,
6142
+ classNames,
6143
+ redirectTo: redirectToProp
6144
+ }) {
6145
+ const router = useRouter17();
6146
+ const searchParams = useSearchParams6();
6147
+ const t = useTranslations48();
6148
+ const { data: sessionData } = useSession();
6149
+ const { redirectTo } = useOnSuccessTransition(redirectToProp);
6150
+ const [invitationId, setInvitationId] = useState21(null);
6151
+ useEffect17(() => {
6152
+ const invitationIdParam = searchParams.get("invitationId");
6153
+ if (!invitationIdParam) {
6154
+ AlertToast24({
6155
+ message: t("systems.INVITATION_NOT_FOUND"),
6156
+ icon: "destructive"
6157
+ });
6158
+ router.replace(redirectTo);
6159
+ return;
6160
+ }
6161
+ setInvitationId(invitationIdParam);
6162
+ }, [router, redirectTo, searchParams.get, t]);
6163
+ if (!sessionData || !invitationId) {
6164
+ return /* @__PURE__ */ jsx60(AcceptInvitationSkeleton, { className, classNames });
6165
+ }
6166
+ return /* @__PURE__ */ jsx60(
6167
+ AcceptInvitationContent,
6168
+ {
6169
+ className,
6170
+ classNames,
6171
+ invitationId,
6172
+ redirectTo
6173
+ }
6174
+ );
6175
+ }
6176
+ function AcceptInvitationContent({
6177
+ className,
6178
+ classNames,
6179
+ invitationId,
6180
+ redirectTo
6181
+ }) {
6182
+ const { authClient } = useConfig();
6183
+ const router = useRouter17();
6184
+ const t = useTranslations48();
6185
+ const { data: invitation, isPending } = useInvitation({
6186
+ query: {
6187
+ id: invitationId
6188
+ }
6189
+ });
6190
+ const [isRejecting, setIsRejecting] = useState21(false);
6191
+ const [isAccepting, setIsAccepting] = useState21(false);
6192
+ const isProcessing = isRejecting || isAccepting;
6193
+ useEffect17(() => {
6194
+ if (isPending || !invitationId) return;
6195
+ if (!invitation) {
6196
+ AlertToast24({
6197
+ message: t("systems.INVITATION_NOT_FOUND"),
6198
+ icon: "destructive"
6199
+ });
6200
+ router.replace(redirectTo);
6201
+ return;
6202
+ }
6203
+ if (invitation.status !== "pending" || new Date(invitation.expiresAt) < /* @__PURE__ */ new Date()) {
6204
+ AlertToast24({
6205
+ message: new Date(invitation.expiresAt) < /* @__PURE__ */ new Date() ? t("systems.INVITATION_EXPIRED") : t("systems.INVITATION_NOT_FOUND"),
6206
+ icon: "destructive"
6207
+ });
6208
+ router.replace(redirectTo);
6209
+ }
6210
+ }, [invitation, isPending, invitationId, router, redirectTo, t]);
6211
+ const acceptInvitation = async () => {
6212
+ setIsAccepting(true);
6213
+ try {
6214
+ await authClient.organization.acceptInvitation({
6215
+ invitationId,
6216
+ fetchOptions: { throw: true }
6217
+ });
6218
+ AlertToast24({
6219
+ message: t("systems.INVITATION_ACCEPTED")
6220
+ });
6221
+ router.replace(redirectTo);
6222
+ } catch (error) {
6223
+ AlertToast24({
6224
+ message: getTranslations({ error, t }),
6225
+ icon: "destructive"
6226
+ });
6227
+ setIsAccepting(false);
6228
+ }
6229
+ };
6230
+ const rejectInvitation = async () => {
6231
+ setIsRejecting(true);
6232
+ try {
6233
+ await authClient.organization.rejectInvitation({
6234
+ invitationId,
6235
+ fetchOptions: { throw: true }
6236
+ });
6237
+ AlertToast24({
6238
+ message: t("systems.INVITATION_REJECTED")
6239
+ });
6240
+ router.replace(redirectTo);
6241
+ } catch (error) {
6242
+ AlertToast24({
6243
+ message: getTranslations({ error, t }),
6244
+ icon: "destructive"
6245
+ });
6246
+ setIsRejecting(false);
6247
+ }
6248
+ };
6249
+ if (!invitation) {
6250
+ return /* @__PURE__ */ jsx60(AcceptInvitationSkeleton, { className, classNames });
6251
+ }
6252
+ return /* @__PURE__ */ jsxs50(Card11, { className: cn43("w-full max-w-md overflow-hidden", className, classNames?.base), children: [
6253
+ /* @__PURE__ */ jsx60(CardHeader2, { className: "py-4", children: /* @__PURE__ */ jsx60(
6254
+ CardHeaderComponent,
6255
+ {
6256
+ title: t("systems.ACCEPT_INVITATION"),
6257
+ description: t("systems.ACCEPT_INVITATION_DESCRIPTION")
6258
+ }
6259
+ ) }),
6260
+ /* @__PURE__ */ jsxs50(CardContent3, { className: cn43("flex flex-col gap-6 truncate", classNames?.content), children: [
6261
+ /* @__PURE__ */ jsxs50(Card11, { className: cn43("flex-row items-center p-4"), children: [
6262
+ /* @__PURE__ */ jsx60(
6263
+ WorkspaceView,
6264
+ {
6265
+ workspace: {
6266
+ id: invitation.organizationId,
6267
+ name: invitation.organizationName,
6268
+ slug: invitation.organizationSlug,
6269
+ // logo: invitation.organizationLogo,
6270
+ createdAt: /* @__PURE__ */ new Date()
6271
+ }
6272
+ }
6273
+ ),
6274
+ /* @__PURE__ */ jsx60("p", { className: "ms-auto font-semibold text-muted-foreground text-sm", children: t(`systems.${invitation?.role.toUpperCase()}`) || invitation?.role })
6275
+ ] }),
6276
+ /* @__PURE__ */ jsxs50("div", { className: "grid grid-cols-2 gap-3", children: [
6277
+ /* @__PURE__ */ jsxs50(
6278
+ Button34,
6279
+ {
6280
+ variant: "destructive",
6281
+ className: cn43(classNames?.button, classNames?.destructiveButton),
6282
+ onClick: rejectInvitation,
6283
+ disabled: isProcessing,
6284
+ children: [
6285
+ isRejecting ? /* @__PURE__ */ jsx60(Spinner20, {}) : /* @__PURE__ */ jsx60(XIcon, {}),
6286
+ t("systems.REJECT")
6287
+ ]
6288
+ }
6289
+ ),
6290
+ /* @__PURE__ */ jsxs50(
6291
+ Button34,
6292
+ {
6293
+ className: cn43(classNames?.button, classNames?.primaryButton),
6294
+ onClick: acceptInvitation,
6295
+ disabled: isProcessing,
6296
+ children: [
6297
+ isAccepting ? /* @__PURE__ */ jsx60(Spinner20, {}) : /* @__PURE__ */ jsx60(CheckIcon4, {}),
6298
+ t("systems.ACCEPT")
6299
+ ]
6300
+ }
6301
+ )
6302
+ ] })
6303
+ ] })
6304
+ ] });
6305
+ }
6306
+ function AcceptInvitationSkeleton({ className, classNames }) {
6307
+ const t = useTranslations48();
6308
+ return /* @__PURE__ */ jsxs50(Card11, { className: cn43("w-full max-w-md overflow-hidden", className, classNames?.base), children: [
6309
+ /* @__PURE__ */ jsx60(CardHeader2, { className: "py-4", children: /* @__PURE__ */ jsx60(
6310
+ CardHeaderComponent,
6311
+ {
6312
+ className: "w-full",
6313
+ title: t("systems.ACCEPT_INVITATION"),
6314
+ description: t("systems.ACCEPT_INVITATION_DESCRIPTION"),
6315
+ isPending: true
6316
+ }
6317
+ ) }),
6318
+ /* @__PURE__ */ jsxs50(CardContent3, { className: cn43("flex flex-col gap-6 truncate", classNames?.content), children: [
6319
+ /* @__PURE__ */ jsxs50(Card11, { className: cn43("flex-row items-center p-4"), children: [
6320
+ /* @__PURE__ */ jsx60(WorkspaceView, { isPending: true }),
6321
+ /* @__PURE__ */ jsx60(Skeleton10, { className: "ms-auto mt-0.5 h-4 w-full max-w-14 shrink-2" })
6322
+ ] }),
6323
+ /* @__PURE__ */ jsxs50("div", { className: "grid grid-cols-2 gap-3", children: [
6324
+ /* @__PURE__ */ jsx60(Skeleton10, { className: "h-9 w-full" }),
6325
+ /* @__PURE__ */ jsx60(Skeleton10, { className: "h-9 w-full" })
6326
+ ] })
6005
6327
  ] })
6006
6328
  ] });
6007
6329
  }
@@ -6010,29 +6332,30 @@ function LayoutWrapper({
6010
6332
  import { Suspense as Suspense2 } from "react";
6011
6333
  import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
6012
6334
  import { NextIntlClientProvider } from "next-intl";
6013
- import { QueryProvider, ThemeProvider } from "@pelatform/ui/components";
6014
- import { Toaster as Sooner } from "@pelatform/ui/default";
6335
+ import { QueryProvider, ThemeProvider } from "pelatform-ui/components";
6336
+ import { Toaster as Sonner } from "pelatform-ui/default";
6015
6337
  import { jsx as jsx61, jsxs as jsxs51 } from "react/jsx-runtime";
6016
6338
  function SharedProviders({
6017
6339
  children,
6018
6340
  locale,
6019
6341
  messages,
6020
- timeZone = "Asia/Jakarta"
6342
+ timeZone = "Asia/Jakarta",
6343
+ sonnerPosition = "top-center"
6021
6344
  }) {
6022
6345
  const config = useConfig();
6023
6346
  return /* @__PURE__ */ jsxs51(QueryProvider, { children: [
6024
6347
  /* @__PURE__ */ jsx61(ThemeProvider, { defaultTheme: config.ui.defaultTheme, children: /* @__PURE__ */ jsx61(NextIntlClientProvider, { locale, messages, timeZone, children: /* @__PURE__ */ jsxs51(Suspense2, { children: [
6025
6348
  children,
6026
- /* @__PURE__ */ jsx61(Sooner, { position: "top-center" })
6349
+ /* @__PURE__ */ jsx61(Sonner, { position: sonnerPosition })
6027
6350
  ] }) }) }),
6028
6351
  /* @__PURE__ */ jsx61(ReactQueryDevtools, { initialIsOpen: false })
6029
6352
  ] });
6030
6353
  }
6031
6354
 
6032
6355
  // src/ui/shared/empty-state.tsx
6033
- import Link11 from "next/link";
6356
+ import Link10 from "next/link";
6034
6357
  import { useTranslations as useTranslations49 } from "next-intl";
6035
- import { cn as cn42 } from "@pelatform/utils";
6358
+ import { cn as cn44 } from "pelatform-ui";
6036
6359
  import { jsx as jsx62, jsxs as jsxs52 } from "react/jsx-runtime";
6037
6360
  function EmptyState({
6038
6361
  className,
@@ -6044,14 +6367,14 @@ function EmptyState({
6044
6367
  children
6045
6368
  }) {
6046
6369
  const t = useTranslations49();
6047
- return /* @__PURE__ */ jsxs52("div", { className: cn42("flex flex-col items-center justify-center gap-y-4", className), children: [
6370
+ return /* @__PURE__ */ jsxs52("div", { className: cn44("flex flex-col items-center justify-center gap-y-4", className), children: [
6048
6371
  Icon && /* @__PURE__ */ jsx62("div", { className: "flex size-14 items-center justify-center rounded-2xl border bg-muted", children: /* @__PURE__ */ jsx62(Icon, { className: "size-6 text-foreground" }) }),
6049
6372
  /* @__PURE__ */ jsx62("p", { className: "text-center font-medium text-base text-foreground", children: title }),
6050
6373
  description && /* @__PURE__ */ jsxs52("p", { className: "max-w-sm text-balance text-center text-muted-foreground text-sm", children: [
6051
6374
  description,
6052
6375
  " ",
6053
6376
  learnMore && /* @__PURE__ */ jsxs52(
6054
- Link11,
6377
+ Link10,
6055
6378
  {
6056
6379
  href: learnMore,
6057
6380
  className: "text-foreground underline underline-offset-2 transition-colors hover:text-primary",
@@ -6065,12 +6388,30 @@ function EmptyState({
6065
6388
  children
6066
6389
  ] });
6067
6390
  }
6391
+
6392
+ // src/ui/shared/signed-in-hint.tsx
6393
+ import Link11 from "next/link";
6394
+ import { useTranslations as useTranslations50 } from "next-intl";
6395
+ import { Button as Button35 } from "pelatform-ui/default";
6396
+ import { jsx as jsx63, jsxs as jsxs53 } from "react/jsx-runtime";
6397
+ function SignedInHint({ linkHref = "/signin" }) {
6398
+ const t = useTranslations50("customs.common.signed");
6399
+ const { isPending, user } = useSession();
6400
+ return /* @__PURE__ */ jsxs53("div", { className: "fixed start-0 bottom-0 z-40 m-5 flex flex-col gap-2", children: [
6401
+ /* @__PURE__ */ jsxs53("div", { className: "flex items-center gap-1 text-muted-foreground text-xs", children: [
6402
+ t("text"),
6403
+ " ",
6404
+ isPending || !user ? /* @__PURE__ */ jsx63("span", { className: "h-3 w-32 animate-pulse rounded-md border bg-muted-foreground" }) : /* @__PURE__ */ jsx63("b", { className: "text-foreground", children: user.email })
6405
+ ] }),
6406
+ /* @__PURE__ */ jsx63(Button35, { variant: "mono", className: "h-8 w-fit rounded-lg px-3 text-xs shadow-sm", children: /* @__PURE__ */ jsx63(Link11, { href: linkHref, children: t("button") }) })
6407
+ ] });
6408
+ }
6068
6409
  export {
6410
+ AcceptInvitation,
6069
6411
  ApiKeyDeleteDialog,
6070
6412
  ApiKeyDisplayDialog,
6071
6413
  ApiKeyView,
6072
6414
  ApiKeysCard,
6073
- AppleIcon,
6074
6415
  AuthCallback,
6075
6416
  AuthForm,
6076
6417
  AuthLayout,
@@ -6087,13 +6428,10 @@ export {
6087
6428
  DeleteAccountDialog,
6088
6429
  DialogComponent,
6089
6430
  DialogFooterComponent,
6090
- DiscordIcon,
6091
6431
  DisplayIdCard,
6092
- DropboxIcon,
6093
6432
  EmailOTPButton,
6094
6433
  EmailOTPForm,
6095
6434
  EmptyState,
6096
- FacebookIcon,
6097
6435
  ForgotPasswordForm,
6098
6436
  FormAvatarCard,
6099
6437
  FormEmailCard,
@@ -6101,28 +6439,19 @@ export {
6101
6439
  FormNameCard,
6102
6440
  FormPasswordCard,
6103
6441
  FormUsernameCard,
6104
- GitHubIcon,
6105
- GitLabIcon,
6106
- GoogleIcon,
6107
6442
  Header,
6108
6443
  HeaderLeft,
6109
6444
  HeaderRight,
6110
6445
  HeaderSidebarMobile,
6111
- HuggingFaceIcon,
6112
- KickIcon,
6113
6446
  LanguageSwitcher,
6114
6447
  LastUsedButton,
6115
6448
  LayoutContext,
6116
6449
  LayoutLoader,
6117
6450
  LayoutProvider,
6118
6451
  LayoutWrapper,
6119
- LinearIcon,
6120
- LinkedInIcon,
6121
6452
  MagicLinkButton,
6122
6453
  MagicLinkForm,
6123
- MicrosoftIcon,
6124
6454
  MultiAccountCard,
6125
- NotionIcon,
6126
6455
  OTPInputGroup,
6127
6456
  OneTap,
6128
6457
  PasskeyButton,
@@ -6132,9 +6461,7 @@ export {
6132
6461
  ProvidersCard,
6133
6462
  QueryContext,
6134
6463
  RecoverAccountForm,
6135
- RedditIcon,
6136
6464
  ResetPasswordForm,
6137
- RobloxIcon,
6138
6465
  SecurityCards,
6139
6466
  SessionFreshnessDialog,
6140
6467
  SessionsCard,
@@ -6150,22 +6477,18 @@ export {
6150
6477
  SignedInHint,
6151
6478
  SiteFooter,
6152
6479
  SiteHeader,
6480
+ SiteHeaderSecondary,
6153
6481
  SkeletonInputComponent,
6154
6482
  SkeletonViewComponent,
6155
- SlackIcon,
6156
- SpotifyIcon,
6157
- TikTokIcon,
6158
6483
  Toolbar,
6159
- TwitchIcon,
6160
6484
  TwoFactorCard,
6161
6485
  TwoFactorForm,
6162
6486
  TwoFactorPasswordDialog,
6163
6487
  UserAvatar,
6164
6488
  UserMenu,
6165
6489
  UserView,
6166
- VKIcon,
6167
- XIcon,
6168
- ZoomIcon,
6490
+ WorkspaceLogo,
6491
+ WorkspaceView,
6169
6492
  getUserName,
6170
6493
  useAccountInfo,
6171
6494
  useAuthMutation,
@@ -6174,6 +6497,7 @@ export {
6174
6497
  useCreateApiKey,
6175
6498
  useDeleteApiKey,
6176
6499
  useDeletePasskey,
6500
+ useInvitation,
6177
6501
  useLayout,
6178
6502
  useListAccounts,
6179
6503
  useListApiKeys,