@authdog/react-elements 0.0.27 → 0.0.28

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @authdog/react-elements@0.0.27 build /home/runner/work/web-sdk/web-sdk/packages/react-elements
2
+ > @authdog/react-elements@0.0.28 build /home/runner/work/web-sdk/web-sdk/packages/react-elements
3
3
  > pnpm tsup && pnpm build:styles
4
4
 
5
5
  CLI 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,31 +10,6 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- CJS dist/index.js 17.15 KB
14
- CJS dist/lib/utils.js 620.00 B
15
- CJS dist/components/ui/alert.js 1.65 KB
16
- CJS dist/components/ui/avatar.js 1.34 KB
17
- CJS dist/components/ui/badge.js 1.78 KB
18
- CJS dist/components/ui/button.js 1.94 KB
19
- CJS dist/components/ui/card.js 1.85 KB
20
- CJS dist/components/ui/dropdown-menu.js 6.10 KB
21
- CJS dist/components/ui/input.js 1.37 KB
22
- CJS dist/components/ui/label.js 1.14 KB
23
- CJS dist/components/ui/separator.js 1.18 KB
24
- CJS dist/components/ui/sheet.js 3.36 KB
25
- CJS dist/index.js.map 49.66 KB
26
- CJS dist/lib/utils.js.map 520.00 B
27
- CJS dist/components/ui/alert.js.map 3.01 KB
28
- CJS dist/components/ui/avatar.js.map 2.31 KB
29
- CJS dist/components/ui/badge.js.map 2.79 KB
30
- CJS dist/components/ui/button.js.map 3.17 KB
31
- CJS dist/components/ui/card.js.map 3.81 KB
32
- CJS dist/components/ui/dropdown-menu.js.map 12.51 KB
33
- CJS dist/components/ui/input.js.map 1.79 KB
34
- CJS dist/components/ui/label.js.map 1.45 KB
35
- CJS dist/components/ui/separator.js.map 1.64 KB
36
- CJS dist/components/ui/sheet.js.map 6.75 KB
37
- CJS ⚡️ Build success in 203ms
38
13
  ESM dist/index.mjs 15.64 KB
39
14
  ESM dist/lib/utils.mjs 166.00 B
40
15
  ESM dist/components/ui/alert.mjs 1.19 KB
@@ -47,7 +22,7 @@
47
22
  ESM dist/components/ui/label.mjs 566.00 B
48
23
  ESM dist/components/ui/separator.mjs 604.00 B
49
24
  ESM dist/components/ui/sheet.mjs 2.68 KB
50
- ESM dist/index.mjs.map 49.83 KB
25
+ ESM dist/index.mjs.map 49.68 KB
51
26
  ESM dist/lib/utils.mjs.map 415.00 B
52
27
  ESM dist/components/ui/alert.mjs.map 2.82 KB
53
28
  ESM dist/components/ui/avatar.mjs.map 2.13 KB
@@ -59,12 +34,37 @@
59
34
  ESM dist/components/ui/label.mjs.map 1.32 KB
60
35
  ESM dist/components/ui/separator.mjs.map 1.51 KB
61
36
  ESM dist/components/ui/sheet.mjs.map 6.49 KB
62
- ESM ⚡️ Build success in 213ms
37
+ ESM ⚡️ Build success in 187ms
38
+ CJS dist/index.js 17.15 KB
39
+ CJS dist/lib/utils.js 620.00 B
40
+ CJS dist/components/ui/alert.js 1.65 KB
41
+ CJS dist/components/ui/avatar.js 1.34 KB
42
+ CJS dist/components/ui/badge.js 1.78 KB
43
+ CJS dist/components/ui/button.js 1.94 KB
44
+ CJS dist/components/ui/card.js 1.85 KB
45
+ CJS dist/components/ui/dropdown-menu.js 6.10 KB
46
+ CJS dist/components/ui/input.js 1.37 KB
47
+ CJS dist/components/ui/label.js 1.14 KB
48
+ CJS dist/components/ui/separator.js 1.18 KB
49
+ CJS dist/components/ui/sheet.js 3.36 KB
50
+ CJS dist/index.js.map 49.50 KB
51
+ CJS dist/lib/utils.js.map 520.00 B
52
+ CJS dist/components/ui/alert.js.map 3.01 KB
53
+ CJS dist/components/ui/avatar.js.map 2.31 KB
54
+ CJS dist/components/ui/badge.js.map 2.79 KB
55
+ CJS dist/components/ui/button.js.map 3.17 KB
56
+ CJS dist/components/ui/card.js.map 3.81 KB
57
+ CJS dist/components/ui/dropdown-menu.js.map 12.51 KB
58
+ CJS dist/components/ui/input.js.map 1.79 KB
59
+ CJS dist/components/ui/label.js.map 1.45 KB
60
+ CJS dist/components/ui/separator.js.map 1.64 KB
61
+ CJS dist/components/ui/sheet.js.map 6.75 KB
62
+ CJS ⚡️ Build success in 189ms
63
63
  DTS Build start
