@authdog/react-elements 0.0.31 → 0.0.32
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/.turbo/turbo-build.log +31 -31
- package/CHANGELOG.md +6 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +20 -0
- package/package.json +1 -1
- package/src/components/core/user-profile.tsx +26 -21
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
|
|
2
|
-
> @authdog/react-elements@0.0.
|
|
2
|
+
> @authdog/react-elements@0.0.32 build /home/runner/work/web-sdk/web-sdk/packages/react-elements
|
|
3
3
|
> pnpm tsup && pnpm build:styles
|
|
4
4
|
|
|
5
5
|
[34mCLI[39m Building entry: src/index.ts, src/lib/utils.ts, src/components/ui/alert.tsx, src/components/ui/avatar.tsx, src/components/ui/badge.tsx, src/components/ui/button.tsx, src/components/ui/card.tsx, src/components/ui/dropdown-menu.tsx, src/components/ui/input.tsx, src/components/ui/label.tsx, src/components/ui/separator.tsx, src/components/ui/sheet.tsx
|
|
@@ -10,32 +10,7 @@
|
|
|
10
10
|
[34mCLI[39m Cleaning output folder
|
|
11
11
|
[34mESM[39m Build start
|
|
12
12
|
[34mCJS[39m Build start
|
|
13
|
-
[
|
|
14
|
-
[32mESM[39m [1mdist/lib/utils.mjs [22m[32m166.00 B[39m
|
|
15
|
-
[32mESM[39m [1mdist/components/ui/alert.mjs [22m[32m1.19 KB[39m
|
|
16
|
-
[32mESM[39m [1mdist/components/ui/avatar.mjs [22m[32m749.00 B[39m
|
|
17
|
-
[32mESM[39m [1mdist/components/ui/badge.mjs [22m[32m1.34 KB[39m
|
|
18
|
-
[32mESM[39m [1mdist/components/ui/button.mjs [22m[32m1.36 KB[39m
|
|
19
|
-
[32mESM[39m [1mdist/components/ui/card.mjs [22m[32m1.35 KB[39m
|
|
20
|
-
[32mESM[39m [1mdist/components/ui/dropdown-menu.mjs [22m[32m5.37 KB[39m
|
|
21
|
-
[32mESM[39m [1mdist/components/ui/input.mjs [22m[32m949.00 B[39m
|
|
22
|
-
[32mESM[39m [1mdist/components/ui/label.mjs [22m[32m566.00 B[39m
|
|
23
|
-
[32mESM[39m [1mdist/components/ui/separator.mjs [22m[32m604.00 B[39m
|
|
24
|
-
[32mESM[39m [1mdist/components/ui/sheet.mjs [22m[32m2.68 KB[39m
|
|
25
|
-
[32mESM[39m [1mdist/index.mjs.map [22m[32m64.21 KB[39m
|
|
26
|
-
[32mESM[39m [1mdist/lib/utils.mjs.map [22m[32m415.00 B[39m
|
|
27
|
-
[32mESM[39m [1mdist/components/ui/alert.mjs.map [22m[32m2.82 KB[39m
|
|
28
|
-
[32mESM[39m [1mdist/components/ui/avatar.mjs.map [22m[32m2.13 KB[39m
|
|
29
|
-
[32mESM[39m [1mdist/components/ui/badge.mjs.map [22m[32m2.63 KB[39m
|
|
30
|
-
[32mESM[39m [1mdist/components/ui/button.mjs.map [22m[32m3.01 KB[39m
|
|
31
|
-
[32mESM[39m [1mdist/components/ui/card.mjs.map [22m[32m3.54 KB[39m
|
|
32
|
-
[32mESM[39m [1mdist/components/ui/dropdown-menu.mjs.map [22m[32m12.05 KB[39m
|
|
33
|
-
[32mESM[39m [1mdist/components/ui/input.mjs.map [22m[32m1.67 KB[39m
|
|
34
|
-
[32mESM[39m [1mdist/components/ui/label.mjs.map [22m[32m1.32 KB[39m
|
|
35
|
-
[32mESM[39m [1mdist/components/ui/separator.mjs.map [22m[32m1.51 KB[39m
|
|
36
|
-
[32mESM[39m [1mdist/components/ui/sheet.mjs.map [22m[32m6.49 KB[39m
|
|
37
|
-
[32mESM[39m ⚡️ Build success in 210ms
|
|
38
|
-
[32mCJS[39m [1mdist/index.js [22m[32m21.16 KB[39m
|
|
13
|
+
[32mCJS[39m [1mdist/index.js [22m[32m21.86 KB[39m
|
|
39
14
|
[32mCJS[39m [1mdist/lib/utils.js [22m[32m620.00 B[39m
|
|
40
15
|
[32mCJS[39m [1mdist/components/ui/alert.js [22m[32m1.65 KB[39m
|
|
41
16
|
[32mCJS[39m [1mdist/components/ui/avatar.js [22m[32m1.34 KB[39m
|
|
@@ -47,7 +22,7 @@
|
|
|
47
22
|
[32mCJS[39m [1mdist/components/ui/label.js [22m[32m1.14 KB[39m
|
|
48
23
|
[32mCJS[39m [1mdist/components/ui/separator.js [22m[32m1.18 KB[39m
|
|
49
24
|
[32mCJS[39m [1mdist/components/ui/sheet.js [22m[32m3.36 KB[39m
|
|
50
|
-
[32mCJS[39m [1mdist/index.js.map [22m[
|
|
25
|
+
[32mCJS[39m [1mdist/index.js.map [22m[32m64.78 KB[39m
|
|
51
26
|
[32mCJS[39m [1mdist/lib/utils.js.map [22m[32m520.00 B[39m
|
|
52
27
|
[32mCJS[39m [1mdist/components/ui/alert.js.map [22m[32m3.01 KB[39m
|
|
53
28
|
[32mCJS[39m [1mdist/components/ui/avatar.js.map [22m[32m2.31 KB[39m
|
|
@@ -59,12 +34,37 @@
|
|
|
59
34
|
[32mCJS[39m [1mdist/components/ui/label.js.map [22m[32m1.45 KB[39m
|
|
60
35
|
[32mCJS[39m [1mdist/components/ui/separator.js.map [22m[32m1.64 KB[39m
|
|
61
36
|
[32mCJS[39m [1mdist/components/ui/sheet.js.map [22m[32m6.75 KB[39m
|
|
62
|
-
[32mCJS[39m ⚡️ Build success in
|
|
37
|
+
[32mCJS[39m ⚡️ Build success in 162ms
|
|
38
|
+
[32mESM[39m [1mdist/index.mjs [22m[32m20.10 KB[39m
|
|
39
|
+
[32mESM[39m [1mdist/lib/utils.mjs [22m[32m166.00 B[39m
|
|
40
|
+
[32mESM[39m [1mdist/components/ui/alert.mjs [22m[32m1.19 KB[39m
|
|
41
|
+
[32mESM[39m [1mdist/components/ui/avatar.mjs [22m[32m749.00 B[39m
|
|
42
|
+
[32mESM[39m [1mdist/components/ui/badge.mjs [22m[32m1.34 KB[39m
|
|
43
|
+
[32mESM[39m [1mdist/components/ui/button.mjs [22m[32m1.36 KB[39m
|
|
44
|
+
[32mESM[39m [1mdist/components/ui/card.mjs [22m[32m1.35 KB[39m
|
|
45
|
+
[32mESM[39m [1mdist/components/ui/dropdown-menu.mjs [22m[32m5.37 KB[39m
|
|
46
|
+
[32mESM[39m [1mdist/components/ui/input.mjs [22m[32m949.00 B[39m
|
|
47
|
+
[32mESM[39m [1mdist/components/ui/label.mjs [22m[32m566.00 B[39m
|
|
48
|
+
[32mESM[39m [1mdist/components/ui/separator.mjs [22m[32m604.00 B[39m
|
|
49
|
+
[32mESM[39m [1mdist/components/ui/sheet.mjs [22m[32m2.68 KB[39m
|
|
50
|
+
[32mESM[39m [1mdist/index.mjs.map [22m[32m65.05 KB[39m
|
|
51
|
+
[32mESM[39m [1mdist/lib/utils.mjs.map [22m[32m415.00 B[39m
|
|
52
|
+
[32mESM[39m [1mdist/components/ui/alert.mjs.map [22m[32m2.82 KB[39m
|
|
53
|
+
[32mESM[39m [1mdist/components/ui/avatar.mjs.map [22m[32m2.13 KB[39m
|
|
54
|
+
[32mESM[39m [1mdist/components/ui/badge.mjs.map [22m[32m2.63 KB[39m
|
|
55
|
+
[32mESM[39m [1mdist/components/ui/button.mjs.map [22m[32m3.01 KB[39m
|
|
56
|
+
[32mESM[39m [1mdist/components/ui/card.mjs.map [22m[32m3.54 KB[39m
|
|
57
|
+
[32mESM[39m [1mdist/components/ui/dropdown-menu.mjs.map [22m[32m12.05 KB[39m
|
|
58
|
+
[32mESM[39m [1mdist/components/ui/input.mjs.map [22m[32m1.67 KB[39m
|
|
59
|
+
[32mESM[39m [1mdist/components/ui/label.mjs.map [22m[32m1.32 KB[39m
|
|
60
|
+
[32mESM[39m [1mdist/components/ui/separator.mjs.map [22m[32m1.51 KB[39m
|
|
61
|
+
[32mESM[39m [1mdist/components/ui/sheet.mjs.map [22m[32m6.49 KB[39m
|
|
62
|
+
[32mESM[39m ⚡️ Build success in 167ms
|
|
63
63
|
[34mDTS[39m Build start
|
|
64
|
-
[32mDTS[39m ⚡️ Build success in
|
|
64
|
+
[32mDTS[39m ⚡️ Build success in 5775ms
|
|
65
65
|
[32mDTS[39m [1mdist/index.d.mts [22m[32m2.31 KB[39m
|
|
66
66
|
[32mDTS[39m [1mdist/index.d.ts [22m[32m2.31 KB[39m
|
|
67
67
|
|
|
68
|
-
> @authdog/react-elements@0.0.
|
|
68
|
+
> @authdog/react-elements@0.0.32 build:styles /home/runner/work/web-sdk/web-sdk/packages/react-elements
|
|
69
69
|
> postcss src/global.css -o dist/styles.css
|
|
70
70
|
|
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
"use strict";var ze=Object.create;var z=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Ee=Object.getOwnPropertyNames;var Ge=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty;var Oe=(e,t)=>{for(var r in t)z(e,r,{get:t[r],enumerable:!0})},oe=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let d of Ee(t))!Le.call(e,d)&&d!==r&&z(e,d,{get:()=>t[d],enumerable:!(c=Be(t,d))||c.enumerable});return e};var B=(e,t,r)=>(r=e!=null?ze(Ge(e)):{},oe(t||!e||!e.__esModule?z(r,"default",{value:e,enumerable:!0}):r,e)),_e=e=>oe(z({},"__esModule",{value:!0}),e);var Xe={};Oe(Xe,{Button:()=>u,ClientOnly:()=>le,Navbar:()=>ye,PlaceholderAlert:()=>Ie,TOTPValidator:()=>Te,UserProfile:()=>De});module.exports=_e(Xe);var ne=B(require("react")),ie=require("@radix-ui/react-slot"),se=require("class-variance-authority");var ae=require("clsx"),re=require("tailwind-merge");function s(...e){return(0,re.twMerge)((0,ae.clsx)(e))}var de=require("react/jsx-runtime"),Fe=(0,se.cva)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),u=ne.forwardRef(({className:e,variant:t,size:r,asChild:c=!1,...d},g)=>(0,de.jsx)(c?ie.Slot:"button",{className:s(Fe({variant:t,size:r,className:e})),ref:g,...d}));u.displayName="Button";var E=require("react"),G=require("react/jsx-runtime"),le=({children:e})=>{let[t,r]=(0,E.useState)(!1);return(0,E.useEffect)(()=>{r(!0)},[]),t?(0,G.jsx)(G.Fragment,{children:e}):null};var xe=require("react"),D=require("lucide-react");var C=B(require("@radix-ui/react-avatar"));var F=require("react/jsx-runtime");function L({className:e,...t}){return(0,F.jsx)(C.Root,{"data-slot":"avatar",className:s("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function O({className:e,...t}){return(0,F.jsx)(C.Image,{"data-slot":"avatar-image",className:s("aspect-square size-full",e),...t})}function _({className:e,...t}){return(0,F.jsx)(C.Fallback,{"data-slot":"avatar-fallback",className:s("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var l=B(require("@radix-ui/react-dropdown-menu")),X=require("lucide-react");var x=require("react/jsx-runtime");function ce({...e}){return(0,x.jsx)(l.Root,{"data-slot":"dropdown-menu",...e})}function me({...e}){return(0,x.jsx)(l.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function pe({className:e,sideOffset:t=4,...r}){return(0,x.jsx)(l.Portal,{children:(0,x.jsx)(l.Content,{"data-slot":"dropdown-menu-content",sideOffset:t,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function ue({...e}){return(0,x.jsx)(l.Group,{"data-slot":"dropdown-menu-group",...e})}function J({className:e,inset:t,variant:r="default",...c}){return(0,x.jsx)(l.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...c})}function fe({className:e,inset:t,...r}){return(0,x.jsx)(l.Label,{"data-slot":"dropdown-menu-label","data-inset":t,className:s("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function Y({className:e,...t}){return(0,x.jsx)(l.Separator,{"data-slot":"dropdown-menu-separator",className:s("bg-border -mx-1 my-1 h-px",e),...t})}var f=B(require("@radix-ui/react-dialog")),ve=require("lucide-react");var v=require("react/jsx-runtime"),je=ve.X;function ge({...e}){return(0,v.jsx)(f.Root,{"data-slot":"sheet",...e})}function he({...e}){return(0,v.jsx)(f.Trigger,{"data-slot":"sheet-trigger",...e})}function He({...e}){return(0,v.jsx)(f.Portal,{"data-slot":"sheet-portal",...e})}function Ue({className:e,...t}){return(0,v.jsx)(f.Overlay,{"data-slot":"sheet-overlay",className:s("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function be({className:e,children:t,side:r="right",...c}){return(0,v.jsxs)(He,{children:[(0,v.jsx)(Ue,{}),(0,v.jsxs)(f.Content,{"data-slot":"sheet-content",className:s("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...c,children:[t,(0,v.jsxs)(f.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,v.jsx)(je,{className:"size-4"}),(0,v.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}var H=require("react"),j=require("react/jsx-runtime"),Ke={className:"mr-2 h-4 w-4","aria-hidden":"true"},$e=e=>{let[t,r]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{r(!0)},[]),t?(0,j.jsx)(e,{...Ke}):(0,j.jsx)("span",{className:"mr-2 h-4 w-4","aria-hidden":"true"})},M=({Icon:e})=>(0,j.jsx)("span",{className:"inline-flex items-center justify-center",children:$e(e)});var a=require("react/jsx-runtime");function ye({items:e=[],children:t,className:r,logoText:c="ACME Corp",user:d={name:"John Doe",email:"john@example.com",image:"https://i.pravatar.cc/150?u=a042581f4e29026704d"},onNavigateHome:g=()=>console.log("Navigating to home"),onNavItemClick:h=I=>console.log(`Navigating to ${I}`),onProfileSelected:k,onLogout:y=()=>console.log("Logout clicked"),isLoading:p=!1,identityHost:N="https://stg-id.authdog.xyz",environmentId:T="58be35b0-708f-49f6-84f0-6695d307d997"}){let[I,A]=(0,xe.useState)(!1),V=d!=null&&d.id!==null&&d.id!==void 0;return(0,a.jsx)("header",{className:s("border-b bg-background",r),children:(0,a.jsxs)("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("span",{className:"text-xl font-bold cursor-pointer",onClick:g,children:c}),(0,a.jsx)("nav",{className:"hidden md:flex gap-6",children:e?.map((i,m)=>(0,a.jsx)("span",{onClick:()=>{i.disabled||h(i.href)},className:s("text-sm font-medium transition-colors hover:text-primary cursor-pointer",i.disabled&&"cursor-not-allowed opacity-80"),children:i.title},m))})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[t,V?(0,a.jsxs)(ce,{children:[(0,a.jsx)(me,{asChild:!0,children:(0,a.jsx)(u,{variant:"ghost",className:"relative h-8 w-8 rounded-full",disabled:p,children:(0,a.jsx)(L,{className:"h-8 w-8",children:p?(0,a.jsx)("div",{className:"h-8 w-8 animate-pulse bg-muted rounded-full"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(O,{src:d.photos?.[0]?.value||"/placeholder.svg",alt:d.displayName}),(0,a.jsx)(_,{children:d.displayName?.charAt(0)})]})})})}),(0,a.jsx)(pe,{className:"w-56",align:"end",forceMount:!0,children:p?(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)("div",{className:"h-4 w-3/4 animate-pulse bg-muted rounded mb-2"}),(0,a.jsx)("div",{className:"h-3 w-1/2 animate-pulse bg-muted rounded"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(fe,{className:"font-normal",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium leading-none",children:d.displayName}),(0,a.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:d.emails?.[0]?.value})]})}),(0,a.jsx)(Y,{}),(0,a.jsx)(ue,{children:(0,a.jsxs)(J,{onClick:k,children:[(0,a.jsx)(M,{Icon:D.User}),(0,a.jsx)("span",{children:"Profile"})]})}),(0,a.jsx)(Y,{}),(0,a.jsxs)(J,{onClick:y,children:[(0,a.jsx)(M,{Icon:D.LogOut}),(0,a.jsx)("span",{children:"Log out"})]})]})})]}):(0,a.jsx)(u,{variant:"default","aria-label":"Sign in",onClick:()=>{if(!T)throw new Error("Environment ID is required");if(!N)throw new Error("Identity Host is required");let i=`${N}/signin/${T}`;window.open(i,"_blank")},children:"Sign in"}),(0,a.jsxs)(ge,{open:I,onOpenChange:A,children:[(0,a.jsx)(he,{asChild:!0,children:(0,a.jsx)(u,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":"Open Menu",children:(0,a.jsx)(M,{Icon:D.Menu})})}),(0,a.jsx)(be,{side:"left",className:"pr-0",children:(0,a.jsx)("nav",{className:"grid gap-2 py-6",children:e?.map((i,m)=>(0,a.jsx)("a",{href:i.href,className:s("flex w-full items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent",i.disabled&&"cursor-not-allowed opacity-80"),onClick:()=>A(!1),children:i.title},m))})})]})]})]})})}var S=require("react");var we=require("@radix-ui/react-slot"),Pe=require("class-variance-authority");var Ce=require("react/jsx-runtime"),We=(0,Pe.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Ne({className:e,variant:t,asChild:r=!1,...c}){return(0,Ce.jsx)(r?we.Slot:"span",{"data-slot":"badge",className:s(We({variant:t}),e),...c})}var Me=require("lucide-react"),o=require("react/jsx-runtime"),De=({loading:e,user:t,handleAuthenticated:r})=>{let[c,d]=(0,S.useState)(!1),[g,h]=(0,S.useState)("profile");(0,S.useEffect)(()=>{d(!0)},[]),(0,S.useEffect)(()=>{!e&&r&&r()},[e,t,r]);let k={className:"mr-2 h-4 w-4","aria-hidden":"true"},y=p=>c?(0,o.jsx)(p,{...k}):null;return!c||e?(0,o.jsx)("div",{children:"Loading..."}):t?(0,o.jsxs)("div",{className:"grid grid-cols-[14rem,1fr] w-full bg-transparent",children:[(0,o.jsxs)("div",{className:"h-full border-r p-3 md:p-4 bg-transparent flex flex-col min-w-0",children:[(0,o.jsxs)("div",{className:"mb-3 md:mb-4",children:[(0,o.jsx)("h1",{className:"text-xl font-bold",children:"Account"}),(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Manage your account info."})]}),(0,o.jsx)("nav",{className:"space-y-1 flex-1",children:(0,o.jsxs)("button",{onClick:()=>h("profile"),className:`flex items-center w-full px-3 py-2 text-sm rounded-md ${g==="profile"?"bg-gray-100 text-gray-900":"text-gray-700 hover:bg-gray-50"}`,children:[y(Me.User),"Profile"]})})]}),(0,o.jsxs)("div",{className:"h-full p-3 md:p-5 min-w-0 bg-transparent",children:[(0,o.jsx)("div",{className:"flex justify-between items-center mb-3 md:mb-4",children:(0,o.jsx)("h2",{className:"text-xl font-semibold",children:g==="profile"?"Profile details":"Security settings"})}),g==="profile"?(0,o.jsxs)("div",{className:"space-y-5 md:space-y-6",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3",children:"Profile"}),(0,o.jsx)("div",{className:"flex items-center justify-between",children:(0,o.jsxs)("div",{className:"flex items-center",children:[(0,o.jsxs)(L,{className:"h-12 w-12 mr-4 border",children:[(0,o.jsx)(O,{src:t.photos?.[0]?.value,alt:"Profile picture"}),(0,o.jsx)(_,{children:t.displayName?.split(" ").map(p=>p[0]).join("")})]}),(0,o.jsx)("span",{className:"font-medium",children:t.displayName})]})})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3",children:"Email addresses"}),(0,o.jsx)("div",{className:"space-y-2.5",children:t.emails.map((p,N)=>(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("span",{children:p.value}),N===0&&(0,o.jsx)(Ne,{variant:"outline",className:"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100",children:"Primary"})]},p.value))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3",children:"Connected accounts"}),(0,o.jsx)("div",{className:"space-y-2.5",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("div",{className:"flex items-center",children:(0,o.jsx)("div",{className:"mr-2",children:(0,o.jsx)("span",{children:t.provider})})}),(0,o.jsx)("span",{className:"text-sm text-gray-500",children:t?.emails?.[0]?.value})]},t.provider)})]})]}):(0,o.jsxs)("div",{className:"space-y-5 md:space-y-6",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3",children:"Two-factor authentication"}),(0,o.jsx)("div",{className:"space-y-2.5",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"font-medium",children:"Two-factor authentication"}),(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Add an extra layer of security to your account"})]}),(0,o.jsx)(u,{variant:"outline",size:"sm",children:"Enable"})]})})]},"two-factor"),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3",children:"Password"}),(0,o.jsx)("div",{className:"space-y-2.5",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"font-medium",children:"Change password"}),(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Last changed 3 months ago"})]}),(0,o.jsx)(u,{variant:"outline",size:"sm",children:"Change"})]})})]},"password"),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3",children:"Active sessions"}),(0,o.jsx)("div",{className:"space-y-2.5",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"font-medium",children:"Current session"}),(0,o.jsx)("p",{className:"text-sm text-gray-500",children:"Chrome on Windows \u2022 Active now"})]}),(0,o.jsx)(u,{variant:"outline",size:"sm",children:"Sign out"})]})})]},"sessions")]})]})]}):(0,o.jsx)("div",{children:"No user"})};var ke=require("lucide-react");var Se=require("class-variance-authority");var $=require("react/jsx-runtime"),qe=(0,Se.cva)("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function U({className:e,variant:t,...r}){return(0,$.jsx)("div",{"data-slot":"alert",role:"alert",className:s(qe({variant:t}),e),...r})}function Re({className:e,...t}){return(0,$.jsx)("div",{"data-slot":"alert-title",className:s("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function K({className:e,...t}){return(0,$.jsx)("div",{"data-slot":"alert-description",className:s("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}var w=require("react/jsx-runtime"),Ie=e=>{let t=e.title??"Placeholder Alert",r=e.description??"This is a placeholder alert.";return(0,w.jsx)("div",{className:"grid w-full max-w-xl items-start gap-4",children:(0,w.jsxs)(U,{children:[(0,w.jsx)(M,{Icon:ke.CheckCircle2Icon}),(0,w.jsx)(Re,{children:t}),(0,w.jsx)(K,{children:r})]})})};var P=require("react");var Q=require("react/jsx-runtime");function W({className:e,...t}){return(0,Q.jsx)("div",{"data-slot":"card",className:s("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function q({className:e,...t}){return(0,Q.jsx)("div",{"data-slot":"card-content",className:s("px-6",e),...t})}var R=require("lucide-react"),n=require("react/jsx-runtime"),Te=({onValidate:e})=>{let[t,r]=(0,P.useState)(["","","","","",""]),[c,d]=(0,P.useState)(!1),[g,h]=(0,P.useState)(""),[k,y]=(0,P.useState)(!1),p=(0,P.useRef)([]),N=(i,m)=>{if(!/^\d*$/.test(m))return;let b=[...t];b[i]=m.slice(-1),r(b),h(""),y(!1),m&&i<5&&p.current[i+1]?.focus()},T=(i,m)=>{m.key==="Backspace"&&!t[i]&&i>0&&p.current[i-1]?.focus(),m.key==="v"&&(m.ctrlKey||m.metaKey)&&(m.preventDefault(),navigator.clipboard.readText().then(b=>{let Z=b.replace(/\D/g,"").slice(0,6).split(""),ee=[...t];Z.forEach((Ve,te)=>{te<6&&(ee[te]=Ve)}),r(ee);let Ae=Math.min(Z.length,5);p.current[Ae]?.focus()}))},I=async()=>{let i=t.join("");if(i.length!==6){h("Please enter all 6 digits");return}d(!0),h("");try{await e(i),y(!0)}catch{h("Invalid TOTP code. Please try again.")}finally{d(!1)}},A=i=>{i.preventDefault(),I()},V=()=>{r(["","","","","",""]),h(""),y(!1),d(!1),p.current[0]?.focus()};return k?(0,n.jsx)("div",{className:"max-w-md mx-auto",children:(0,n.jsx)(W,{className:"border-green-200 bg-green-50",children:(0,n.jsx)(q,{className:"pt-6",children:(0,n.jsxs)("div",{className:"text-center space-y-4",children:[(0,n.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center",children:(0,n.jsx)(R.CheckCircle,{className:"w-8 h-8 text-green-600"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-green-900",children:"Verification Successful!"}),(0,n.jsx)("p",{className:"text-sm text-green-700 mt-1",children:"Your TOTP code has been validated."})]}),(0,n.jsx)(u,{onClick:V,variant:"outline",className:"bg-white",children:"Verify Another Code"})]})})})}):(0,n.jsx)("div",{className:"max-w-md mx-auto",children:(0,n.jsx)(W,{children:(0,n.jsx)(q,{className:"pt-6",children:(0,n.jsxs)("div",{className:"text-center space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mx-auto w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,n.jsx)(R.Shield,{className:"w-6 h-6 text-blue-600"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold",children:"Enter Verification Code"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Enter the 6-digit code from your authenticator app"})]}),(0,n.jsxs)("form",{onSubmit:A,className:"space-y-6",children:[(0,n.jsx)("div",{className:"flex justify-center gap-2",children:t.map((i,m)=>(0,n.jsx)(W,{className:"w-12 h-14 border-2 focus-within:border-blue-500 transition-colors",children:(0,n.jsx)(q,{className:"p-0 h-full flex items-center justify-center",children:(0,n.jsx)("input",{ref:b=>{p.current[m]=b},type:"tel",inputMode:"numeric",maxLength:1,value:i,onChange:b=>N(m,b.target.value),onKeyDown:b=>T(m,b),className:"w-full h-full text-center text-2xl font-bold border-none outline-none bg-transparent",autoComplete:"one-time-code",disabled:c,style:{height:"auto"}})})},m))}),g&&(0,n.jsxs)(U,{variant:"destructive",children:[(0,n.jsx)(R.AlertCircle,{className:"h-4 w-4"}),(0,n.jsx)(K,{children:g})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)(u,{type:"submit",className:"w-full",disabled:c||t.some(i=>i===""),children:c?"Verifying...":"Verify Code"}),(0,n.jsx)(u,{type:"button",variant:"ghost",size:"sm",onClick:V,className:"w-full text-xs",children:"Clear Code"})]})]}),(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"Codes refresh every 30 seconds"})]})})})})};
|
|
2
|
+
"use strict";var ze=Object.create;var z=Object.defineProperty;var Be=Object.getOwnPropertyDescriptor;var Ee=Object.getOwnPropertyNames;var Ge=Object.getPrototypeOf,Le=Object.prototype.hasOwnProperty;var Oe=(e,t)=>{for(var r in t)z(e,r,{get:t[r],enumerable:!0})},oe=(e,t,r,c)=>{if(t&&typeof t=="object"||typeof t=="function")for(let d of Ee(t))!Le.call(e,d)&&d!==r&&z(e,d,{get:()=>t[d],enumerable:!(c=Be(t,d))||c.enumerable});return e};var B=(e,t,r)=>(r=e!=null?ze(Ge(e)):{},oe(t||!e||!e.__esModule?z(r,"default",{value:e,enumerable:!0}):r,e)),_e=e=>oe(z({},"__esModule",{value:!0}),e);var Xe={};Oe(Xe,{Button:()=>u,ClientOnly:()=>le,Navbar:()=>ye,PlaceholderAlert:()=>Ie,TOTPValidator:()=>Te,UserProfile:()=>Me});module.exports=_e(Xe);var ne=B(require("react")),ie=require("@radix-ui/react-slot"),se=require("class-variance-authority");var ae=require("clsx"),re=require("tailwind-merge");function s(...e){return(0,re.twMerge)((0,ae.clsx)(e))}var de=require("react/jsx-runtime"),Fe=(0,se.cva)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),u=ne.forwardRef(({className:e,variant:t,size:r,asChild:c=!1,...d},g)=>(0,de.jsx)(c?ie.Slot:"button",{className:s(Fe({variant:t,size:r,className:e})),ref:g,...d}));u.displayName="Button";var E=require("react"),G=require("react/jsx-runtime"),le=({children:e})=>{let[t,r]=(0,E.useState)(!1);return(0,E.useEffect)(()=>{r(!0)},[]),t?(0,G.jsx)(G.Fragment,{children:e}):null};var be=require("react"),M=require("lucide-react");var C=B(require("@radix-ui/react-avatar"));var F=require("react/jsx-runtime");function L({className:e,...t}){return(0,F.jsx)(C.Root,{"data-slot":"avatar",className:s("relative flex size-8 shrink-0 overflow-hidden rounded-full",e),...t})}function O({className:e,...t}){return(0,F.jsx)(C.Image,{"data-slot":"avatar-image",className:s("aspect-square size-full",e),...t})}function _({className:e,...t}){return(0,F.jsx)(C.Fallback,{"data-slot":"avatar-fallback",className:s("bg-muted flex size-full items-center justify-center rounded-full",e),...t})}var l=B(require("@radix-ui/react-dropdown-menu")),X=require("lucide-react");var b=require("react/jsx-runtime");function ce({...e}){return(0,b.jsx)(l.Root,{"data-slot":"dropdown-menu",...e})}function me({...e}){return(0,b.jsx)(l.Trigger,{"data-slot":"dropdown-menu-trigger",...e})}function pe({className:e,sideOffset:t=4,...r}){return(0,b.jsx)(l.Portal,{children:(0,b.jsx)(l.Content,{"data-slot":"dropdown-menu-content",sideOffset:t,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",e),...r})})}function ue({...e}){return(0,b.jsx)(l.Group,{"data-slot":"dropdown-menu-group",...e})}function J({className:e,inset:t,variant:r="default",...c}){return(0,b.jsx)(l.Item,{"data-slot":"dropdown-menu-item","data-inset":t,"data-variant":r,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...c})}function fe({className:e,inset:t,...r}){return(0,b.jsx)(l.Label,{"data-slot":"dropdown-menu-label","data-inset":t,className:s("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",e),...r})}function Y({className:e,...t}){return(0,b.jsx)(l.Separator,{"data-slot":"dropdown-menu-separator",className:s("bg-border -mx-1 my-1 h-px",e),...t})}var f=B(require("@radix-ui/react-dialog")),ve=require("lucide-react");var v=require("react/jsx-runtime"),je=ve.X;function ge({...e}){return(0,v.jsx)(f.Root,{"data-slot":"sheet",...e})}function he({...e}){return(0,v.jsx)(f.Trigger,{"data-slot":"sheet-trigger",...e})}function He({...e}){return(0,v.jsx)(f.Portal,{"data-slot":"sheet-portal",...e})}function Ue({className:e,...t}){return(0,v.jsx)(f.Overlay,{"data-slot":"sheet-overlay",className:s("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),...t})}function xe({className:e,children:t,side:r="right",...c}){return(0,v.jsxs)(He,{children:[(0,v.jsx)(Ue,{}),(0,v.jsxs)(f.Content,{"data-slot":"sheet-content",className:s("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",e),...c,children:[t,(0,v.jsxs)(f.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,v.jsx)(je,{className:"size-4"}),(0,v.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}var H=require("react"),j=require("react/jsx-runtime"),Ke={className:"mr-2 h-4 w-4","aria-hidden":"true"},$e=e=>{let[t,r]=(0,H.useState)(!1);return(0,H.useEffect)(()=>{r(!0)},[]),t?(0,j.jsx)(e,{...Ke}):(0,j.jsx)("span",{className:"mr-2 h-4 w-4","aria-hidden":"true"})},k=({Icon:e})=>(0,j.jsx)("span",{className:"inline-flex items-center justify-center",children:$e(e)});var a=require("react/jsx-runtime");function ye({items:e=[],children:t,className:r,logoText:c="ACME Corp",user:d={name:"John Doe",email:"john@example.com",image:"https://i.pravatar.cc/150?u=a042581f4e29026704d"},onNavigateHome:g=()=>console.log("Navigating to home"),onNavItemClick:h=I=>console.log(`Navigating to ${I}`),onProfileSelected:R,onLogout:y=()=>console.log("Logout clicked"),isLoading:p=!1,identityHost:N="https://stg-id.authdog.xyz",environmentId:T="58be35b0-708f-49f6-84f0-6695d307d997"}){let[I,A]=(0,be.useState)(!1),V=d!=null&&d.id!==null&&d.id!==void 0;return(0,a.jsx)("header",{className:s("border-b bg-background",r),children:(0,a.jsxs)("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[(0,a.jsx)("span",{className:"text-xl font-bold cursor-pointer",onClick:g,children:c}),(0,a.jsx)("nav",{className:"hidden md:flex gap-6",children:e?.map((i,m)=>(0,a.jsx)("span",{onClick:()=>{i.disabled||h(i.href)},className:s("text-sm font-medium transition-colors hover:text-primary cursor-pointer",i.disabled&&"cursor-not-allowed opacity-80"),children:i.title},m))})]}),(0,a.jsxs)("div",{className:"flex items-center gap-4",children:[t,V?(0,a.jsxs)(ce,{children:[(0,a.jsx)(me,{asChild:!0,children:(0,a.jsx)(u,{variant:"ghost",className:"relative h-8 w-8 rounded-full",disabled:p,children:(0,a.jsx)(L,{className:"h-8 w-8",children:p?(0,a.jsx)("div",{className:"h-8 w-8 animate-pulse bg-muted rounded-full"}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(O,{src:d.photos?.[0]?.value||"/placeholder.svg",alt:d.displayName}),(0,a.jsx)(_,{children:d.displayName?.charAt(0)})]})})})}),(0,a.jsx)(pe,{className:"w-56",align:"end",forceMount:!0,children:p?(0,a.jsxs)("div",{className:"p-4",children:[(0,a.jsx)("div",{className:"h-4 w-3/4 animate-pulse bg-muted rounded mb-2"}),(0,a.jsx)("div",{className:"h-3 w-1/2 animate-pulse bg-muted rounded"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(fe,{className:"font-normal",children:(0,a.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,a.jsx)("p",{className:"text-sm font-medium leading-none",children:d.displayName}),(0,a.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:d.emails?.[0]?.value})]})}),(0,a.jsx)(Y,{}),(0,a.jsx)(ue,{children:(0,a.jsxs)(J,{onClick:R,children:[(0,a.jsx)(k,{Icon:M.User}),(0,a.jsx)("span",{children:"Profile"})]})}),(0,a.jsx)(Y,{}),(0,a.jsxs)(J,{onClick:y,children:[(0,a.jsx)(k,{Icon:M.LogOut}),(0,a.jsx)("span",{children:"Log out"})]})]})})]}):(0,a.jsx)(u,{variant:"default","aria-label":"Sign in",onClick:()=>{if(!T)throw new Error("Environment ID is required");if(!N)throw new Error("Identity Host is required");let i=`${N}/signin/${T}`;window.open(i,"_blank")},children:"Sign in"}),(0,a.jsxs)(ge,{open:I,onOpenChange:A,children:[(0,a.jsx)(he,{asChild:!0,children:(0,a.jsx)(u,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":"Open Menu",children:(0,a.jsx)(k,{Icon:M.Menu})})}),(0,a.jsx)(xe,{side:"left",className:"pr-0",children:(0,a.jsx)("nav",{className:"grid gap-2 py-6",children:e?.map((i,m)=>(0,a.jsx)("a",{href:i.href,className:s("flex w-full items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent",i.disabled&&"cursor-not-allowed opacity-80"),onClick:()=>A(!1),children:i.title},m))})})]})]})]})})}var D=require("react");var we=require("@radix-ui/react-slot"),Pe=require("class-variance-authority");var Ce=require("react/jsx-runtime"),We=(0,Pe.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Ne({className:e,variant:t,asChild:r=!1,...c}){return(0,Ce.jsx)(r?we.Slot:"span",{"data-slot":"badge",className:s(We({variant:t}),e),...c})}var ke=require("lucide-react"),o=require("react/jsx-runtime"),Me=({loading:e,user:t,handleAuthenticated:r})=>{let[c,d]=(0,D.useState)(!1),[g,h]=(0,D.useState)("profile");(0,D.useEffect)(()=>{d(!0)},[]),(0,D.useEffect)(()=>{!e&&r&&r()},[e,t,r]);let R={className:"mr-2 h-4 w-4","aria-hidden":"true"},y=p=>c?(0,o.jsx)(p,{...R}):null;return!c||e?(0,o.jsx)("div",{children:"Loading..."}):t?(0,o.jsxs)("div",{className:"grid grid-cols-[14rem,1fr] w-full bg-transparent",children:[(0,o.jsxs)("div",{className:"h-full border-r p-3 md:p-4 bg-transparent flex flex-col min-w-0",children:[(0,o.jsxs)("div",{className:"mb-3 md:mb-4",children:[(0,o.jsx)("h1",{className:"text-xl font-bold text-gray-900 dark:text-gray-100",children:"Account"}),(0,o.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Manage your account info."})]}),(0,o.jsx)("nav",{className:"space-y-1 flex-1",children:(0,o.jsxs)("button",{onClick:()=>h("profile"),className:`flex items-center w-full px-3 py-2 text-sm rounded-md ${g==="profile"?"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100":"text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800"}`,children:[y(ke.User),"Profile"]})})]}),(0,o.jsxs)("div",{className:"h-full p-3 md:p-5 min-w-0 bg-transparent",children:[(0,o.jsx)("div",{className:"flex justify-between items-center mb-3 md:mb-4",children:(0,o.jsx)("h2",{className:"text-xl font-semibold text-gray-900 dark:text-gray-100",children:g==="profile"?"Profile details":"Security settings"})}),g==="profile"?(0,o.jsxs)("div",{className:"space-y-5 md:space-y-6",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Profile"}),(0,o.jsx)("div",{className:"flex items-center justify-between",children:(0,o.jsxs)("div",{className:"flex items-center",children:[(0,o.jsxs)(L,{className:"h-12 w-12 mr-4 border",children:[(0,o.jsx)(O,{src:t.photos?.[0]?.value,alt:"Profile picture"}),(0,o.jsx)(_,{children:t.displayName?.split(" ").map(p=>p[0]).join("")})]}),(0,o.jsx)("span",{className:"font-medium text-gray-900 dark:text-gray-100",children:t.displayName})]})})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Email addresses"}),(0,o.jsx)("div",{className:"space-y-2.5",children:t.emails.map((p,N)=>(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("span",{className:"text-gray-900 dark:text-gray-100",children:p.value}),N===0&&(0,o.jsx)(Ne,{variant:"outline",className:"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-800",children:"Primary"})]},p.value))})]}),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Connected accounts"}),(0,o.jsx)("div",{className:"space-y-2.5",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsx)("div",{className:"flex items-center",children:(0,o.jsx)("div",{className:"mr-2",children:(0,o.jsx)("span",{className:"text-gray-900 dark:text-gray-100",children:t.provider})})}),(0,o.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:t?.emails?.[0]?.value})]},t.provider)})]})]}):(0,o.jsxs)("div",{className:"space-y-5 md:space-y-6",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Two-factor authentication"}),(0,o.jsx)("div",{className:"space-y-2.5",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"font-medium text-gray-900 dark:text-gray-100",children:"Two-factor authentication"}),(0,o.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Add an extra layer of security to your account"})]}),(0,o.jsx)(u,{variant:"outline",size:"sm",children:"Enable"})]})})]},"two-factor"),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Password"}),(0,o.jsx)("div",{className:"space-y-2.5",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"font-medium text-gray-900 dark:text-gray-100",children:"Change password"}),(0,o.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Last changed 3 months ago"})]}),(0,o.jsx)(u,{variant:"outline",size:"sm",children:"Change"})]})})]},"password"),(0,o.jsxs)("div",{children:[(0,o.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Active sessions"}),(0,o.jsx)("div",{className:"space-y-2.5",children:(0,o.jsxs)("div",{className:"flex items-center justify-between",children:[(0,o.jsxs)("div",{children:[(0,o.jsx)("p",{className:"font-medium text-gray-900 dark:text-gray-100",children:"Current session"}),(0,o.jsx)("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"Chrome on Windows \u2022 Active now"})]}),(0,o.jsx)(u,{variant:"outline",size:"sm",children:"Sign out"})]})})]},"sessions")]})]})]}):(0,o.jsx)("div",{children:"No user"})};var Re=require("lucide-react");var De=require("class-variance-authority");var $=require("react/jsx-runtime"),qe=(0,De.cva)("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function U({className:e,variant:t,...r}){return(0,$.jsx)("div",{"data-slot":"alert",role:"alert",className:s(qe({variant:t}),e),...r})}function Se({className:e,...t}){return(0,$.jsx)("div",{"data-slot":"alert-title",className:s("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",e),...t})}function K({className:e,...t}){return(0,$.jsx)("div",{"data-slot":"alert-description",className:s("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",e),...t})}var w=require("react/jsx-runtime"),Ie=e=>{let t=e.title??"Placeholder Alert",r=e.description??"This is a placeholder alert.";return(0,w.jsx)("div",{className:"grid w-full max-w-xl items-start gap-4",children:(0,w.jsxs)(U,{children:[(0,w.jsx)(k,{Icon:Re.CheckCircle2Icon}),(0,w.jsx)(Se,{children:t}),(0,w.jsx)(K,{children:r})]})})};var P=require("react");var Q=require("react/jsx-runtime");function W({className:e,...t}){return(0,Q.jsx)("div",{"data-slot":"card",className:s("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",e),...t})}function q({className:e,...t}){return(0,Q.jsx)("div",{"data-slot":"card-content",className:s("px-6",e),...t})}var S=require("lucide-react"),n=require("react/jsx-runtime"),Te=({onValidate:e})=>{let[t,r]=(0,P.useState)(["","","","","",""]),[c,d]=(0,P.useState)(!1),[g,h]=(0,P.useState)(""),[R,y]=(0,P.useState)(!1),p=(0,P.useRef)([]),N=(i,m)=>{if(!/^\d*$/.test(m))return;let x=[...t];x[i]=m.slice(-1),r(x),h(""),y(!1),m&&i<5&&p.current[i+1]?.focus()},T=(i,m)=>{m.key==="Backspace"&&!t[i]&&i>0&&p.current[i-1]?.focus(),m.key==="v"&&(m.ctrlKey||m.metaKey)&&(m.preventDefault(),navigator.clipboard.readText().then(x=>{let Z=x.replace(/\D/g,"").slice(0,6).split(""),ee=[...t];Z.forEach((Ve,te)=>{te<6&&(ee[te]=Ve)}),r(ee);let Ae=Math.min(Z.length,5);p.current[Ae]?.focus()}))},I=async()=>{let i=t.join("");if(i.length!==6){h("Please enter all 6 digits");return}d(!0),h("");try{await e(i),y(!0)}catch{h("Invalid TOTP code. Please try again.")}finally{d(!1)}},A=i=>{i.preventDefault(),I()},V=()=>{r(["","","","","",""]),h(""),y(!1),d(!1),p.current[0]?.focus()};return R?(0,n.jsx)("div",{className:"max-w-md mx-auto",children:(0,n.jsx)(W,{className:"border-green-200 bg-green-50",children:(0,n.jsx)(q,{className:"pt-6",children:(0,n.jsxs)("div",{className:"text-center space-y-4",children:[(0,n.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center",children:(0,n.jsx)(S.CheckCircle,{className:"w-8 h-8 text-green-600"})}),(0,n.jsxs)("div",{children:[(0,n.jsx)("h3",{className:"text-lg font-semibold text-green-900",children:"Verification Successful!"}),(0,n.jsx)("p",{className:"text-sm text-green-700 mt-1",children:"Your TOTP code has been validated."})]}),(0,n.jsx)(u,{onClick:V,variant:"outline",className:"bg-white",children:"Verify Another Code"})]})})})}):(0,n.jsx)("div",{className:"max-w-md mx-auto",children:(0,n.jsx)(W,{children:(0,n.jsx)(q,{className:"pt-6",children:(0,n.jsxs)("div",{className:"text-center space-y-6",children:[(0,n.jsxs)("div",{children:[(0,n.jsx)("div",{className:"mx-auto w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,n.jsx)(S.Shield,{className:"w-6 h-6 text-blue-600"})}),(0,n.jsx)("h3",{className:"text-lg font-semibold",children:"Enter Verification Code"}),(0,n.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Enter the 6-digit code from your authenticator app"})]}),(0,n.jsxs)("form",{onSubmit:A,className:"space-y-6",children:[(0,n.jsx)("div",{className:"flex justify-center gap-2",children:t.map((i,m)=>(0,n.jsx)(W,{className:"w-12 h-14 border-2 focus-within:border-blue-500 transition-colors",children:(0,n.jsx)(q,{className:"p-0 h-full flex items-center justify-center",children:(0,n.jsx)("input",{ref:x=>{p.current[m]=x},type:"tel",inputMode:"numeric",maxLength:1,value:i,onChange:x=>N(m,x.target.value),onKeyDown:x=>T(m,x),className:"w-full h-full text-center text-2xl font-bold border-none outline-none bg-transparent",autoComplete:"one-time-code",disabled:c,style:{height:"auto"}})})},m))}),g&&(0,n.jsxs)(U,{variant:"destructive",children:[(0,n.jsx)(S.AlertCircle,{className:"h-4 w-4"}),(0,n.jsx)(K,{children:g})]}),(0,n.jsxs)("div",{className:"space-y-3",children:[(0,n.jsx)(u,{type:"submit",className:"w-full",disabled:c||t.some(i=>i===""),children:c?"Verifying...":"Verify Code"}),(0,n.jsx)(u,{type:"button",variant:"ghost",size:"sm",onClick:V,className:"w-full text-xs",children:"Clear Code"})]})]}),(0,n.jsx)("p",{className:"text-xs text-muted-foreground",children:"Codes refresh every 30 seconds"})]})})})})};
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/index.ts","../src/components/ui/button.tsx","../src/lib/utils.ts","../src/components/core/client-only.tsx","../src/components/core/navbar.tsx","../src/components/ui/avatar.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/sheet.tsx","../src/components/icons.tsx","../src/components/core/user-profile.tsx","../src/components/ui/badge.tsx","../src/components/core/placeholder-alert.tsx","../src/components/ui/alert.tsx","../src/components/flow/totp-validator.tsx","../src/components/ui/card.tsx"],"sourcesContent":["export {Button} from \"./components/ui/button\";\nexport { ClientOnly } from \"./components/core/client-only\";\nexport {Navbar} from \"./components/core/navbar\";\nexport {UserProfile} from \"./components/core/user-profile\";\nexport {PlaceholderAlert} from \"./components/core/placeholder-alert\";\nexport {TOTPValidator} from \"./components/flow/totp-validator\";","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import {\n useEffect,\n useState,\n type ReactNode,\n} from \"react\";\n\nexport const ClientOnly = ({ children }: { children: ReactNode }) => {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) {\n return null;\n }\n \n return <>{children}</>;\n }\n ","\"use client\"\n\nimport type React from \"react\"\nimport { useState } from \"react\"\nimport { User, LogOut, Menu } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"../../components/ui/avatar\"\nimport { Button } from \"../../components/ui/button\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../../components/ui/dropdown-menu\"\nimport { Sheet, SheetContent, SheetTrigger } from \"../../components/ui/sheet\"\nimport { IconWrapper } from \"../icons\"\n\ninterface NavItem {\n title: string\n href: string\n disabled?: boolean\n}\n\ninterface NavbarProps {\n items?: NavItem[] | undefined;\n children?: React.ReactNode\n className?: string\n logoText?: string\n isLoading?: boolean\n user?: any;\n onNavigateHome?: () => void;\n onNavItemClick?: (href: string) => void;\n onProfileSelected?: () => void;\n onLogout?: () => void;\n // signinUrl?: string;\n identityHost?: string;\n environmentId?: string;\n}\n\nexport function Navbar({\n items = [\n // { title: \"Dashboard\", href: \"/dashboard\" },\n ],\n children,\n className,\n logoText = \"ACME Corp\",\n user = {\n name: \"John Doe\",\n email: \"john@example.com\",\n image: \"https://i.pravatar.cc/150?u=a042581f4e29026704d\",\n },\n onNavigateHome = () => console.log(\"Navigating to home\"),\n onNavItemClick = (href: string) => console.log(`Navigating to ${href}`),\n onProfileSelected,\n onLogout = () => console.log(\"Logout clicked\"),\n isLoading = false,\n identityHost = \"https://stg-id.authdog.xyz\",\n environmentId = \"58be35b0-708f-49f6-84f0-6695d307d997\",\n}: NavbarProps) {\n const [open, setOpen] = useState(false)\n const isAuthenticated = user !== null && user !== undefined && user.id !== null && user.id !== undefined;\n return (\n <header className={cn(\"border-b bg-background\", className)}>\n <div className=\"container flex h-16 items-center justify-between px-4 md:px-6\">\n <div className=\"flex items-center gap-4\">\n <span className=\"text-xl font-bold cursor-pointer\" onClick={onNavigateHome}>{logoText}</span>\n <nav className=\"hidden md:flex gap-6\">\n {items?.map((item, index) => (\n <span\n key={index}\n onClick={() => {\n if (!item.disabled) {\n onNavItemClick(item.href)\n }\n }}\n className={cn(\n \"text-sm font-medium transition-colors hover:text-primary cursor-pointer\",\n item.disabled && \"cursor-not-allowed opacity-80\"\n )}\n >\n {item.title}\n </span>\n ))}\n </nav>\n </div>\n <div className=\"flex items-center gap-4\">\n {children}\n\n {\n isAuthenticated ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" className=\"relative h-8 w-8 rounded-full\" disabled={isLoading}>\n <Avatar className=\"h-8 w-8\">\n {isLoading ? (\n <div className=\"h-8 w-8 animate-pulse bg-muted rounded-full\" />\n ) : (\n <>\n <AvatarImage src={user.photos?.[0]?.value || \"/placeholder.svg\"} alt={user.displayName} />\n <AvatarFallback>{user.displayName?.charAt(0)}</AvatarFallback>\n </>\n )}\n </Avatar>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\" align=\"end\" forceMount>\n {isLoading ? (\n <div className=\"p-4\">\n <div className=\"h-4 w-3/4 animate-pulse bg-muted rounded mb-2\" />\n <div className=\"h-3 w-1/2 animate-pulse bg-muted rounded\" />\n </div>\n ) : (\n <>\n <DropdownMenuLabel className=\"font-normal\">\n <div className=\"flex flex-col space-y-1\">\n <p className=\"text-sm font-medium leading-none\">{user.displayName}</p>\n <p className=\"text-xs leading-none text-muted-foreground\">{user.emails?.[0]?.value}</p>\n </div>\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <DropdownMenuItem onClick={onProfileSelected}>\n <IconWrapper Icon={User} />\n <span>Profile</span>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={onLogout}>\n <IconWrapper Icon={LogOut} />\n <span>Log out</span>\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n \n : (\n <Button variant=\"default\" aria-label=\"Sign in\" onClick={() => {\n if (!environmentId) {\n throw new Error(\"Environment ID is required\");\n }\n\n if (!identityHost) {\n throw new Error(\"Identity Host is required\");\n }\n \n const signinUrl = `${identityHost}/signin/${environmentId}`;\n window.open(signinUrl, \"_blank\");\n }}>\n Sign in\n </Button>\n )\n }\n \n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"md:hidden\" aria-label=\"Open Menu\">\n <IconWrapper Icon={Menu} />\n </Button>\n </SheetTrigger>\n <SheetContent side=\"left\" className=\"pr-0\">\n <nav className=\"grid gap-2 py-6\">\n {items?.map((item, index) => (\n <a\n key={index}\n href={item.href}\n className={cn(\n \"flex w-full items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent\",\n item.disabled && \"cursor-not-allowed opacity-80\"\n )}\n onClick={() => setOpen(false)}\n >\n {item.title}\n </a>\n ))}\n </nav>\n </SheetContent>\n </Sheet>\n </div>\n </div>\n </header>\n )\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n \"relative flex size-8 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full\", className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"bg-muted flex size-full items-center justify-center rounded-full\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\nimport type { ComponentType } from \"react\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nconst CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>\nconst CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>\nconst ChevronRightIcon = ChevronRight as ComponentType<React.SVGProps<SVGSVGElement>>\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\nimport type { ComponentType } from \"react\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nconst XIcon = X as ComponentType<React.SVGProps<SVGSVGElement>>\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n side === \"right\" &&\n \"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n side === \"left\" &&\n \"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n side === \"top\" &&\n \"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b\",\n side === \"bottom\" &&\n \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t\",\n className\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\"text-foreground font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","import { LucideProps } from \"lucide-react\"\nimport { useEffect, useState } from \"react\"\n\nconst iconProps: LucideProps = {\n className: \"mr-2 h-4 w-4\",\n \"aria-hidden\": \"true\"\n}\n\nexport const renderIcon = ((Icon: any) => {\n const [isMounted, setIsMounted] = useState(false)\n\n useEffect(() => {\n setIsMounted(true)\n }, [])\n\n if (!isMounted) {\n return <span className=\"mr-2 h-4 w-4\" aria-hidden=\"true\" />\n }\n\n return <Icon {...iconProps} />\n}) as React.FC<{\n Icon: any\n}>\n\nexport const IconWrapper = ({ Icon }: { Icon: any }) => {\n return (\n <span className=\"inline-flex items-center justify-center\">\n {renderIcon(Icon)}\n </span>\n )\n}","\"use client\"\n\nimport { useEffect, useState } from \"react\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"../../components/ui/avatar\"\nimport { Button } from \"../../components/ui/button\"\nimport { Badge } from \"../../components/ui/badge\"\nimport { User, LucideProps } from \"lucide-react\"\n\nexport interface UserProfileProps {\n loading: boolean;\n user: any;\n emails?: { address: string; isPrimary?: boolean }[];\n handleAuthenticated?: () => void;\n}\n\nexport const UserProfile = ({\n loading,\n user,\n handleAuthenticated\n}: UserProfileProps) => {\n const [isMounted, setIsMounted] = useState(false)\n const [activeTab, setActiveTab] = useState<\"profile\" | \"security\">(\"profile\");\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n useEffect(() => {\n if (!loading && handleAuthenticated) {\n handleAuthenticated();\n }\n }, [loading, user, handleAuthenticated]);\n\n const iconProps: LucideProps = {\n className: \"mr-2 h-4 w-4\",\n \"aria-hidden\": \"true\"\n }\n\n const renderIcon = (Icon: any) => {\n if (!isMounted) return null\n return <Icon {...iconProps} />\n }\n\n if (!isMounted || loading) {\n return <div>Loading...</div>\n }\n\n if (!user) {\n return <div>No user</div>\n }\n \n return (\n <div className=\"grid grid-cols-[14rem,1fr] w-full bg-transparent\">\n <div className=\"h-full border-r p-3 md:p-4 bg-transparent flex flex-col min-w-0\">\n <div className=\"mb-3 md:mb-4\">\n <h1 className=\"text-xl font-bold\">Account</h1>\n <p className=\"text-sm text-gray-500\">Manage your account info.</p>\n </div>\n\n <nav className=\"space-y-1 flex-1\">\n <button\n onClick={() => setActiveTab(\"profile\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"profile\" ? \"bg-gray-100 text-gray-900\" : \"text-gray-700 hover:bg-gray-50\"\n }`}\n >\n {renderIcon(User)}\n Profile\n </button>\n {/* <button\n onClick={() => setActiveTab(\"security\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"security\" ? \"bg-gray-100 text-gray-900\" : \"text-gray-700 hover:bg-gray-50\"\n }`}\n >\n {renderIcon(Shield)}\n Security\n </button> */}\n </nav>\n </div>\n\n <div className=\"h-full p-3 md:p-5 min-w-0 bg-transparent\">\n <div className=\"flex justify-between items-center mb-3 md:mb-4\">\n <h2 className=\"text-xl font-semibold\">\n {activeTab === \"profile\" ? \"Profile details\" : \"Security settings\"}\n </h2>\n {/* <button className=\"text-gray-500 hover:text-gray-700\">\n {renderIcon(X)}\n </button> */}\n </div>\n\n {activeTab === \"profile\" ? (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Profile Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3\">Profile</h3>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center\">\n <Avatar className=\"h-12 w-12 mr-4 border\">\n <AvatarImage src={user.photos?.[0]?.value} alt=\"Profile picture\" />\n <AvatarFallback>{user.displayName?.split(\" \").map((n: string) => n[0]).join(\"\")}</AvatarFallback>\n </Avatar>\n <span className=\"font-medium\">{user.displayName}</span>\n </div>\n {/* <Button variant=\"outline\" size=\"sm\">\n Edit profile\n </Button> */}\n </div>\n </div>\n\n {/* Email Addresses Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3\">Email addresses</h3>\n <div className=\"space-y-2.5\">\n\n {/* {JSON.stringify(user)} */}\n\n {/* {(emails.length > 0 ? emails : [{ address: user.email, isPrimary: true }]).map((email, i) => (\n <div className=\"flex items-center justify-between\" key={email.address}>\n <span>{email.address}</span>\n {email.isPrimary && (\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n )}\n </div>\n ))} */}\n\n {user.emails.map((email: any, idx: number) => (\n <div className=\"flex items-center justify-between\" key={email.value}>\n <span>{email.value}</span>\n {idx === 0 && (\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n )}\n </div>\n ))}\n {/* <Button variant=\"ghost\" size=\"sm\" className=\"flex items-center text-gray-700\">\n {renderIcon(PlusCircle)}\n Add email address\n </Button> */}\n </div>\n </div>\n\n {/* Phone Number Section */}\n {/* <div>\n <h3 className=\"text-sm font-medium mb-3\">Phone number</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <span>+1 (555) 123-4567</span>\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n </div>\n <Button variant=\"ghost\" size=\"sm\" className=\"flex items-center text-gray-700\">\n {renderIcon(PlusCircle)}\n Add phone number\n </Button>\n </div>\n </div> */}\n\n {/* Connected Accounts Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3\">Connected accounts</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\" key={user.provider}>\n <div className=\"flex items-center\">\n <div className=\"mr-2\">\n <span>{user.provider}</span>\n </div>\n </div>\n <span className=\"text-sm text-gray-500\">{user?.emails?.[0]?.value}</span>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Security Settings */}\n <div key=\"two-factor\">\n <h3 className=\"text-sm font-medium mb-3\">Two-factor authentication</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium\">Two-factor authentication</p>\n <p className=\"text-sm text-gray-500\">Add an extra layer of security to your account</p>\n </div>\n <Button variant=\"outline\" size=\"sm\">\n Enable\n </Button>\n </div>\n </div>\n </div>\n\n <div key=\"password\">\n <h3 className=\"text-sm font-medium mb-3\">Password</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium\">Change password</p>\n <p className=\"text-sm text-gray-500\">Last changed 3 months ago</p>\n </div>\n <Button variant=\"outline\" size=\"sm\">\n Change\n </Button>\n </div>\n </div>\n </div>\n\n <div key=\"sessions\">\n <h3 className=\"text-sm font-medium mb-3\">Active sessions</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium\">Current session</p>\n <p className=\"text-sm text-gray-500\">Chrome on Windows • Active now</p>\n </div>\n <Button variant=\"outline\" size=\"sm\">\n Sign out\n </Button>\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* <div className=\"absolute bottom-4 text-xs text-gray-500 flex items-center\">\n Secured by\n <span className=\"ml-1 font-medium flex items-center\">\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"mr-1\"\n >\n <path d=\"M8 0L14.9282 4V12L8 16L1.07179 12V4L8 0Z\" fill=\"#6C47FF\" />\n </svg>\n Authdog\n </span>\n </div> */}\n </div>\n )\n}\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : \"span\"\n\n return (\n <Comp\n data-slot=\"badge\"\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nexport { Badge, badgeVariants }\n","import { CheckCircle2Icon } from \"lucide-react\"\nimport { Alert, AlertDescription, AlertTitle } from \"../../components/ui/alert\"\nimport { IconWrapper } from \"../icons\"\n\ninterface PlaceholderAlertProps {\n title?: string;\n description?: string;\n}\n\nexport const PlaceholderAlert = (props: PlaceholderAlertProps) => {\n const title = props.title ?? \"Placeholder Alert\";\n const description = props.description ?? \"This is a placeholder alert.\";\n\n return ( \n <div className=\"grid w-full max-w-xl items-start gap-4\">\n <Alert>\n <IconWrapper Icon={CheckCircle2Icon} />\n <AlertTitle>{title}</AlertTitle>\n <AlertDescription>\n {description}\n </AlertDescription>\n </Alert>\n </div>\n )\n}\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription }\n","\"use client\"\n\nimport type React from \"react\"\n\nimport { useState, useRef } from \"react\"\nimport { Button } from \"../../components/ui/button\"\nimport { Card, CardContent } from \"../../components/ui/card\"\nimport { Alert, AlertDescription } from \"../../components/ui/alert\"\nimport { Shield, CheckCircle, AlertCircle } from \"lucide-react\"\n\ninterface TOTPValidatorProps {\n onValidate: (code: string) => Promise<void>;\n}\n\nexport const TOTPValidator = (\n {\n onValidate\n }: TOTPValidatorProps\n) => {\n const [code, setCode] = useState([\"\", \"\", \"\", \"\", \"\", \"\"])\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState(\"\")\n const [success, setSuccess] = useState(false)\n const inputRefs = useRef<(HTMLInputElement | null)[]>([])\n\n const handleInputChange = (index: number, value: string) => {\n // Only allow digits\n if (!/^\\d*$/.test(value)) return\n\n const newCode = [...code]\n newCode[index] = value.slice(-1) // Only take the last character\n\n setCode(newCode)\n setError(\"\")\n setSuccess(false)\n\n // Auto-focus next input\n if (value && index < 5) {\n inputRefs.current[index + 1]?.focus()\n }\n }\n\n const handleKeyDown = (index: number, e: React.KeyboardEvent) => {\n // Handle backspace\n if (e.key === \"Backspace\" && !code[index] && index > 0) {\n inputRefs.current[index - 1]?.focus()\n }\n\n // Handle paste\n if (e.key === \"v\" && (e.ctrlKey || e.metaKey)) {\n e.preventDefault()\n navigator.clipboard.readText().then((text) => {\n const digits = text.replace(/\\D/g, \"\").slice(0, 6).split(\"\")\n const newCode = [...code]\n digits.forEach((digit, i) => {\n if (i < 6) newCode[i] = digit\n })\n setCode(newCode)\n\n // Focus the next empty input or the last one\n const nextIndex = Math.min(digits.length, 5)\n inputRefs.current[nextIndex]?.focus()\n })\n }\n }\n\n const validateTOTP = async () => {\n const totpCode = code.join(\"\")\n\n if (totpCode.length !== 6) {\n setError(\"Please enter all 6 digits\")\n return\n }\n\n setLoading(true)\n setError(\"\")\n\n try {\n await onValidate(totpCode)\n setSuccess(true)\n } catch (error) {\n setError(\"Invalid TOTP code. Please try again.\")\n } finally {\n setLoading(false)\n }\n\n\n\n // try {\n // Call your TOTP validation endpoint\n // const response = await fetch(\"/api/validate-totp\", {\n // method: \"POST\",\n // headers: {\n // \"Content-Type\": \"application/json\",\n // },\n // body: JSON.stringify({ code: totpCode }),\n // })\n\n // // Check if response is JSON\n // const contentType = response.headers.get(\"content-type\")\n // if (!contentType || !contentType.includes(\"application/json\")) {\n // throw new Error(\"Server returned non-JSON response\")\n // }\n\n // const result = await response.json()\n\n // if (response.ok && result.valid) {\n // setSuccess(true)\n // setError(\"\")\n // } else {\n // setError(result.message || \"Invalid TOTP code. Please try again.\")\n // // Clear the code on error\n // setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n // inputRefs.current[0]?.focus()\n // }\n // } catch (err) {\n // console.error(\"TOTP validation error:\", err)\n // if (err instanceof Error && err.message.includes(\"non-JSON\")) {\n // setError(\"Server error. Please try again later.\")\n // } else {\n // setError(\"Network error. Please try again.\")\n // }\n // // Clear the code on error\n // setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n // inputRefs.current[0]?.focus()\n // } finally {\n // setLoading(false)\n // }\n }\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault()\n validateTOTP()\n }\n\n const clearCode = () => {\n setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n setError(\"\")\n setSuccess(false)\n setLoading(false)\n inputRefs.current[0]?.focus()\n }\n\n if (success) {\n return (\n <div className=\"max-w-md mx-auto\">\n <Card className=\"border-green-200 bg-green-50\">\n <CardContent className=\"pt-6\">\n <div className=\"text-center space-y-4\">\n <div className=\"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center\">\n <CheckCircle className=\"w-8 h-8 text-green-600\" />\n </div>\n <div>\n <h3 className=\"text-lg font-semibold text-green-900\">Verification Successful!</h3>\n <p className=\"text-sm text-green-700 mt-1\">Your TOTP code has been validated.</p>\n </div>\n <Button onClick={clearCode} variant=\"outline\" className=\"bg-white\">\n Verify Another Code\n </Button>\n </div>\n </CardContent>\n </Card>\n </div>\n )\n }\n\n return (\n <div className=\"max-w-md mx-auto\">\n <Card>\n <CardContent className=\"pt-6\">\n <div className=\"text-center space-y-6\">\n <div>\n <div className=\"mx-auto w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4\">\n <Shield className=\"w-6 h-6 text-blue-600\" />\n </div>\n <h3 className=\"text-lg font-semibold\">Enter Verification Code</h3>\n <p className=\"text-sm text-muted-foreground mt-1\">Enter the 6-digit code from your authenticator app</p>\n </div>\n\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <div className=\"flex justify-center gap-2\">\n {code.map((digit, index) => (\n <Card key={index} className=\"w-12 h-14 border-2 focus-within:border-blue-500 transition-colors\">\n <CardContent className=\"p-0 h-full flex items-center justify-center\">\n <input\n ref={(el) => {\n inputRefs.current[index] = el\n }}\n type=\"tel\"\n inputMode=\"numeric\"\n maxLength={1}\n value={digit}\n onChange={(e) => handleInputChange(index, e.target.value)}\n onKeyDown={(e) => handleKeyDown(index, e)}\n className=\"w-full h-full text-center text-2xl font-bold border-none outline-none bg-transparent\"\n autoComplete=\"one-time-code\"\n disabled={loading}\n style={{\n height: 'auto'\n }}\n />\n </CardContent>\n </Card>\n ))}\n </div>\n\n {error && (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n\n <div className=\"space-y-3\">\n <Button type=\"submit\" className=\"w-full\" disabled={loading || code.some((digit) => digit === \"\")}>\n {loading ? \"Verifying...\" : \"Verify Code\"}\n </Button>\n\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={clearCode} className=\"w-full text-xs\">\n Clear Code\n </Button>\n </div>\n </form>\n\n <p className=\"text-xs text-muted-foreground\">Codes refresh every 30 seconds</p>\n </div>\n </CardContent>\n </Card>\n </div>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n"],"mappings":";ykBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,EAAA,eAAAC,GAAA,WAAAC,GAAA,qBAAAC,GAAA,kBAAAC,GAAA,gBAAAC,KAAA,eAAAC,GAAAR,ICAA,IAAAS,GAAuB,oBACvBC,GAAqB,gCACrBC,GAAuC,oCCFvC,IAAAC,GAAsC,gBACtCC,GAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,eAAQ,SAAKA,CAAM,CAAC,CAC7B,CDwCM,IAAAC,GAAA,6BAvCAC,MAAiB,QACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAA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,UAAU,oEAC1B,mBAACC,EAAA,CAAY,UAAU,8CACrB,mBAAC,SACC,IAAME,GAAO,CACXnB,EAAU,QAAQE,CAAK,EAAIiB,CAC7B,EACA,KAAK,MACL,UAAU,UACV,UAAW,EACX,MAAOV,EACP,SAAWH,GAAML,EAAkBC,EAAOI,EAAE,OAAO,KAAK,EACxD,UAAYA,GAAMD,EAAcH,EAAOI,CAAC,EACxC,UAAU,uFACV,aAAa,gBACb,SAAUZ,EACV,MAAO,CACH,OAAQ,MACZ,EACF,EACF,GAnBSQ,CAoBX,CACD,EACH,EAECN,MACC,QAACwB,EAAA,CAAM,QAAQ,cACb,oBAAC,eAAY,UAAU,UAAU,KACjC,OAACC,EAAA,CAAkB,SAAAzB,EAAM,GAC3B,KAGF,QAAC,OAAI,UAAU,YACb,oBAACsB,EAAA,CAAO,KAAK,SAAS,UAAU,SAAS,SAAUxB,GAAWF,EAAK,KAAMiB,GAAUA,IAAU,EAAE,EAC5F,SAAAf,EAAU,eAAiB,cAC9B,KAEA,OAACwB,EAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,KAAK,KAAK,QAASH,EAAW,UAAU,iBAAiB,sBAE/F,GACF,GACF,KAEA,OAAC,KAAE,UAAU,gCAAgC,0CAA8B,GAC7E,EACF,EACF,EACF,CAEJ","names":["index_exports","__export","Button","ClientOnly","Navbar","PlaceholderAlert","TOTPValidator","UserProfile","__toCommonJS","React","import_react_slot","import_class_variance_authority","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","buttonVariants","Button","className","variant","size","asChild","props","ref","cn","import_react","import_jsx_runtime","ClientOnly","children","mounted","setMounted","import_react","import_lucide_react","AvatarPrimitive","import_jsx_runtime","Avatar","className","props","cn","AvatarImage","AvatarFallback","DropdownMenuPrimitive","import_lucide_react","import_jsx_runtime","DropdownMenu","props","DropdownMenuTrigger","props","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuLabel","className","inset","props","cn","DropdownMenuSeparator","SheetPrimitive","import_lucide_react","import_jsx_runtime","XIcon","Sheet","props","SheetTrigger","SheetPortal","props","SheetOverlay","className","cn","SheetContent","children","side","XIcon","import_react","import_jsx_runtime","iconProps","renderIcon","Icon","isMounted","setIsMounted","IconWrapper","import_jsx_runtime","Navbar","items","children","className","logoText","user","onNavigateHome","onNavItemClick","href","onProfileSelected","onLogout","isLoading","identityHost","environmentId","open","setOpen","isAuthenticated","cn","item","index","DropdownMenu","DropdownMenuTrigger","Button","Avatar","AvatarImage","AvatarFallback","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuGroup","DropdownMenuItem","IconWrapper","signinUrl","Sheet","SheetTrigger","SheetContent","import_react","import_react_slot","import_class_variance_authority","import_jsx_runtime","badgeVariants","Badge","className","variant","asChild","props","cn","import_lucide_react","import_jsx_runtime","UserProfile","loading","user","handleAuthenticated","isMounted","setIsMounted","activeTab","setActiveTab","iconProps","renderIcon","Icon","Avatar","AvatarImage","AvatarFallback","n","email","idx","Badge","Button","import_lucide_react","import_class_variance_authority","import_jsx_runtime","alertVariants","Alert","className","variant","props","cn","AlertTitle","AlertDescription","import_jsx_runtime","PlaceholderAlert","props","title","description","Alert","IconWrapper","AlertTitle","AlertDescription","import_react","import_jsx_runtime","Card","className","props","cn","CardContent","className","props","cn","import_lucide_react","import_jsx_runtime","TOTPValidator","onValidate","code","setCode","loading","setLoading","error","setError","success","setSuccess","inputRefs","handleInputChange","index","value","newCode","handleKeyDown","e","text","digits","digit","i","nextIndex","validateTOTP","totpCode","handleSubmit","clearCode","Card","CardContent","Button","el","Alert","AlertDescription"]}
|
|
1
|
+
{"version":3,"sources":["../src/index.ts","../src/components/ui/button.tsx","../src/lib/utils.ts","../src/components/core/client-only.tsx","../src/components/core/navbar.tsx","../src/components/ui/avatar.tsx","../src/components/ui/dropdown-menu.tsx","../src/components/ui/sheet.tsx","../src/components/icons.tsx","../src/components/core/user-profile.tsx","../src/components/ui/badge.tsx","../src/components/core/placeholder-alert.tsx","../src/components/ui/alert.tsx","../src/components/flow/totp-validator.tsx","../src/components/ui/card.tsx"],"sourcesContent":["export {Button} from \"./components/ui/button\";\nexport { ClientOnly } from \"./components/core/client-only\";\nexport {Navbar} from \"./components/core/navbar\";\nexport {UserProfile} from \"./components/core/user-profile\";\nexport {PlaceholderAlert} from \"./components/core/placeholder-alert\";\nexport {TOTPValidator} from \"./components/flow/totp-validator\";","import * as React from \"react\";\nimport { Slot } from \"@radix-ui/react-slot\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\n\nimport { cn } from \"../../lib/utils\";\n\nconst buttonVariants = cva(\n \"inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50\",\n {\n variants: {\n variant: {\n default: \"bg-primary text-primary-foreground hover:bg-primary/90\",\n destructive:\n \"bg-destructive text-destructive-foreground hover:bg-destructive/90\",\n outline:\n \"border border-input bg-background hover:bg-accent hover:text-accent-foreground\",\n secondary:\n \"bg-secondary text-secondary-foreground hover:bg-secondary/80\",\n ghost: \"hover:bg-accent hover:text-accent-foreground\",\n link: \"text-primary underline-offset-4 hover:underline\",\n },\n size: {\n default: \"h-10 px-4 py-2\",\n sm: \"h-9 rounded-md px-3\",\n lg: \"h-11 rounded-md px-8\",\n icon: \"h-10 w-10\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n size: \"default\",\n },\n },\n);\n\nexport interface ButtonProps\n extends React.ButtonHTMLAttributes<HTMLButtonElement>,\n VariantProps<typeof buttonVariants> {\n asChild?: boolean;\n}\n\nconst Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n ({ className, variant, size, asChild = false, ...props }, ref) => {\n const Comp = asChild ? Slot : \"button\";\n return (\n <Comp\n className={cn(buttonVariants({ variant, size, className }))}\n ref={ref}\n {...props}\n />\n );\n },\n);\nButton.displayName = \"Button\";\n\nexport { Button, buttonVariants };\n","import { type ClassValue, clsx } from \"clsx\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function cn(...inputs: ClassValue[]) {\n return twMerge(clsx(inputs));\n}\n","import {\n useEffect,\n useState,\n type ReactNode,\n} from \"react\";\n\nexport const ClientOnly = ({ children }: { children: ReactNode }) => {\n const [mounted, setMounted] = useState(false);\n\n useEffect(() => {\n setMounted(true);\n }, []);\n\n if (!mounted) {\n return null;\n }\n \n return <>{children}</>;\n }\n ","\"use client\"\n\nimport type React from \"react\"\nimport { useState } from \"react\"\nimport { User, LogOut, Menu } from \"lucide-react\"\n\nimport { cn } from \"../../lib/utils\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"../../components/ui/avatar\"\nimport { Button } from \"../../components/ui/button\"\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuSeparator,\n DropdownMenuTrigger,\n} from \"../../components/ui/dropdown-menu\"\nimport { Sheet, SheetContent, SheetTrigger } from \"../../components/ui/sheet\"\nimport { IconWrapper } from \"../icons\"\n\ninterface NavItem {\n title: string\n href: string\n disabled?: boolean\n}\n\ninterface NavbarProps {\n items?: NavItem[] | undefined;\n children?: React.ReactNode\n className?: string\n logoText?: string\n isLoading?: boolean\n user?: any;\n onNavigateHome?: () => void;\n onNavItemClick?: (href: string) => void;\n onProfileSelected?: () => void;\n onLogout?: () => void;\n // signinUrl?: string;\n identityHost?: string;\n environmentId?: string;\n}\n\nexport function Navbar({\n items = [\n // { title: \"Dashboard\", href: \"/dashboard\" },\n ],\n children,\n className,\n logoText = \"ACME Corp\",\n user = {\n name: \"John Doe\",\n email: \"john@example.com\",\n image: \"https://i.pravatar.cc/150?u=a042581f4e29026704d\",\n },\n onNavigateHome = () => console.log(\"Navigating to home\"),\n onNavItemClick = (href: string) => console.log(`Navigating to ${href}`),\n onProfileSelected,\n onLogout = () => console.log(\"Logout clicked\"),\n isLoading = false,\n identityHost = \"https://stg-id.authdog.xyz\",\n environmentId = \"58be35b0-708f-49f6-84f0-6695d307d997\",\n}: NavbarProps) {\n const [open, setOpen] = useState(false)\n const isAuthenticated = user !== null && user !== undefined && user.id !== null && user.id !== undefined;\n return (\n <header className={cn(\"border-b bg-background\", className)}>\n <div className=\"container flex h-16 items-center justify-between px-4 md:px-6\">\n <div className=\"flex items-center gap-4\">\n <span className=\"text-xl font-bold cursor-pointer\" onClick={onNavigateHome}>{logoText}</span>\n <nav className=\"hidden md:flex gap-6\">\n {items?.map((item, index) => (\n <span\n key={index}\n onClick={() => {\n if (!item.disabled) {\n onNavItemClick(item.href)\n }\n }}\n className={cn(\n \"text-sm font-medium transition-colors hover:text-primary cursor-pointer\",\n item.disabled && \"cursor-not-allowed opacity-80\"\n )}\n >\n {item.title}\n </span>\n ))}\n </nav>\n </div>\n <div className=\"flex items-center gap-4\">\n {children}\n\n {\n isAuthenticated ? (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button variant=\"ghost\" className=\"relative h-8 w-8 rounded-full\" disabled={isLoading}>\n <Avatar className=\"h-8 w-8\">\n {isLoading ? (\n <div className=\"h-8 w-8 animate-pulse bg-muted rounded-full\" />\n ) : (\n <>\n <AvatarImage src={user.photos?.[0]?.value || \"/placeholder.svg\"} alt={user.displayName} />\n <AvatarFallback>{user.displayName?.charAt(0)}</AvatarFallback>\n </>\n )}\n </Avatar>\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent className=\"w-56\" align=\"end\" forceMount>\n {isLoading ? (\n <div className=\"p-4\">\n <div className=\"h-4 w-3/4 animate-pulse bg-muted rounded mb-2\" />\n <div className=\"h-3 w-1/2 animate-pulse bg-muted rounded\" />\n </div>\n ) : (\n <>\n <DropdownMenuLabel className=\"font-normal\">\n <div className=\"flex flex-col space-y-1\">\n <p className=\"text-sm font-medium leading-none\">{user.displayName}</p>\n <p className=\"text-xs leading-none text-muted-foreground\">{user.emails?.[0]?.value}</p>\n </div>\n </DropdownMenuLabel>\n <DropdownMenuSeparator />\n <DropdownMenuGroup>\n <DropdownMenuItem onClick={onProfileSelected}>\n <IconWrapper Icon={User} />\n <span>Profile</span>\n </DropdownMenuItem>\n </DropdownMenuGroup>\n <DropdownMenuSeparator />\n <DropdownMenuItem onClick={onLogout}>\n <IconWrapper Icon={LogOut} />\n <span>Log out</span>\n </DropdownMenuItem>\n </>\n )}\n </DropdownMenuContent>\n </DropdownMenu>\n )\n \n : (\n <Button variant=\"default\" aria-label=\"Sign in\" onClick={() => {\n if (!environmentId) {\n throw new Error(\"Environment ID is required\");\n }\n\n if (!identityHost) {\n throw new Error(\"Identity Host is required\");\n }\n \n const signinUrl = `${identityHost}/signin/${environmentId}`;\n window.open(signinUrl, \"_blank\");\n }}>\n Sign in\n </Button>\n )\n }\n \n <Sheet open={open} onOpenChange={setOpen}>\n <SheetTrigger asChild>\n <Button variant=\"ghost\" size=\"icon\" className=\"md:hidden\" aria-label=\"Open Menu\">\n <IconWrapper Icon={Menu} />\n </Button>\n </SheetTrigger>\n <SheetContent side=\"left\" className=\"pr-0\">\n <nav className=\"grid gap-2 py-6\">\n {items?.map((item, index) => (\n <a\n key={index}\n href={item.href}\n className={cn(\n \"flex w-full items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent\",\n item.disabled && \"cursor-not-allowed opacity-80\"\n )}\n onClick={() => setOpen(false)}\n >\n {item.title}\n </a>\n ))}\n </nav>\n </SheetContent>\n </Sheet>\n </div>\n </div>\n </header>\n )\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as AvatarPrimitive from \"@radix-ui/react-avatar\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nfunction Avatar({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Root>) {\n return (\n <AvatarPrimitive.Root\n data-slot=\"avatar\"\n className={cn(\n \"relative flex size-8 shrink-0 overflow-hidden rounded-full\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AvatarImage({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Image>) {\n return (\n <AvatarPrimitive.Image\n data-slot=\"avatar-image\"\n className={cn(\"aspect-square size-full\", className)}\n {...props}\n />\n )\n}\n\nfunction AvatarFallback({\n className,\n ...props\n}: React.ComponentProps<typeof AvatarPrimitive.Fallback>) {\n return (\n <AvatarPrimitive.Fallback\n data-slot=\"avatar-fallback\"\n className={cn(\n \"bg-muted flex size-full items-center justify-center rounded-full\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Avatar, AvatarImage, AvatarFallback }\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as DropdownMenuPrimitive from \"@radix-ui/react-dropdown-menu\"\nimport { Check, ChevronRight, Circle } from \"lucide-react\"\nimport type { ComponentType } from \"react\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nconst CheckIcon = Check as ComponentType<React.SVGProps<SVGSVGElement>>\nconst CircleIcon = Circle as ComponentType<React.SVGProps<SVGSVGElement>>\nconst ChevronRightIcon = ChevronRight as ComponentType<React.SVGProps<SVGSVGElement>>\n\nfunction DropdownMenu({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>) {\n return (\n <DropdownMenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n )\n}\n\nfunction DropdownMenuTrigger({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return (\n <DropdownMenuPrimitive.Trigger\n data-slot=\"dropdown-menu-trigger\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuContent({\n className,\n sideOffset = 4,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n sideOffset={sideOffset}\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md\",\n className\n )}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return (\n <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Item> & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CheckIcon className=\"size-4\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return (\n <DropdownMenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.RadioItem>) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground relative flex cursor-default items-center gap-2 rounded-sm py-1.5 pr-2 pl-8 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span className=\"pointer-events-none absolute left-2 flex size-3.5 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>\n <CircleIcon className=\"size-2 fill-current\" />\n </DropdownMenuPrimitive.ItemIndicator>\n </span>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Label> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-2 py-1.5 text-sm font-medium data-[inset]:pl-8\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"bg-border -mx-1 my-1 h-px\", className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"text-muted-foreground ml-auto text-xs tracking-widest\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubTrigger> & {\n inset?: boolean\n}) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground flex cursor-default items-center rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[inset]:pl-8\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto size-4\" />\n </DropdownMenuPrimitive.SubTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\n \"bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-hidden rounded-md border p-1 shadow-lg\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n","\"use client\"\n\nimport * as React from \"react\"\nimport * as SheetPrimitive from \"@radix-ui/react-dialog\"\nimport { X } from \"lucide-react\"\nimport type { ComponentType } from \"react\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nconst XIcon = X as ComponentType<React.SVGProps<SVGSVGElement>>\n\nfunction Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>) {\n return <SheetPrimitive.Root data-slot=\"sheet\" {...props} />\n}\n\nfunction SheetTrigger({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Trigger>) {\n return <SheetPrimitive.Trigger data-slot=\"sheet-trigger\" {...props} />\n}\n\nfunction SheetClose({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Close>) {\n return <SheetPrimitive.Close data-slot=\"sheet-close\" {...props} />\n}\n\nfunction SheetPortal({\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Portal>) {\n return <SheetPrimitive.Portal data-slot=\"sheet-portal\" {...props} />\n}\n\nfunction SheetOverlay({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Overlay>) {\n return (\n <SheetPrimitive.Overlay\n data-slot=\"sheet-overlay\"\n className={cn(\n \"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction SheetContent({\n className,\n children,\n side = \"right\",\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Content> & {\n side?: \"top\" | \"right\" | \"bottom\" | \"left\"\n}) {\n return (\n <SheetPortal>\n <SheetOverlay />\n <SheetPrimitive.Content\n data-slot=\"sheet-content\"\n className={cn(\n \"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500\",\n side === \"right\" &&\n \"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm\",\n side === \"left\" &&\n \"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm\",\n side === \"top\" &&\n \"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b\",\n side === \"bottom\" &&\n \"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t\",\n className\n )}\n {...props}\n >\n {children}\n <SheetPrimitive.Close className=\"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none\">\n <XIcon className=\"size-4\" />\n <span className=\"sr-only\">Close</span>\n </SheetPrimitive.Close>\n </SheetPrimitive.Content>\n </SheetPortal>\n )\n}\n\nfunction SheetHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-header\"\n className={cn(\"flex flex-col gap-1.5 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"sheet-footer\"\n className={cn(\"mt-auto flex flex-col gap-2 p-4\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetTitle({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Title>) {\n return (\n <SheetPrimitive.Title\n data-slot=\"sheet-title\"\n className={cn(\"text-foreground font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction SheetDescription({\n className,\n ...props\n}: React.ComponentProps<typeof SheetPrimitive.Description>) {\n return (\n <SheetPrimitive.Description\n data-slot=\"sheet-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Sheet,\n SheetTrigger,\n SheetClose,\n SheetContent,\n SheetHeader,\n SheetFooter,\n SheetTitle,\n SheetDescription,\n}\n","import { LucideProps } from \"lucide-react\"\nimport { useEffect, useState } from \"react\"\n\nconst iconProps: LucideProps = {\n className: \"mr-2 h-4 w-4\",\n \"aria-hidden\": \"true\"\n}\n\nexport const renderIcon = ((Icon: any) => {\n const [isMounted, setIsMounted] = useState(false)\n\n useEffect(() => {\n setIsMounted(true)\n }, [])\n\n if (!isMounted) {\n return <span className=\"mr-2 h-4 w-4\" aria-hidden=\"true\" />\n }\n\n return <Icon {...iconProps} />\n}) as React.FC<{\n Icon: any\n}>\n\nexport const IconWrapper = ({ Icon }: { Icon: any }) => {\n return (\n <span className=\"inline-flex items-center justify-center\">\n {renderIcon(Icon)}\n </span>\n )\n}","\"use client\"\n\nimport { useEffect, useState } from \"react\"\nimport { Avatar, AvatarFallback, AvatarImage } from \"../../components/ui/avatar\"\nimport { Button } from \"../../components/ui/button\"\nimport { Badge } from \"../../components/ui/badge\"\nimport { User, LucideProps } from \"lucide-react\"\n\nexport interface UserProfileProps {\n loading: boolean;\n user: any;\n emails?: { address: string; isPrimary?: boolean }[];\n handleAuthenticated?: () => void;\n}\n\nexport const UserProfile = ({\n loading,\n user,\n handleAuthenticated\n}: UserProfileProps) => {\n const [isMounted, setIsMounted] = useState(false)\n const [activeTab, setActiveTab] = useState<\"profile\" | \"security\">(\"profile\");\n\n useEffect(() => {\n setIsMounted(true);\n }, []);\n\n useEffect(() => {\n if (!loading && handleAuthenticated) {\n handleAuthenticated();\n }\n }, [loading, user, handleAuthenticated]);\n\n const iconProps: LucideProps = {\n className: \"mr-2 h-4 w-4\",\n \"aria-hidden\": \"true\"\n }\n\n const renderIcon = (Icon: any) => {\n if (!isMounted) return null\n return <Icon {...iconProps} />\n }\n\n if (!isMounted || loading) {\n return <div>Loading...</div>\n }\n\n if (!user) {\n return <div>No user</div>\n }\n \n return (\n <div className=\"grid grid-cols-[14rem,1fr] w-full bg-transparent\">\n <div className=\"h-full border-r p-3 md:p-4 bg-transparent flex flex-col min-w-0\">\n <div className=\"mb-3 md:mb-4\">\n <h1 className=\"text-xl font-bold text-gray-900 dark:text-gray-100\">Account</h1>\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">Manage your account info.</p>\n </div>\n\n <nav className=\"space-y-1 flex-1\">\n <button\n onClick={() => setActiveTab(\"profile\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"profile\"\n ? \"bg-gray-100 text-gray-900 dark:bg-gray-800 dark:text-gray-100\"\n : \"text-gray-700 hover:bg-gray-50 dark:text-gray-300 dark:hover:bg-gray-800\"\n }`}\n >\n {renderIcon(User)}\n Profile\n </button>\n {/* <button\n onClick={() => setActiveTab(\"security\")}\n className={`flex items-center w-full px-3 py-2 text-sm rounded-md ${\n activeTab === \"security\" ? \"bg-gray-100 text-gray-900\" : \"text-gray-700 hover:bg-gray-50\"\n }`}\n >\n {renderIcon(Shield)}\n Security\n </button> */}\n </nav>\n </div>\n\n <div className=\"h-full p-3 md:p-5 min-w-0 bg-transparent\">\n <div className=\"flex justify-between items-center mb-3 md:mb-4\">\n <h2 className=\"text-xl font-semibold text-gray-900 dark:text-gray-100\">\n {activeTab === \"profile\" ? \"Profile details\" : \"Security settings\"}\n </h2>\n {/* <button className=\"text-gray-500 hover:text-gray-700\">\n {renderIcon(X)}\n </button> */}\n </div>\n\n {activeTab === \"profile\" ? (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Profile Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">Profile</h3>\n <div className=\"flex items-center justify-between\">\n <div className=\"flex items-center\">\n <Avatar className=\"h-12 w-12 mr-4 border\">\n <AvatarImage src={user.photos?.[0]?.value} alt=\"Profile picture\" />\n <AvatarFallback>{user.displayName?.split(\" \").map((n: string) => n[0]).join(\"\")}</AvatarFallback>\n </Avatar>\n <span className=\"font-medium text-gray-900 dark:text-gray-100\">{user.displayName}</span>\n </div>\n {/* <Button variant=\"outline\" size=\"sm\">\n Edit profile\n </Button> */}\n </div>\n </div>\n\n {/* Email Addresses Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">Email addresses</h3>\n <div className=\"space-y-2.5\">\n\n {/* {JSON.stringify(user)} */}\n\n {/* {(emails.length > 0 ? emails : [{ address: user.email, isPrimary: true }]).map((email, i) => (\n <div className=\"flex items-center justify-between\" key={email.address}>\n <span>{email.address}</span>\n {email.isPrimary && (\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n )}\n </div>\n ))} */}\n\n {user.emails.map((email: any, idx: number) => (\n <div className=\"flex items-center justify-between\" key={email.value}>\n <span className=\"text-gray-900 dark:text-gray-100\">{email.value}</span>\n {idx === 0 && (\n <Badge\n variant=\"outline\"\n className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100 dark:bg-gray-800 dark:text-gray-300 dark:hover:bg-gray-800\"\n >\n Primary\n </Badge>\n )}\n </div>\n ))}\n {/* <Button variant=\"ghost\" size=\"sm\" className=\"flex items-center text-gray-700\">\n {renderIcon(PlusCircle)}\n Add email address\n </Button> */}\n </div>\n </div>\n\n {/* Phone Number Section */}\n {/* <div>\n <h3 className=\"text-sm font-medium mb-3\">Phone number</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <span>+1 (555) 123-4567</span>\n <Badge variant=\"outline\" className=\"text-xs bg-gray-100 text-gray-700 hover:bg-gray-100\">\n Primary\n </Badge>\n </div>\n <Button variant=\"ghost\" size=\"sm\" className=\"flex items-center text-gray-700\">\n {renderIcon(PlusCircle)}\n Add phone number\n </Button>\n </div>\n </div> */}\n\n {/* Connected Accounts Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">Connected accounts</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\" key={user.provider}>\n <div className=\"flex items-center\">\n <div className=\"mr-2\">\n <span className=\"text-gray-900 dark:text-gray-100\">{user.provider}</span>\n </div>\n </div>\n <span className=\"text-sm text-gray-500 dark:text-gray-400\">{user?.emails?.[0]?.value}</span>\n </div>\n </div>\n </div>\n </div>\n ) : (\n <div className=\"space-y-5 md:space-y-6\">\n {/* Security Settings */}\n <div key=\"two-factor\">\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">Two-factor authentication</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium text-gray-900 dark:text-gray-100\">Two-factor authentication</p>\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">Add an extra layer of security to your account</p>\n </div>\n <Button variant=\"outline\" size=\"sm\">\n Enable\n </Button>\n </div>\n </div>\n </div>\n\n <div key=\"password\">\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">Password</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium text-gray-900 dark:text-gray-100\">Change password</p>\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">Last changed 3 months ago</p>\n </div>\n <Button variant=\"outline\" size=\"sm\">\n Change\n </Button>\n </div>\n </div>\n </div>\n\n <div key=\"sessions\">\n <h3 className=\"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100\">Active sessions</h3>\n <div className=\"space-y-2.5\">\n <div className=\"flex items-center justify-between\">\n <div>\n <p className=\"font-medium text-gray-900 dark:text-gray-100\">Current session</p>\n <p className=\"text-sm text-gray-500 dark:text-gray-400\">Chrome on Windows • Active now</p>\n </div>\n <Button variant=\"outline\" size=\"sm\">\n Sign out\n </Button>\n </div>\n </div>\n </div>\n </div>\n )}\n </div>\n\n {/* <div className=\"absolute bottom-4 text-xs text-gray-500 flex items-center\">\n Secured by\n <span className=\"ml-1 font-medium flex items-center\">\n <svg\n width=\"14\"\n height=\"14\"\n viewBox=\"0 0 16 16\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n className=\"mr-1\"\n >\n <path d=\"M8 0L14.9282 4V12L8 16L1.07179 12V4L8 0Z\" fill=\"#6C47FF\" />\n </svg>\n Authdog\n </span>\n </div> */}\n </div>\n )\n}\n","import * as React from \"react\"\nimport { Slot } from \"@radix-ui/react-slot\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nconst badgeVariants = cva(\n \"inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden\",\n {\n variants: {\n variant: {\n default:\n \"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90\",\n secondary:\n \"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90\",\n destructive:\n \"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60\",\n outline:\n \"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction Badge({\n className,\n variant,\n asChild = false,\n ...props\n}: React.ComponentProps<\"span\"> &\n VariantProps<typeof badgeVariants> & { asChild?: boolean }) {\n const Comp = asChild ? Slot : \"span\"\n\n return (\n <Comp\n data-slot=\"badge\"\n className={cn(badgeVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nexport { Badge, badgeVariants }\n","import { CheckCircle2Icon } from \"lucide-react\"\nimport { Alert, AlertDescription, AlertTitle } from \"../../components/ui/alert\"\nimport { IconWrapper } from \"../icons\"\n\ninterface PlaceholderAlertProps {\n title?: string;\n description?: string;\n}\n\nexport const PlaceholderAlert = (props: PlaceholderAlertProps) => {\n const title = props.title ?? \"Placeholder Alert\";\n const description = props.description ?? \"This is a placeholder alert.\";\n\n return ( \n <div className=\"grid w-full max-w-xl items-start gap-4\">\n <Alert>\n <IconWrapper Icon={CheckCircle2Icon} />\n <AlertTitle>{title}</AlertTitle>\n <AlertDescription>\n {description}\n </AlertDescription>\n </Alert>\n </div>\n )\n}\n","import * as React from \"react\"\nimport { cva, type VariantProps } from \"class-variance-authority\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nconst alertVariants = cva(\n \"relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current\",\n {\n variants: {\n variant: {\n default: \"bg-card text-card-foreground\",\n destructive:\n \"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90\",\n },\n },\n defaultVariants: {\n variant: \"default\",\n },\n }\n)\n\nfunction Alert({\n className,\n variant,\n ...props\n}: React.ComponentProps<\"div\"> & VariantProps<typeof alertVariants>) {\n return (\n <div\n data-slot=\"alert\"\n role=\"alert\"\n className={cn(alertVariants({ variant }), className)}\n {...props}\n />\n )\n}\n\nfunction AlertTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-title\"\n className={cn(\n \"col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction AlertDescription({\n className,\n ...props\n}: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"alert-description\"\n className={cn(\n \"text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport { Alert, AlertTitle, AlertDescription }\n","\"use client\"\n\nimport type React from \"react\"\n\nimport { useState, useRef } from \"react\"\nimport { Button } from \"../../components/ui/button\"\nimport { Card, CardContent } from \"../../components/ui/card\"\nimport { Alert, AlertDescription } from \"../../components/ui/alert\"\nimport { Shield, CheckCircle, AlertCircle } from \"lucide-react\"\n\ninterface TOTPValidatorProps {\n onValidate: (code: string) => Promise<void>;\n}\n\nexport const TOTPValidator = (\n {\n onValidate\n }: TOTPValidatorProps\n) => {\n const [code, setCode] = useState([\"\", \"\", \"\", \"\", \"\", \"\"])\n const [loading, setLoading] = useState(false)\n const [error, setError] = useState(\"\")\n const [success, setSuccess] = useState(false)\n const inputRefs = useRef<(HTMLInputElement | null)[]>([])\n\n const handleInputChange = (index: number, value: string) => {\n // Only allow digits\n if (!/^\\d*$/.test(value)) return\n\n const newCode = [...code]\n newCode[index] = value.slice(-1) // Only take the last character\n\n setCode(newCode)\n setError(\"\")\n setSuccess(false)\n\n // Auto-focus next input\n if (value && index < 5) {\n inputRefs.current[index + 1]?.focus()\n }\n }\n\n const handleKeyDown = (index: number, e: React.KeyboardEvent) => {\n // Handle backspace\n if (e.key === \"Backspace\" && !code[index] && index > 0) {\n inputRefs.current[index - 1]?.focus()\n }\n\n // Handle paste\n if (e.key === \"v\" && (e.ctrlKey || e.metaKey)) {\n e.preventDefault()\n navigator.clipboard.readText().then((text) => {\n const digits = text.replace(/\\D/g, \"\").slice(0, 6).split(\"\")\n const newCode = [...code]\n digits.forEach((digit, i) => {\n if (i < 6) newCode[i] = digit\n })\n setCode(newCode)\n\n // Focus the next empty input or the last one\n const nextIndex = Math.min(digits.length, 5)\n inputRefs.current[nextIndex]?.focus()\n })\n }\n }\n\n const validateTOTP = async () => {\n const totpCode = code.join(\"\")\n\n if (totpCode.length !== 6) {\n setError(\"Please enter all 6 digits\")\n return\n }\n\n setLoading(true)\n setError(\"\")\n\n try {\n await onValidate(totpCode)\n setSuccess(true)\n } catch (error) {\n setError(\"Invalid TOTP code. Please try again.\")\n } finally {\n setLoading(false)\n }\n\n\n\n // try {\n // Call your TOTP validation endpoint\n // const response = await fetch(\"/api/validate-totp\", {\n // method: \"POST\",\n // headers: {\n // \"Content-Type\": \"application/json\",\n // },\n // body: JSON.stringify({ code: totpCode }),\n // })\n\n // // Check if response is JSON\n // const contentType = response.headers.get(\"content-type\")\n // if (!contentType || !contentType.includes(\"application/json\")) {\n // throw new Error(\"Server returned non-JSON response\")\n // }\n\n // const result = await response.json()\n\n // if (response.ok && result.valid) {\n // setSuccess(true)\n // setError(\"\")\n // } else {\n // setError(result.message || \"Invalid TOTP code. Please try again.\")\n // // Clear the code on error\n // setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n // inputRefs.current[0]?.focus()\n // }\n // } catch (err) {\n // console.error(\"TOTP validation error:\", err)\n // if (err instanceof Error && err.message.includes(\"non-JSON\")) {\n // setError(\"Server error. Please try again later.\")\n // } else {\n // setError(\"Network error. Please try again.\")\n // }\n // // Clear the code on error\n // setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n // inputRefs.current[0]?.focus()\n // } finally {\n // setLoading(false)\n // }\n }\n\n const handleSubmit = (e: React.FormEvent) => {\n e.preventDefault()\n validateTOTP()\n }\n\n const clearCode = () => {\n setCode([\"\", \"\", \"\", \"\", \"\", \"\"])\n setError(\"\")\n setSuccess(false)\n setLoading(false)\n inputRefs.current[0]?.focus()\n }\n\n if (success) {\n return (\n <div className=\"max-w-md mx-auto\">\n <Card className=\"border-green-200 bg-green-50\">\n <CardContent className=\"pt-6\">\n <div className=\"text-center space-y-4\">\n <div className=\"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center\">\n <CheckCircle className=\"w-8 h-8 text-green-600\" />\n </div>\n <div>\n <h3 className=\"text-lg font-semibold text-green-900\">Verification Successful!</h3>\n <p className=\"text-sm text-green-700 mt-1\">Your TOTP code has been validated.</p>\n </div>\n <Button onClick={clearCode} variant=\"outline\" className=\"bg-white\">\n Verify Another Code\n </Button>\n </div>\n </CardContent>\n </Card>\n </div>\n )\n }\n\n return (\n <div className=\"max-w-md mx-auto\">\n <Card>\n <CardContent className=\"pt-6\">\n <div className=\"text-center space-y-6\">\n <div>\n <div className=\"mx-auto w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4\">\n <Shield className=\"w-6 h-6 text-blue-600\" />\n </div>\n <h3 className=\"text-lg font-semibold\">Enter Verification Code</h3>\n <p className=\"text-sm text-muted-foreground mt-1\">Enter the 6-digit code from your authenticator app</p>\n </div>\n\n <form onSubmit={handleSubmit} className=\"space-y-6\">\n <div className=\"flex justify-center gap-2\">\n {code.map((digit, index) => (\n <Card key={index} className=\"w-12 h-14 border-2 focus-within:border-blue-500 transition-colors\">\n <CardContent className=\"p-0 h-full flex items-center justify-center\">\n <input\n ref={(el) => {\n inputRefs.current[index] = el\n }}\n type=\"tel\"\n inputMode=\"numeric\"\n maxLength={1}\n value={digit}\n onChange={(e) => handleInputChange(index, e.target.value)}\n onKeyDown={(e) => handleKeyDown(index, e)}\n className=\"w-full h-full text-center text-2xl font-bold border-none outline-none bg-transparent\"\n autoComplete=\"one-time-code\"\n disabled={loading}\n style={{\n height: 'auto'\n }}\n />\n </CardContent>\n </Card>\n ))}\n </div>\n\n {error && (\n <Alert variant=\"destructive\">\n <AlertCircle className=\"h-4 w-4\" />\n <AlertDescription>{error}</AlertDescription>\n </Alert>\n )}\n\n <div className=\"space-y-3\">\n <Button type=\"submit\" className=\"w-full\" disabled={loading || code.some((digit) => digit === \"\")}>\n {loading ? \"Verifying...\" : \"Verify Code\"}\n </Button>\n\n <Button type=\"button\" variant=\"ghost\" size=\"sm\" onClick={clearCode} className=\"w-full text-xs\">\n Clear Code\n </Button>\n </div>\n </form>\n\n <p className=\"text-xs text-muted-foreground\">Codes refresh every 30 seconds</p>\n </div>\n </CardContent>\n </Card>\n </div>\n )\n}\n","import * as React from \"react\"\n\nimport { cn } from \"@authdog/react-elements/lib/utils\"\n\nfunction Card({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card\"\n className={cn(\n \"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardHeader({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-header\"\n className={cn(\n \"@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto] [.border-b]:pb-6\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardTitle({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-title\"\n className={cn(\"leading-none font-semibold\", className)}\n {...props}\n />\n )\n}\n\nfunction CardDescription({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-description\"\n className={cn(\"text-muted-foreground text-sm\", className)}\n {...props}\n />\n )\n}\n\nfunction CardAction({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-action\"\n className={cn(\n \"col-start-2 row-span-2 row-start-1 self-start justify-self-end\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction CardContent({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-content\"\n className={cn(\"px-6\", className)}\n {...props}\n />\n )\n}\n\nfunction CardFooter({ className, ...props }: React.ComponentProps<\"div\">) {\n return (\n <div\n data-slot=\"card-footer\"\n className={cn(\"flex items-center px-6 [.border-t]:pt-6\", className)}\n {...props}\n />\n )\n}\n\nexport {\n Card,\n CardHeader,\n CardFooter,\n CardTitle,\n CardAction,\n CardDescription,\n CardContent,\n}\n"],"mappings":";ykBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,EAAA,eAAAC,GAAA,WAAAC,GAAA,qBAAAC,GAAA,kBAAAC,GAAA,gBAAAC,KAAA,eAAAC,GAAAR,ICAA,IAAAS,GAAuB,oBACvBC,GAAqB,gCACrBC,GAAuC,oCCFvC,IAAAC,GAAsC,gBACtCC,GAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,eAAQ,SAAKA,CAAM,CAAC,CAC7B,CDwCM,IAAAC,GAAA,6BAvCAC,MAAiB,QACrB,yRACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,yDACT,YACE,qEACF,QACE,iFACF,UACE,+DACF,MAAO,+CACP,KAAM,iDACR,EACA,KAAM,CACJ,QAAS,iBACT,GAAI,sBACJ,GAAI,uBACJ,KAAM,WACR,CACF,EACA,gBAAiB,CACf,QAAS,UACT,KAAM,SACR,CACF,CACF,EAQMC,EAAe,cACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAGtD,QAFWF,EAAU,QAAO,SAE3B,CACC,UAAWG,EAAGR,GAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,SErDrB,IAAAQ,EAIO,iBAaIC,EAAA,6BAXEC,GAAa,CAAC,CAAE,SAAAC,CAAS,IAA+B,CACjE,GAAM,CAACC,EAASC,CAAU,KAAI,YAAS,EAAK,EAM5C,SAJA,aAAU,IAAM,CACdA,EAAW,EAAI,CACjB,EAAG,CAAC,CAAC,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,OAAI,UAAU,YACb,oBAACsB,EAAA,CAAO,KAAK,SAAS,UAAU,SAAS,SAAUxB,GAAWF,EAAK,KAAMiB,GAAUA,IAAU,EAAE,EAC5F,SAAAf,EAAU,eAAiB,cAC9B,KAEA,OAACwB,EAAA,CAAO,KAAK,SAAS,QAAQ,QAAQ,KAAK,KAAK,QAASH,EAAW,UAAU,iBAAiB,sBAE/F,GACF,GACF,KAEA,OAAC,KAAE,UAAU,gCAAgC,0CAA8B,GAC7E,EACF,EACF,EACF,CAEJ","names":["index_exports","__export","Button","ClientOnly","Navbar","PlaceholderAlert","TOTPValidator","UserProfile","__toCommonJS","React","import_react_slot","import_class_variance_authority","import_clsx","import_tailwind_merge","cn","inputs","import_jsx_runtime","buttonVariants","Button","className","variant","size","asChild","props","ref","cn","import_react","import_jsx_runtime","ClientOnly","children","mounted","setMounted","import_react","import_lucide_react","AvatarPrimitive","import_jsx_runtime","Avatar","className","props","cn","AvatarImage","AvatarFallback","DropdownMenuPrimitive","import_lucide_react","import_jsx_runtime","DropdownMenu","props","DropdownMenuTrigger","props","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuLabel","className","inset","props","cn","DropdownMenuSeparator","SheetPrimitive","import_lucide_react","import_jsx_runtime","XIcon","Sheet","props","SheetTrigger","SheetPortal","props","SheetOverlay","className","cn","SheetContent","children","side","XIcon","import_react","import_jsx_runtime","iconProps","renderIcon","Icon","isMounted","setIsMounted","IconWrapper","import_jsx_runtime","Navbar","items","children","className","logoText","user","onNavigateHome","onNavItemClick","href","onProfileSelected","onLogout","isLoading","identityHost","environmentId","open","setOpen","isAuthenticated","cn","item","index","DropdownMenu","DropdownMenuTrigger","Button","Avatar","AvatarImage","AvatarFallback","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuGroup","DropdownMenuItem","IconWrapper","signinUrl","Sheet","SheetTrigger","SheetContent","import_react","import_react_slot","import_class_variance_authority","import_jsx_runtime","badgeVariants","Badge","className","variant","asChild","props","cn","import_lucide_react","import_jsx_runtime","UserProfile","loading","user","handleAuthenticated","isMounted","setIsMounted","activeTab","setActiveTab","iconProps","renderIcon","Icon","Avatar","AvatarImage","AvatarFallback","n","email","idx","Badge","Button","import_lucide_react","import_class_variance_authority","import_jsx_runtime","alertVariants","Alert","className","variant","props","cn","AlertTitle","AlertDescription","import_jsx_runtime","PlaceholderAlert","props","title","description","Alert","IconWrapper","AlertTitle","AlertDescription","import_react","import_jsx_runtime","Card","className","props","cn","CardContent","className","props","cn","import_lucide_react","import_jsx_runtime","TOTPValidator","onValidate","code","setCode","loading","setLoading","error","setError","success","setSuccess","inputRefs","handleInputChange","index","value","newCode","handleKeyDown","e","text","digits","digit","i","nextIndex","validateTOTP","totpCode","handleSubmit","clearCode","Card","CardContent","Button","el","Alert","AlertDescription"]}
|