64
- DTS ⚡️ Build success in 10258ms
64
+ DTS ⚡️ Build success in 9160ms
65
65
  DTS dist/index.d.mts 1.98 KB
66
66
  DTS dist/index.d.ts 1.98 KB
67
67
 
68
- > @authdog/react-elements@0.0.27 build:styles /home/runner/work/web-sdk/web-sdk/packages/react-elements
68
+ > @authdog/react-elements@0.0.28 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
@@ -1,5 +1,11 @@
1
1
  # @authdog/react-elements
2
2
 
3
+ ## 0.0.28
4
+
5
+ ### Patch Changes
6
+
7
+ - 3d56a5d: handling auth session in remix sdk
8
+
3
9
  ## 0.0.27
4
10
 
5
11
  ### Patch Changes
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/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"],"sourcesContent":["export {Button} from \"./components/ui/button\";\nexport {Navbar} from \"./components/core/navbar\";\nexport {UserProfile} from \"./components/core/user-profile\";\nexport {PlaceholderAlert} from \"./components/core/placeholder-alert\";","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","\"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 // { title: \"Projects\", href: \"/projects\" },\n // { title: \"Team\", href: \"/team\" },\n // { title: \"Reports\", href: \"/reports\" },\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\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-[16rem,1fr] h-screen bg-gray-100\">\n <div className=\"h-full border-r p-6 bg-white flex flex-col min-w-0\">\n <div className=\"mb-6\">\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-10 overflow-y-auto min-w-0 bg-white\">\n <div className=\"flex justify-between items-center mb-6\">\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-8\">\n {/* Profile Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-4\">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-4\">Email addresses</h3>\n <div className=\"space-y-3\">\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 {\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 }\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-4\">Phone number</h3>\n <div className=\"space-y-3\">\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-4\">Connected accounts</h3>\n <div className=\"space-y-3\">\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-8\">\n {/* Security Settings */}\n <div key=\"two-factor\">\n <h3 className=\"text-sm font-medium mb-4\">Two-factor authentication</h3>\n <div className=\"space-y-3\">\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-4\">Password</h3>\n <div className=\"space-y-3\">\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-4\">Active sessions</h3>\n <div className=\"space-y-3\">\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"],"mappings":";skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,EAAA,WAAAC,GAAA,qBAAAC,GAAA,gBAAAC,KAAA,eAAAC,GAAAN,ICAA,IAAAO,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDwCM,IAAAC,EAAA,6BAvCAC,MAAiB,OACrB,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,CAC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W,CAAE,UAAAJ,EAAW,GAAGE,CAAM,EAAgC,CACxE,SACE,OAAC,OACC,YAAU,cACV,UAAWC,EACT,8DACAH,CACF,EACC,GAAGE,EACN,CAEJ,CAEA,SAASG,GAAiB,CACxB,UAAAL,EACA,GAAGE,CACL,EAAgC,CAC9B,SACE,OAAC,OACC,YAAU,oBACV,UAAWC,EACT,iGACAH,CACF,EACC,GAAGE,EACN,CAEJ,CDhDM,IAAAI,EAAA,6BANOC,GAAoBC,GAAiC,CAChE,IAAMC,EAAQD,EAAM,OAAS,oBACvBE,EAAcF,EAAM,aAAe,+BAEzC,SACE,OAAC,OAAI,UAAU,yCACb,oBAACG,GAAA,CACC,oBAACC,EAAA,CAAY,KAAM,oBAAkB,KACrC,OAACC,GAAA,CAAY,SAAAJ,EAAM,KACnB,OAACK,GAAA,CACI,SAAAJ,EACL,GACF,EACF,CAEJ","names":["index_exports","__export","Button","Navbar","PlaceholderAlert","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_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"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/components/ui/button.tsx","../src/lib/utils.ts","../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"],"sourcesContent":["export {Button} from \"./components/ui/button\";\nexport {Navbar} from \"./components/core/navbar\";\nexport {UserProfile} from \"./components/core/user-profile\";\nexport {PlaceholderAlert} from \"./components/core/placeholder-alert\";","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","\"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-[16rem,1fr] h-screen bg-gray-100\">\n <div className=\"h-full border-r p-6 bg-white flex flex-col min-w-0\">\n <div className=\"mb-6\">\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-10 overflow-y-auto min-w-0 bg-white\">\n <div className=\"flex justify-between items-center mb-6\">\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-8\">\n {/* Profile Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-4\">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-4\">Email addresses</h3>\n <div className=\"space-y-3\">\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 {\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 }\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-4\">Phone number</h3>\n <div className=\"space-y-3\">\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-4\">Connected accounts</h3>\n <div className=\"space-y-3\">\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-8\">\n {/* Security Settings */}\n <div key=\"two-factor\">\n <h3 className=\"text-sm font-medium mb-4\">Two-factor authentication</h3>\n <div className=\"space-y-3\">\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-4\">Password</h3>\n <div className=\"space-y-3\">\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-4\">Active sessions</h3>\n <div className=\"space-y-3\">\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"],"mappings":";skBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,YAAAE,EAAA,WAAAC,GAAA,qBAAAC,GAAA,gBAAAC,KAAA,eAAAC,GAAAN,ICAA,IAAAO,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDwCM,IAAAC,EAAA,6BAvCAC,MAAiB,OACrB,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,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAGtD,OAFWF,EAAU,OAAO,SAE3B,CACC,UAAWG,EAAGR,GAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,SElDrB,IAAAQ,GAAyB,iBACzBC,EAAmC,wBCDnC,IAAAC,EAAiC,qCAS7B,IAAAC,EAAA,6BALJ,SAASC,EAAO,CACd,UAAAC,EACA,GAAGC,CACL,EAAsD,CAC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,CAAY,KAAM,oBAAkB,KACrC,OAACC,GAAA,CAAY,SAAAJ,EAAM,KACnB,OAACK,GAAA,CACI,SAAAJ,EACL,GACF,EACF,CAEJ","names":["index_exports","__export","Button","Navbar","PlaceholderAlert","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_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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/ui/button.tsx","../src/lib/utils.ts","../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"],"sourcesContent":["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","\"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 // { title: \"Projects\", href: \"/projects\" },\n // { title: \"Team\", href: \"/team\" },\n // { title: \"Reports\", href: \"/reports\" },\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\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-[16rem,1fr] h-screen bg-gray-100\">\n <div className=\"h-full border-r p-6 bg-white flex flex-col min-w-0\">\n <div className=\"mb-6\">\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-10 overflow-y-auto min-w-0 bg-white\">\n <div className=\"flex justify-between items-center mb-6\">\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-8\">\n {/* Profile Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-4\">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-4\">Email addresses</h3>\n <div className=\"space-y-3\">\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 {\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 }\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-4\">Phone number</h3>\n <div className=\"space-y-3\">\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-4\">Connected accounts</h3>\n <div className=\"space-y-3\">\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-8\">\n {/* Security Settings */}\n <div key=\"two-factor\">\n <h3 className=\"text-sm font-medium mb-4\">Two-factor authentication</h3>\n <div className=\"space-y-3\">\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-4\">Password</h3>\n <div className=\"space-y-3\">\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-4\">Active sessions</h3>\n <div className=\"space-y-3\">\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"],"mappings":";AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,OAAY,uBACrB,OAAS,OAAAC,OAA8B,2BCFvC,OAA0B,QAAAC,OAAY,OACtC,OAAS,WAAAC,OAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,GAAQD,GAAKG,CAAM,CAAC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,EACA,GAAGE,CACL,EAAgC,CAC9B,OACEN,EAAC,OACC,YAAU,oBACV,UAAWO,EACT,iGACAH,CACF,EACC,GAAGE,EACN,CAEJ,CDhDM,OACE,OAAAI,EADF,QAAAC,OAAA,oBANC,IAAMC,GAAoBC,GAAiC,CAChE,IAAMC,EAAQD,EAAM,OAAS,oBACvBE,EAAcF,EAAM,aAAe,+BAEzC,OACEH,EAAC,OAAI,UAAU,yCACb,SAAAC,GAACK,EAAA,CACC,UAAAN,EAACO,EAAA,CAAY,KAAMC,GAAkB,EACrCR,EAACS,EAAA,CAAY,SAAAL,EAAM,EACnBJ,EAACU,EAAA,CACI,SAAAL,EACL,GACF,EACF,CAEJ","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn","useState","User","LogOut","Menu","AvatarPrimitive","jsx","Avatar","className","props","cn","AvatarImage","AvatarFallback","DropdownMenuPrimitive","Check","ChevronRight","Circle","jsx","jsxs","DropdownMenu","props","jsx","DropdownMenuTrigger","props","jsx","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuLabel","className","inset","props","jsx","cn","DropdownMenuSeparator","SheetPrimitive","X","jsx","jsxs","XIcon","X","Sheet","props","SheetTrigger","SheetPortal","props","jsx","SheetOverlay","className","cn","SheetContent","children","side","jsxs","XIcon","useEffect","useState","jsx","iconProps","renderIcon","Icon","isMounted","setIsMounted","IconWrapper","Fragment","jsx","jsxs","Navbar","items","children","className","logoText","user","onNavigateHome","onNavItemClick","href","onProfileSelected","onLogout","isLoading","identityHost","environmentId","open","setOpen","useState","isAuthenticated","cn","item","index","DropdownMenu","DropdownMenuTrigger","Button","Avatar","AvatarImage","AvatarFallback","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuGroup","DropdownMenuItem","IconWrapper","User","LogOut","signinUrl","Sheet","SheetTrigger","Menu","SheetContent","useEffect","useState","Slot","cva","jsx","badgeVariants","cva","Badge","className","variant","asChild","props","Slot","cn","User","jsx","jsxs","UserProfile","loading","user","handleAuthenticated","isMounted","setIsMounted","useState","activeTab","setActiveTab","useEffect","iconProps","renderIcon","Icon","Avatar","AvatarImage","AvatarFallback","n","email","idx","Badge","Button","CheckCircle2Icon","cva","jsx","alertVariants","cva","Alert","className","variant","props","cn","AlertTitle","AlertDescription","jsx","jsxs","PlaceholderAlert","props","title","description","Alert","IconWrapper","CheckCircle2Icon","AlertTitle","AlertDescription"]}
1
+ {"version":3,"sources":["../src/components/ui/button.tsx","../src/lib/utils.ts","../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"],"sourcesContent":["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","\"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-[16rem,1fr] h-screen bg-gray-100\">\n <div className=\"h-full border-r p-6 bg-white flex flex-col min-w-0\">\n <div className=\"mb-6\">\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-10 overflow-y-auto min-w-0 bg-white\">\n <div className=\"flex justify-between items-center mb-6\">\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-8\">\n {/* Profile Section */}\n <div>\n <h3 className=\"text-sm font-medium mb-4\">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-4\">Email addresses</h3>\n <div className=\"space-y-3\">\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 {\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 }\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-4\">Phone number</h3>\n <div className=\"space-y-3\">\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-4\">Connected accounts</h3>\n <div className=\"space-y-3\">\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-8\">\n {/* Security Settings */}\n <div key=\"two-factor\">\n <h3 className=\"text-sm font-medium mb-4\">Two-factor authentication</h3>\n <div className=\"space-y-3\">\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-4\">Password</h3>\n <div className=\"space-y-3\">\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-4\">Active sessions</h3>\n <div className=\"space-y-3\">\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"],"mappings":";AAAA,U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,EACN,CAEJ,CAEA,SAASE,EAAW,CAAE,UAAAJ,EAAW,GAAGE,CAAM,EAAgC,CACxE,OACEN,EAAC,OACC,YAAU,cACV,UAAWO,EACT,8DACAH,CACF,EACC,GAAGE,EACN,CAEJ,CAEA,SAASG,EAAiB,CACxB,UAAAL,EACA,GAAGE,CACL,EAAgC,CAC9B,OACEN,EAAC,OACC,YAAU,oBACV,UAAWO,EACT,iGACAH,CACF,EACC,GAAGE,EACN,CAEJ,CDhDM,OACE,OAAAI,EADF,QAAAC,OAAA,oBANC,IAAMC,GAAoBC,GAAiC,CAChE,IAAMC,EAAQD,EAAM,OAAS,oBACvBE,EAAcF,EAAM,aAAe,+BAEzC,OACEH,EAAC,OAAI,UAAU,yCACb,SAAAC,GAACK,EAAA,CACC,UAAAN,EAACO,EAAA,CAAY,KAAMC,GAAkB,EACrCR,EAACS,EAAA,CAAY,SAAAL,EAAM,EACnBJ,EAACU,EAAA,CACI,SAAAL,EACL,GACF,EACF,CAEJ","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn","useState","User","LogOut","Menu","AvatarPrimitive","jsx","Avatar","className","props","cn","AvatarImage","AvatarFallback","DropdownMenuPrimitive","Check","ChevronRight","Circle","jsx","jsxs","DropdownMenu","props","jsx","DropdownMenuTrigger","props","jsx","DropdownMenuContent","className","sideOffset","cn","DropdownMenuGroup","DropdownMenuItem","inset","variant","DropdownMenuLabel","className","inset","props","jsx","cn","DropdownMenuSeparator","SheetPrimitive","X","jsx","jsxs","XIcon","X","Sheet","props","SheetTrigger","SheetPortal","props","jsx","SheetOverlay","className","cn","SheetContent","children","side","jsxs","XIcon","useEffect","useState","jsx","iconProps","renderIcon","Icon","isMounted","setIsMounted","IconWrapper","Fragment","jsx","jsxs","Navbar","items","children","className","logoText","user","onNavigateHome","onNavItemClick","href","onProfileSelected","onLogout","isLoading","identityHost","environmentId","open","setOpen","useState","isAuthenticated","cn","item","index","DropdownMenu","DropdownMenuTrigger","Button","Avatar","AvatarImage","AvatarFallback","DropdownMenuContent","DropdownMenuLabel","DropdownMenuSeparator","DropdownMenuGroup","DropdownMenuItem","IconWrapper","User","LogOut","signinUrl","Sheet","SheetTrigger","Menu","SheetContent","useEffect","useState","Slot","cva","jsx","badgeVariants","cva","Badge","className","variant","asChild","props","Slot","cn","User","jsx","jsxs","UserProfile","loading","user","handleAuthenticated","isMounted","setIsMounted","useState","activeTab","setActiveTab","useEffect","iconProps","renderIcon","Icon","Avatar","AvatarImage","AvatarFallback","n","email","idx","Badge","Button","CheckCircle2Icon","cva","jsx","alertVariants","cva","Alert","className","variant","props","cn","AlertTitle","AlertDescription","jsx","jsxs","PlaceholderAlert","props","title","description","Alert","IconWrapper","CheckCircle2Icon","AlertTitle","AlertDescription"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@authdog/react-elements",
3
- "version": "0.0.27",
3
+ "version": "0.0.28",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.mts",
@@ -44,9 +44,6 @@ interface NavbarProps {
44
44
  export function Navbar({
45
45
  items = [
46
46
  // { title: "Dashboard", href: "/dashboard" },
47
- // { title: "Projects", href: "/projects" },
48
- // { title: "Team", href: "/team" },
49
- // { title: "Reports", href: "/reports" },
50
47
  ],
51
48
  children,
52
49
  className,
@@ -93,9 +90,6 @@ export function Navbar({
93
90
  <div className="flex items-center gap-4">
94
91
  {children}
95
92
 
96
-
97
-
98
-
99
93
  {
100
94
  isAuthenticated ? (
101
95
  <DropdownMenu>
@@ -5,10 +5,15 @@ import "../global.css";
5
5
  export const Default: Story = () => (
6
6
  <UserProfile
7
7
  user={{
8
- name: "Jaylon Dias",
9
- email: "example@authdog.xyz",
10
- image: "https://i.pravatar.cc/150?u=a042581f4e29026704d"
8
+ id: "123",
9
+ displayName: "Jaylon Dias",
10
+ emails: [{ value: "example@authdog.xyz" }],
11
+ photos: [{ value: "https://i.pravatar.cc/150?u=a042581f4e29026704d" }],
12
+ provider: "authdog",
11
13
  }}
14
+ loading={false}
15
+ handleAuthenticated={() => {}}
16
+ emails={[{ address: "example@authdog.xyz", isPrimary: true }]}
12
17
  />
13
18
  );
14
19
  Default.storyName = 'Default User Profile';
@@ -16,10 +21,15 @@ Default.storyName = 'Default User Profile';
16
21
  export const WithCustomUser: Story = () => (
17
22
  <UserProfile
18
23
  user={{
19
- name: "Jane Smith",
20
- email: "jane@example.com",
21
- image: "https://i.pravatar.cc/150?u=a042581f4e29026704d"
24
+ id: "123",
25
+ displayName: "Jaylon Dias",
26
+ emails: [{ value: "example@authdog.xyz" }],
27
+ photos: [{ value: "https://i.pravatar.cc/150?u=a042581f4e29026704d" }],
28
+ provider: "authdog",
22
29
  }}
30
+ loading={false}
31
+ handleAuthenticated={() => {}}
32
+ emails={[{ address: "example@authdog.xyz", isPrimary: true }]}
23
33
  />
24
34
  );
25
35
  WithCustomUser.storyName = 'User Profile with Custom User';
@@ -27,15 +37,15 @@ WithCustomUser.storyName = 'User Profile with Custom User';
27
37
  export const WithMultipleEmails: Story = () => (
28
38
  <UserProfile
29
39
  user={{
30
- name: "John Doe",
31
- email: "john@example.com",
32
- image: "https://i.pravatar.cc/150?u=a042581f4e29026704d"
40
+ id: "123",
41
+ displayName: "Jaylon Dias",
42
+ emails: [{ value: "example@authdog.xyz" }, { value: "example@gmail.com" }],
43
+ photos: [{ value: "https://i.pravatar.cc/150?u=a042581f4e29026704d" }],
44
+ provider: "authdog",
33
45
  }}
34
- emails={[
35
- { address: "john@example.com", isPrimary: true },
36
- { address: "john@personal.com", isPrimary: false },
37
- { address: "john@work.com", isPrimary: false }
38
- ]}
46
+ loading={false}
47
+ handleAuthenticated={() => {}}
48
+ emails={[{ address: "example@authdog.xyz", isPrimary: true }, { address: "example@gmail.com", isPrimary: false }]}
39
49
  />
40
50
  );
41
51
  WithMultipleEmails.storyName = 'User Profile with Multiple Emails';
@@ -43,14 +53,15 @@ WithMultipleEmails.storyName = 'User Profile with Multiple Emails';
43
53
  export const WithConnectedAccounts: Story = () => (
44
54
  <UserProfile
45
55
  user={{
46
- name: "Alex Johnson",
47
- email: "alex@example.com",
48
- image: ""
56
+ id: "123",
57
+ displayName: "Alex Johnson",
58
+ emails: [{ value: "alex@example.com" }],
59
+ photos: [{ value: "https://i.pravatar.cc/150?u=a042581f4e29026704d" }],
60
+ provider: "authdog",
49
61
  }}
50
- connectedAccounts={[
51
- { provider: "Google", email: "alex@gmail.com" },
52
- { provider: "GitHub", email: "alex@github.com" }
53
- ]}
62
+ loading={false}
63
+ handleAuthenticated={() => {}}
64
+ emails={[{ address: "alex@example.com", isPrimary: true }]}
54
65
  />
55
66
  );
56
67
  WithConnectedAccounts.storyName = 'User Profile with Connected Accounts';