@authdog/react-elements 0.0.34 → 0.0.35

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.34 build /home/runner/work/web-sdk/web-sdk/packages/react-elements
2
+ > @authdog/react-elements@0.0.35 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,9 +10,34 @@
10
10
  CLI Cleaning output folder
11
11
  ESM Build start
12
12
  CJS Build start
13
- ESM dist/components/ui/alert.mjs 1.19 KB
14
- ESM dist/index.mjs 24.39 KB
13
+ CJS dist/index.js 26.75 KB
14
+ CJS dist/components/ui/alert.js 1.65 KB
15
+ CJS dist/lib/utils.js 620.00 B
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/card.js 1.85 KB
19
+ CJS dist/components/ui/button.js 1.94 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/sheet.js 3.36 KB
24
+ CJS dist/components/ui/separator.js 1.18 KB
25
+ CJS dist/index.js.map 77.86 KB
26
+ CJS dist/components/ui/alert.js.map 3.01 KB
27
+ CJS dist/lib/utils.js.map 520.00 B
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/card.js.map 3.81 KB
31
+ CJS dist/components/ui/button.js.map 3.17 KB
32
+ CJS dist/components/ui/dropdown-menu.js.map 12.49 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/sheet.js.map 6.75 KB
36
+ CJS dist/components/ui/separator.js.map 1.64 KB
37
+ CJS ⚡️ Build success in 115ms
38
+ ESM dist/index.mjs 24.62 KB
15
39
  ESM dist/lib/utils.mjs 166.00 B
40
+ ESM dist/components/ui/alert.mjs 1.19 KB
16
41
  ESM dist/components/ui/avatar.mjs 749.00 B
17
42
  ESM dist/components/ui/badge.mjs 1.34 KB
18
43
  ESM dist/components/ui/button.mjs 1.36 KB
@@ -22,9 +47,9 @@
22
47
  ESM dist/components/ui/label.mjs 566.00 B
23
48
  ESM dist/components/ui/separator.mjs 604.00 B
24
49
  ESM dist/components/ui/sheet.mjs 2.68 KB
25
- ESM dist/components/ui/alert.mjs.map 2.82 KB
26
- ESM dist/index.mjs.map 77.82 KB
50
+ ESM dist/index.mjs.map 78.35 KB
27
51
  ESM dist/lib/utils.mjs.map 415.00 B
52
+ ESM dist/components/ui/alert.mjs.map 2.82 KB
28
53
  ESM dist/components/ui/avatar.mjs.map 2.13 KB
29
54
  ESM dist/components/ui/badge.mjs.map 2.63 KB
30
55
  ESM dist/components/ui/button.mjs.map 3.01 KB
@@ -34,37 +59,12 @@
34
59
  ESM dist/components/ui/label.mjs.map 1.32 KB
35
60
  ESM dist/components/ui/separator.mjs.map 1.51 KB
36
61
  ESM dist/components/ui/sheet.mjs.map 6.49 KB
37
- ESM ⚡️ Build success in 194ms
38
- CJS dist/index.js 26.50 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 77.33 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.49 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 200ms
62
+ ESM ⚡️ Build success in 128ms
63
63
  DTS Build start
64
- DTS ⚡️ Build success in 5638ms
64
+ DTS ⚡️ Build success in 6250ms
65
65
  DTS dist/index.d.mts 3.45 KB
66
66
  DTS dist/index.d.ts 3.45 KB
67
67
 
68
- > @authdog/react-elements@0.0.34 build:styles /home/runner/work/web-sdk/web-sdk/packages/react-elements
68
+ > @authdog/react-elements@0.0.35 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.35
4
+
5
+ ### Patch Changes
6
+
7
+ - 5248882: enhance verified email ui for user profile
8
+
3
9
  ## 0.0.34
4
10
 
5
11
  ### Patch Changes
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use client";
2
- "use strict";var Be=Object.create;var $=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Ue=Object.prototype.hasOwnProperty;var je=(t,o)=>{for(var a in o)$(t,a,{get:o[a],enumerable:!0})},ce=(t,o,a,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of Oe(o))!Ue.call(t,d)&&d!==a&&$(t,d,{get:()=>o[d],enumerable:!(l=Ge(o,d))||l.enumerable});return t};var K=(t,o,a)=>(a=t!=null?Be(_e(t)):{},ce(o||!t||!t.__esModule?$(a,"default",{value:t,enumerable:!0}):a,t)),Fe=t=>ce($({},"__esModule",{value:!0}),t);var Ze={};je(Ze,{Button:()=>P,ClientOnly:()=>xe,Navbar:()=>De,PlaceholderAlert:()=>Ee,TOTPValidator:()=>Le,UserDropdown:()=>Te,UserProfile:()=>Ie});module.exports=Fe(Ze);var ue=K(require("react")),fe=require("@radix-ui/react-slot"),ve=require("class-variance-authority");var me=require("clsx"),pe=require("tailwind-merge");function s(...t){return(0,pe.twMerge)((0,me.clsx)(t))}var ge=require("react/jsx-runtime"),He=(0,ve.cva)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),P=ue.forwardRef(({className:t,variant:o,size:a,asChild:l=!1,...d},h)=>(0,ge.jsx)(l?fe.Slot:"button",{className:s(He({variant:o,size:a,className:t})),ref:h,...d}));P.displayName="Button";var W=require("react"),q=require("react/jsx-runtime"),xe=({children:t})=>{let[o,a]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{a(!0)},[]),o?(0,q.jsx)(q.Fragment,{children:t}):null};var Ce=require("react"),G=require("lucide-react");var A=K(require("@radix-ui/react-avatar"));var X=require("react/jsx-runtime");function V({className:t,...o}){return(0,X.jsx)(A.Root,{"data-slot":"avatar",className:s("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...o})}function z({className:t,...o}){return(0,X.jsx)(A.Image,{"data-slot":"avatar-image",className:s("aspect-square size-full",t),...o})}function E({className:t,...o}){return(0,X.jsx)(A.Fallback,{"data-slot":"avatar-fallback",className:s("bg-muted flex size-full items-center justify-center rounded-full",t),...o})}var m=K(require("@radix-ui/react-dropdown-menu")),se=require("lucide-react");var C=require("react/jsx-runtime");function Y({...t}){return(0,C.jsx)(m.Root,{"data-slot":"dropdown-menu",...t})}function J({...t}){return(0,C.jsx)(m.Trigger,{"data-slot":"dropdown-menu-trigger",...t})}function Q({className:t,sideOffset:o=4,...a}){return(0,C.jsx)(m.Portal,{children:(0,C.jsx)(m.Content,{"data-slot":"dropdown-menu-content",sideOffset:o,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...a})})}function be({...t}){return(0,C.jsx)(m.Group,{"data-slot":"dropdown-menu-group",...t})}function R({className:t,inset:o,variant:a="default",...l}){return(0,C.jsx)(m.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":a,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l})}function he({className:t,inset:o,...a}){return(0,C.jsx)(m.Label,{"data-slot":"dropdown-menu-label","data-inset":o,className:s("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...a})}function L({className:t,...o}){return(0,C.jsx)(m.Separator,{"data-slot":"dropdown-menu-separator",className:s("bg-border -mx-1 my-1 h-px",t),...o})}var f=K(require("@radix-ui/react-dialog")),ye=require("lucide-react");var b=require("react/jsx-runtime"),$e=ye.X;function we({...t}){return(0,b.jsx)(f.Root,{"data-slot":"sheet",...t})}function Ne({...t}){return(0,b.jsx)(f.Trigger,{"data-slot":"sheet-trigger",...t})}function Ke({...t}){return(0,b.jsx)(f.Portal,{"data-slot":"sheet-portal",...t})}function We({className:t,...o}){return(0,b.jsx)(f.Overlay,{"data-slot":"sheet-overlay",className:s("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...o})}function Pe({className:t,children:o,side:a="right",...l}){return(0,b.jsxs)(Ke,{children:[(0,b.jsx)(We,{}),(0,b.jsxs)(f.Content,{"data-slot":"sheet-content",className:s("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...l,children:[o,(0,b.jsxs)(f.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,b.jsx)($e,{className:"size-4"}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}var ee=require("react"),Z=require("react/jsx-runtime"),qe={className:"mr-2 h-4 w-4","aria-hidden":"true"},Xe=t=>{let[o,a]=(0,ee.useState)(!1);return(0,ee.useEffect)(()=>{a(!0)},[]),o?(0,Z.jsx)(t,{...qe}):(0,Z.jsx)("span",{className:"mr-2 h-4 w-4","aria-hidden":"true"})},B=({Icon:t})=>(0,Z.jsx)("span",{className:"inline-flex items-center justify-center",children:Xe(t)});var r=require("react/jsx-runtime");function De({items:t=[],children:o,className:a,logoText:l="ACME Corp",user:d={name:"John Doe",email:"john@example.com",image:"https://i.pravatar.cc/150?u=a042581f4e29026704d"},onNavigateHome:h=()=>console.log("Navigating to home"),onNavItemClick:x=D=>console.log(`Navigating to ${D}`),onProfileSelected:v,onLogout:y=()=>console.log("Logout clicked"),isLoading:g=!1,identityHost:w="https://stg-id.authdog.xyz",environmentId:k="58be35b0-708f-49f6-84f0-6695d307d997"}){let[D,M]=(0,Ce.useState)(!1),u=d!=null&&d.id!==null&&d.id!==void 0;return(0,r.jsx)("header",{className:s("border-b bg-background",a),children:(0,r.jsxs)("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("span",{className:"text-xl font-bold cursor-pointer",onClick:h,children:l}),(0,r.jsx)("nav",{className:"hidden md:flex gap-6",children:t?.map((n,c)=>(0,r.jsx)("span",{onClick:()=>{n.disabled||x(n.href)},className:s("text-sm font-medium transition-colors hover:text-primary cursor-pointer",n.disabled&&"cursor-not-allowed opacity-80"),children:n.title},c))})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[o,u?(0,r.jsxs)(Y,{children:[(0,r.jsx)(J,{asChild:!0,children:(0,r.jsx)(P,{variant:"ghost",className:"relative h-8 w-8 rounded-full",disabled:g,children:(0,r.jsx)(V,{className:"h-8 w-8",children:g?(0,r.jsx)("div",{className:"h-8 w-8 animate-pulse bg-muted rounded-full"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{src:d.photos?.[0]?.value||"/placeholder.svg",alt:d.displayName}),(0,r.jsx)(E,{children:d.displayName?.charAt(0)})]})})})}),(0,r.jsx)(Q,{className:"w-56",align:"end",forceMount:!0,children:g?(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)("div",{className:"h-4 w-3/4 animate-pulse bg-muted rounded mb-2"}),(0,r.jsx)("div",{className:"h-3 w-1/2 animate-pulse bg-muted rounded"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(he,{className:"font-normal",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium leading-none",children:d.displayName}),(0,r.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:d.emails?.[0]?.value})]})}),(0,r.jsx)(L,{}),(0,r.jsx)(be,{children:(0,r.jsxs)(R,{onClick:v,children:[(0,r.jsx)(B,{Icon:G.User}),(0,r.jsx)("span",{children:"Profile"})]})}),(0,r.jsx)(L,{}),(0,r.jsxs)(R,{onClick:y,children:[(0,r.jsx)(B,{Icon:G.LogOut}),(0,r.jsx)("span",{children:"Log out"})]})]})})]}):(0,r.jsx)(P,{variant:"default","aria-label":"Sign in",onClick:()=>{if(!k)throw new Error("Environment ID is required");if(!w)throw new Error("Identity Host is required");let n=`${w}/signin/${k}`;window.open(n,"_blank")},children:"Sign in"}),(0,r.jsxs)(we,{open:D,onOpenChange:M,children:[(0,r.jsx)(Ne,{asChild:!0,children:(0,r.jsx)(P,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":"Open Menu",children:(0,r.jsx)(B,{Icon:G.Menu})})}),(0,r.jsx)(Pe,{side:"left",className:"pr-0",children:(0,r.jsx)("nav",{className:"grid gap-2 py-6",children:t?.map((n,c)=>(0,r.jsx)("a",{href:n.href,className:s("flex w-full items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent",n.disabled&&"cursor-not-allowed opacity-80"),onClick:()=>M(!1),children:n.title},c))})})]})]})]})})}var S=require("react");var ke=require("@radix-ui/react-slot"),Me=require("class-variance-authority");var Re=require("react/jsx-runtime"),Ye=(0,Me.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function Se({className:t,variant:o,asChild:a=!1,...l}){return(0,Re.jsx)(a?ke.Slot:"span",{"data-slot":"badge",className:s(Ye({variant:o}),t),...l})}var O=require("lucide-react"),e=require("react/jsx-runtime"),Ie=({loading:t,user:o,handleAuthenticated:a,onRequestEmailVerification:l,onVerifyEmail:d})=>{let[h,x]=(0,S.useState)(!1),[v,y]=(0,S.useState)("profile"),[g,w]=(0,S.useState)(null),[k,D]=(0,S.useState)({});(0,S.useEffect)(()=>{x(!0)},[]),(0,S.useEffect)(()=>{!t&&a&&a()},[t,o,a]);let M={className:"mr-2 h-4 w-4","aria-hidden":"true"},u=n=>h?(0,e.jsx)(n,{...M}):null;return!h||t?(0,e.jsx)("div",{children:"Loading..."}):o?(0,e.jsxs)("div",{className:"grid grid-cols-[14rem,1fr] w-full bg-transparent",children:[(0,e.jsxs)("div",{className:"h-full border-r border-border p-3 md:p-4 bg-transparent flex flex-col min-w-0",children:[(0,e.jsxs)("div",{className:"mb-3 md:mb-4",children:[(0,e.jsx)("h1",{className:"text-xl font-bold text-foreground",children:"Account"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Manage your account info."})]}),(0,e.jsxs)("nav",{className:"space-y-1 flex-1",children:[(0,e.jsxs)("button",{onClick:()=>y("profile"),className:`flex items-center w-full px-3 py-2 text-sm rounded-md ${v==="profile"?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50"}`,children:[u(O.User),"Profile"]}),(0,e.jsxs)("button",{onClick:()=>y("security"),className:`flex items-center w-full px-3 py-2 text-sm rounded-md ${v==="security"?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50"}`,children:[u(O.Shield),"Security"]}),(0,e.jsxs)("button",{onClick:()=>y("preferences"),className:`flex items-center w-full px-3 py-2 text-sm rounded-md ${v==="preferences"?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50"}`,children:[u(O.SlidersHorizontal),"Preferences"]})]})]}),(0,e.jsxs)("div",{className:"h-full p-3 md:p-5 min-w-0 bg-transparent",children:[(0,e.jsx)("div",{className:"flex justify-between items-center mb-3 md:mb-4",children:(0,e.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:v==="profile"?"Profile details":v==="security"?"Security settings":"Preferences"})}),v==="profile"?(0,e.jsxs)("div",{className:"space-y-5 md:space-y-6",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3 text-foreground",children:"Profile"}),(0,e.jsx)("div",{className:"flex items-center justify-between",children:(0,e.jsxs)("div",{className:"flex items-center",children:[(0,e.jsxs)(V,{className:"h-12 w-12 mr-4 border",children:[(0,e.jsx)(z,{src:o.photos?.[0]?.value,alt:"Profile picture"}),(0,e.jsx)(E,{children:o.displayName?.split(" ").map(n=>n[0]).join("")})]}),(0,e.jsx)("span",{className:"font-medium text-foreground",children:o.displayName})]})})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3 text-foreground",children:"Email addresses"}),(0,e.jsx)("div",{className:"space-y-2.5",children:o.emails.map((n,c)=>{let j=(o?.verifications||[]).find(H=>H.email===n.value)?.verified===!0,F=k[n.value]||"";return(0,e.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsx)("span",{className:"text-foreground",children:n.value}),(0,e.jsx)("div",{className:"mt-1 text-xs text-muted-foreground",children:j?"Verified":"Not verified"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[c===0&&(0,e.jsx)(Se,{variant:"outline",className:"text-xs bg-muted text-foreground hover:bg-muted",children:"Primary"}),!j&&(0,e.jsx)(e.Fragment,{children:g===n.value?(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("input",{className:"h-7 w-24 text-sm rounded-md border border-border bg-background px-2 text-foreground",placeholder:"Code",value:F,onChange:H=>D(ie=>({...ie,[n.value]:H.target.value}))}),(0,e.jsx)("button",{className:"h-7 rounded-md border border-border px-2 text-xs",onClick:async()=>{d&&await d(n.value,F)},children:"Verify"}),(0,e.jsx)("button",{className:"h-7 rounded-md border border-border px-2 text-xs",onClick:()=>w(null),children:"Cancel"})]}):(0,e.jsx)(e.Fragment,{children:(0,e.jsx)("button",{className:"h-7 rounded-md border border-border px-2 text-xs",onClick:async()=>{l&&await l(n.value),w(n.value)},children:"Send code"})})})]})]},n.value)})})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Connected accounts"}),(0,e.jsx)("div",{className:"space-y-2.5",children:(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("div",{className:"flex items-center",children:(0,e.jsx)("div",{className:"mr-2",children:(0,e.jsx)("span",{className:"text-gray-900 dark:text-gray-100",children:o.provider})})}),(0,e.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:o?.emails?.[0]?.value})]},o.provider)})]})]}):v==="security"?(0,e.jsxs)("div",{className:"space-y-5 md:space-y-6",children:[(0,e.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,e.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Password"}),(0,e.jsx)("button",{className:"text-sm text-indigo-600 hover:underline",children:"Set password"})]})}),(0,e.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,e.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Passkeys"}),(0,e.jsx)("button",{className:"text-sm text-indigo-600 hover:underline",children:"+\xA0Add a passkey"})]})}),(0,e.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,e.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Two-step verification"}),(0,e.jsx)("button",{className:"text-sm text-indigo-600 hover:underline",children:"+\xA0Add two-step verification"})]})}),(0,e.jsxs)("div",{className:"border rounded-md overflow-hidden",children:[(0,e.jsx)("div",{className:"px-4 py-3 border-b text-sm font-medium text-gray-900 dark:text-gray-100",children:"Active devices"}),(0,e.jsx)("div",{className:"p-4 space-y-3",children:(0,e.jsxs)("div",{className:"text-sm",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"inline-block h-5 w-5 rounded-sm bg-gray-900 dark:bg-white"}),(0,e.jsx)("span",{className:"font-medium",children:"X11"}),(0,e.jsx)("span",{className:"text-xs rounded-md border px-2 py-0.5 text-gray-600 dark:text-gray-300",children:"This device"})]}),(0,e.jsx)("div",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Firefox 142.0"}),(0,e.jsx)("div",{className:"text-gray-600 dark:text-gray-400",children:"127.0.0.1 (Local), (Your City)"}),(0,e.jsx)("div",{className:"text-gray-600 dark:text-gray-400",children:"Today at 7:08 PM"})]})})]}),(0,e.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,e.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Delete account"}),(0,e.jsx)("button",{className:"text-sm text-red-600 hover:underline",children:"Delete account"})]})})]}):(0,e.jsx)("div",{className:"space-y-5 md:space-y-6",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Preferences"}),(0,e.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Locale"}),(0,e.jsx)("span",{className:"text-gray-500 dark:text-gray-400",children:"Auto"})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Theme"}),(0,e.jsx)("span",{className:"text-gray-500 dark:text-gray-400",children:"System"})]})]})]})})]})]}):(0,e.jsx)("div",{children:"No user"})};var _=require("lucide-react"),p=require("react/jsx-runtime"),Je=t=>t&&String(t).trim().split(/\s+/).slice(0,2).map(l=>l[0]?.toUpperCase()).join("")||"?",Te=({trigger:t,user:o,className:a,onManageAccount:l,onSignout:d,links:h=[],side:x="bottom",align:v="end",sideOffset:y=8})=>{let g=o?.emails?.[0]?.value||o?.email||"",w=o?.displayName||o?.name||"",k=o?.photos?.[0]?.value||o?.avatar||"",D=u=>{if(u.onClick)return u.onClick();u.href&&(u.href.startsWith("http")?window.open(u.href,"_blank"):window.location.assign(u.href))},M=_.ExternalLink;return(0,p.jsxs)(Y,{children:[(0,p.jsx)(J,{className:"inline-flex items-center justify-center h-10 w-10 rounded-full focus:outline-none",children:t}),(0,p.jsxs)(Q,{align:v,side:x,sideOffset:y,className:s("w-72 p-2 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",a),children:[(0,p.jsxs)("div",{className:"flex items-center gap-3 px-4 pt-4 pb-3",children:[(0,p.jsxs)(V,{className:"h-9 w-9 rounded-full",children:[(0,p.jsx)(z,{src:k,alt:w}),(0,p.jsx)(E,{className:"rounded-full",children:Je(w)})]}),(0,p.jsxs)("div",{className:"min-w-0",children:[(0,p.jsx)("div",{className:"text-sm font-semibold truncate",children:w}),(0,p.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:g})]})]}),(0,p.jsx)(L,{}),(0,p.jsxs)(R,{className:"cursor-pointer py-2",onClick:()=>l?.(),children:[(0,p.jsx)(_.Settings,{className:"mr-2 h-4 w-4"}),(0,p.jsx)("span",{children:"Manage account"})]}),h.map((u,n)=>{let c=u.icon??M;return(0,p.jsxs)(R,{className:"cursor-pointer py-2",onClick:()=>D(u),children:[(0,p.jsx)(c,{className:"mr-2 h-4 w-4"}),(0,p.jsx)("span",{children:u.label})]},`${u.label}-${n}`)}),(0,p.jsx)(L,{}),(0,p.jsxs)(R,{className:"cursor-pointer text-red-600 focus:text-red-700 py-2",onClick:()=>d?.(),children:[(0,p.jsx)(_.LogOut,{className:"mr-2 h-4 w-4"}),(0,p.jsx)("span",{children:"Sign out"})]})]})]})};var ze=require("lucide-react");var Ae=require("class-variance-authority");var re=require("react/jsx-runtime"),Qe=(0,Ae.cva)("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function te({className:t,variant:o,...a}){return(0,re.jsx)("div",{"data-slot":"alert",role:"alert",className:s(Qe({variant:o}),t),...a})}function Ve({className:t,...o}){return(0,re.jsx)("div",{"data-slot":"alert-title",className:s("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...o})}function oe({className:t,...o}){return(0,re.jsx)("div",{"data-slot":"alert-description",className:s("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...o})}var I=require("react/jsx-runtime"),Ee=t=>{let o=t.title??"Placeholder Alert",a=t.description??"This is a placeholder alert.";return(0,I.jsx)("div",{className:"grid w-full max-w-xl items-start gap-4",children:(0,I.jsxs)(te,{children:[(0,I.jsx)(B,{Icon:ze.CheckCircle2Icon}),(0,I.jsx)(Ve,{children:o}),(0,I.jsx)(oe,{children:a})]})})};var T=require("react");var de=require("react/jsx-runtime");function ae({className:t,...o}){return(0,de.jsx)("div",{"data-slot":"card",className:s("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...o})}function ne({className:t,...o}){return(0,de.jsx)("div",{"data-slot":"card-content",className:s("px-6",t),...o})}var U=require("lucide-react"),i=require("react/jsx-runtime"),Le=({onValidate:t})=>{let[o,a]=(0,T.useState)(["","","","","",""]),[l,d]=(0,T.useState)(!1),[h,x]=(0,T.useState)(""),[v,y]=(0,T.useState)(!1),g=(0,T.useRef)([]),w=(n,c)=>{if(!/^\d*$/.test(c))return;let N=[...o];N[n]=c.slice(-1),a(N),x(""),y(!1),c&&n<5&&g.current[n+1]?.focus()},k=(n,c)=>{c.key==="Backspace"&&!o[n]&&n>0&&g.current[n-1]?.focus(),c.key==="v"&&(c.ctrlKey||c.metaKey)&&(c.preventDefault(),navigator.clipboard.readText().then(N=>{let j=N.replace(/\D/g,"").slice(0,6).split(""),F=[...o];j.forEach((ie,le)=>{le<6&&(F[le]=ie)}),a(F);let H=Math.min(j.length,5);g.current[H]?.focus()}))},D=async()=>{let n=o.join("");if(n.length!==6){x("Please enter all 6 digits");return}d(!0),x("");try{await t(n),y(!0)}catch{x("Invalid TOTP code. Please try again.")}finally{d(!1)}},M=n=>{n.preventDefault(),D()},u=()=>{a(["","","","","",""]),x(""),y(!1),d(!1),g.current[0]?.focus()};return v?(0,i.jsx)("div",{className:"max-w-md mx-auto",children:(0,i.jsx)(ae,{className:"border-green-200 bg-green-50",children:(0,i.jsx)(ne,{className:"pt-6",children:(0,i.jsxs)("div",{className:"text-center space-y-4",children:[(0,i.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center",children:(0,i.jsx)(U.CheckCircle,{className:"w-8 h-8 text-green-600"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{className:"text-lg font-semibold text-green-900",children:"Verification Successful!"}),(0,i.jsx)("p",{className:"text-sm text-green-700 mt-1",children:"Your TOTP code has been validated."})]}),(0,i.jsx)(P,{onClick:u,variant:"outline",className:"bg-white",children:"Verify Another Code"})]})})})}):(0,i.jsx)("div",{className:"max-w-md mx-auto",children:(0,i.jsx)(ae,{children:(0,i.jsx)(ne,{className:"pt-6",children:(0,i.jsxs)("div",{className:"text-center space-y-6",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"mx-auto w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,i.jsx)(U.Shield,{className:"w-6 h-6 text-blue-600"})}),(0,i.jsx)("h3",{className:"text-lg font-semibold",children:"Enter Verification Code"}),(0,i.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Enter the 6-digit code from your authenticator app"})]}),(0,i.jsxs)("form",{onSubmit:M,className:"space-y-6",children:[(0,i.jsx)("div",{className:"flex justify-center gap-2",children:o.map((n,c)=>(0,i.jsx)(ae,{className:"w-12 h-14 border-2 focus-within:border-blue-500 transition-colors",children:(0,i.jsx)(ne,{className:"p-0 h-full flex items-center justify-center",children:(0,i.jsx)("input",{ref:N=>{g.current[c]=N},type:"tel",inputMode:"numeric",maxLength:1,value:n,onChange:N=>w(c,N.target.value),onKeyDown:N=>k(c,N),className:"w-full h-full text-center text-2xl font-bold border-none outline-none bg-transparent",autoComplete:"one-time-code",disabled:l,style:{height:"auto"}})})},c))}),h&&(0,i.jsxs)(te,{variant:"destructive",children:[(0,i.jsx)(U.AlertCircle,{className:"h-4 w-4"}),(0,i.jsx)(oe,{children:h})]}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)(P,{type:"submit",className:"w-full",disabled:l||o.some(n=>n===""),children:l?"Verifying...":"Verify Code"}),(0,i.jsx)(P,{type:"button",variant:"ghost",size:"sm",onClick:u,className:"w-full text-xs",children:"Clear Code"})]})]}),(0,i.jsx)("p",{className:"text-xs text-muted-foreground",children:"Codes refresh every 30 seconds"})]})})})})};
2
+ "use strict";var Be=Object.create;var $=Object.defineProperty;var Ge=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var _e=Object.getPrototypeOf,Ue=Object.prototype.hasOwnProperty;var je=(t,o)=>{for(var a in o)$(t,a,{get:o[a],enumerable:!0})},me=(t,o,a,l)=>{if(o&&typeof o=="object"||typeof o=="function")for(let d of Oe(o))!Ue.call(t,d)&&d!==a&&$(t,d,{get:()=>o[d],enumerable:!(l=Ge(o,d))||l.enumerable});return t};var K=(t,o,a)=>(a=t!=null?Be(_e(t)):{},me(o||!t||!t.__esModule?$(a,"default",{value:t,enumerable:!0}):a,t)),Fe=t=>me($({},"__esModule",{value:!0}),t);var Ze={};je(Ze,{Button:()=>P,ClientOnly:()=>be,Navbar:()=>De,PlaceholderAlert:()=>Ee,TOTPValidator:()=>Le,UserDropdown:()=>Te,UserProfile:()=>Ie});module.exports=Fe(Ze);var fe=K(require("react")),ve=require("@radix-ui/react-slot"),ge=require("class-variance-authority");var pe=require("clsx"),ue=require("tailwind-merge");function s(...t){return(0,ue.twMerge)((0,pe.clsx)(t))}var xe=require("react/jsx-runtime"),He=(0,ge.cva)("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),P=fe.forwardRef(({className:t,variant:o,size:a,asChild:l=!1,...d},h)=>(0,xe.jsx)(l?ve.Slot:"button",{className:s(He({variant:o,size:a,className:t})),ref:h,...d}));P.displayName="Button";var W=require("react"),q=require("react/jsx-runtime"),be=({children:t})=>{let[o,a]=(0,W.useState)(!1);return(0,W.useEffect)(()=>{a(!0)},[]),o?(0,q.jsx)(q.Fragment,{children:t}):null};var ke=require("react"),G=require("lucide-react");var A=K(require("@radix-ui/react-avatar"));var X=require("react/jsx-runtime");function V({className:t,...o}){return(0,X.jsx)(A.Root,{"data-slot":"avatar",className:s("relative flex size-8 shrink-0 overflow-hidden rounded-full",t),...o})}function z({className:t,...o}){return(0,X.jsx)(A.Image,{"data-slot":"avatar-image",className:s("aspect-square size-full",t),...o})}function E({className:t,...o}){return(0,X.jsx)(A.Fallback,{"data-slot":"avatar-fallback",className:s("bg-muted flex size-full items-center justify-center rounded-full",t),...o})}var m=K(require("@radix-ui/react-dropdown-menu")),de=require("lucide-react");var C=require("react/jsx-runtime");function Y({...t}){return(0,C.jsx)(m.Root,{"data-slot":"dropdown-menu",...t})}function J({...t}){return(0,C.jsx)(m.Trigger,{"data-slot":"dropdown-menu-trigger",...t})}function Q({className:t,sideOffset:o=4,...a}){return(0,C.jsx)(m.Portal,{children:(0,C.jsx)(m.Content,{"data-slot":"dropdown-menu-content",sideOffset:o,className:s("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border p-1 shadow-md",t),...a})})}function he({...t}){return(0,C.jsx)(m.Group,{"data-slot":"dropdown-menu-group",...t})}function R({className:t,inset:o,variant:a="default",...l}){return(0,C.jsx)(m.Item,{"data-slot":"dropdown-menu-item","data-inset":o,"data-variant":a,className:s("focus:bg-accent focus:text-accent-foreground data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 dark:data-[variant=destructive]:focus:bg-destructive/20 data-[variant=destructive]:focus:text-destructive data-[variant=destructive]:*:[svg]:!text-destructive [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),...l})}function ye({className:t,inset:o,...a}){return(0,C.jsx)(m.Label,{"data-slot":"dropdown-menu-label","data-inset":o,className:s("px-2 py-1.5 text-sm font-medium data-[inset]:pl-8",t),...a})}function L({className:t,...o}){return(0,C.jsx)(m.Separator,{"data-slot":"dropdown-menu-separator",className:s("bg-border -mx-1 my-1 h-px",t),...o})}var f=K(require("@radix-ui/react-dialog")),we=require("lucide-react");var b=require("react/jsx-runtime"),$e=we.X;function Ne({...t}){return(0,b.jsx)(f.Root,{"data-slot":"sheet",...t})}function Pe({...t}){return(0,b.jsx)(f.Trigger,{"data-slot":"sheet-trigger",...t})}function Ke({...t}){return(0,b.jsx)(f.Portal,{"data-slot":"sheet-portal",...t})}function We({className:t,...o}){return(0,b.jsx)(f.Overlay,{"data-slot":"sheet-overlay",className:s("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),...o})}function Ce({className:t,children:o,side:a="right",...l}){return(0,b.jsxs)(Ke,{children:[(0,b.jsx)(We,{}),(0,b.jsxs)(f.Content,{"data-slot":"sheet-content",className:s("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",a==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",a==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",a==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",a==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t",t),...l,children:[o,(0,b.jsxs)(f.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[(0,b.jsx)($e,{className:"size-4"}),(0,b.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})}var ee=require("react"),Z=require("react/jsx-runtime"),qe={className:"mr-2 h-4 w-4","aria-hidden":"true"},Xe=t=>{let[o,a]=(0,ee.useState)(!1);return(0,ee.useEffect)(()=>{a(!0)},[]),o?(0,Z.jsx)(t,{...qe}):(0,Z.jsx)("span",{className:"mr-2 h-4 w-4","aria-hidden":"true"})},B=({Icon:t})=>(0,Z.jsx)("span",{className:"inline-flex items-center justify-center",children:Xe(t)});var r=require("react/jsx-runtime");function De({items:t=[],children:o,className:a,logoText:l="ACME Corp",user:d={name:"John Doe",email:"john@example.com",image:"https://i.pravatar.cc/150?u=a042581f4e29026704d"},onNavigateHome:h=()=>console.log("Navigating to home"),onNavItemClick:x=k=>console.log(`Navigating to ${k}`),onProfileSelected:v,onLogout:y=()=>console.log("Logout clicked"),isLoading:g=!1,identityHost:w="https://stg-id.authdog.xyz",environmentId:D="58be35b0-708f-49f6-84f0-6695d307d997"}){let[k,M]=(0,ke.useState)(!1),u=d!=null&&d.id!==null&&d.id!==void 0;return(0,r.jsx)("header",{className:s("border-b bg-background",a),children:(0,r.jsxs)("div",{className:"container flex h-16 items-center justify-between px-4 md:px-6",children:[(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[(0,r.jsx)("span",{className:"text-xl font-bold cursor-pointer",onClick:h,children:l}),(0,r.jsx)("nav",{className:"hidden md:flex gap-6",children:t?.map((n,c)=>(0,r.jsx)("span",{onClick:()=>{n.disabled||x(n.href)},className:s("text-sm font-medium transition-colors hover:text-primary cursor-pointer",n.disabled&&"cursor-not-allowed opacity-80"),children:n.title},c))})]}),(0,r.jsxs)("div",{className:"flex items-center gap-4",children:[o,u?(0,r.jsxs)(Y,{children:[(0,r.jsx)(J,{asChild:!0,children:(0,r.jsx)(P,{variant:"ghost",className:"relative h-8 w-8 rounded-full",disabled:g,children:(0,r.jsx)(V,{className:"h-8 w-8",children:g?(0,r.jsx)("div",{className:"h-8 w-8 animate-pulse bg-muted rounded-full"}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(z,{src:d.photos?.[0]?.value||"/placeholder.svg",alt:d.displayName}),(0,r.jsx)(E,{children:d.displayName?.charAt(0)})]})})})}),(0,r.jsx)(Q,{className:"w-56",align:"end",forceMount:!0,children:g?(0,r.jsxs)("div",{className:"p-4",children:[(0,r.jsx)("div",{className:"h-4 w-3/4 animate-pulse bg-muted rounded mb-2"}),(0,r.jsx)("div",{className:"h-3 w-1/2 animate-pulse bg-muted rounded"})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(ye,{className:"font-normal",children:(0,r.jsxs)("div",{className:"flex flex-col space-y-1",children:[(0,r.jsx)("p",{className:"text-sm font-medium leading-none",children:d.displayName}),(0,r.jsx)("p",{className:"text-xs leading-none text-muted-foreground",children:d.emails?.[0]?.value})]})}),(0,r.jsx)(L,{}),(0,r.jsx)(he,{children:(0,r.jsxs)(R,{onClick:v,children:[(0,r.jsx)(B,{Icon:G.User}),(0,r.jsx)("span",{children:"Profile"})]})}),(0,r.jsx)(L,{}),(0,r.jsxs)(R,{onClick:y,children:[(0,r.jsx)(B,{Icon:G.LogOut}),(0,r.jsx)("span",{children:"Log out"})]})]})})]}):(0,r.jsx)(P,{variant:"default","aria-label":"Sign in",onClick:()=>{if(!D)throw new Error("Environment ID is required");if(!w)throw new Error("Identity Host is required");let n=`${w}/signin/${D}`;window.open(n,"_blank")},children:"Sign in"}),(0,r.jsxs)(Ne,{open:k,onOpenChange:M,children:[(0,r.jsx)(Pe,{asChild:!0,children:(0,r.jsx)(P,{variant:"ghost",size:"icon",className:"md:hidden","aria-label":"Open Menu",children:(0,r.jsx)(B,{Icon:G.Menu})})}),(0,r.jsx)(Ce,{side:"left",className:"pr-0",children:(0,r.jsx)("nav",{className:"grid gap-2 py-6",children:t?.map((n,c)=>(0,r.jsx)("a",{href:n.href,className:s("flex w-full items-center rounded-md px-3 py-2 text-sm font-medium hover:bg-accent",n.disabled&&"cursor-not-allowed opacity-80"),onClick:()=>M(!1),children:n.title},c))})})]})]})]})})}var S=require("react");var Me=require("@radix-ui/react-slot"),Se=require("class-variance-authority");var Re=require("react/jsx-runtime"),Ye=(0,Se.cva)("inline-flex items-center justify-center rounded-md border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function te({className:t,variant:o,asChild:a=!1,...l}){return(0,Re.jsx)(a?Me.Slot:"span",{"data-slot":"badge",className:s(Ye({variant:o}),t),...l})}var O=require("lucide-react"),e=require("react/jsx-runtime"),Ie=({loading:t,user:o,handleAuthenticated:a,onRequestEmailVerification:l,onVerifyEmail:d})=>{let[h,x]=(0,S.useState)(!1),[v,y]=(0,S.useState)("profile"),[g,w]=(0,S.useState)(null),[D,k]=(0,S.useState)({});(0,S.useEffect)(()=>{x(!0)},[]),(0,S.useEffect)(()=>{!t&&a&&a()},[t,o,a]);let M={className:"mr-2 h-4 w-4","aria-hidden":"true"},u=n=>h?(0,e.jsx)(n,{...M}):null;return!h||t?(0,e.jsx)("div",{children:"Loading..."}):o?(0,e.jsxs)("div",{className:"grid grid-cols-[14rem,1fr] w-full bg-transparent",children:[(0,e.jsxs)("div",{className:"h-full border-r border-border p-3 md:p-4 bg-transparent flex flex-col min-w-0",children:[(0,e.jsxs)("div",{className:"mb-3 md:mb-4",children:[(0,e.jsx)("h1",{className:"text-xl font-bold text-foreground",children:"Account"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Manage your account info."})]}),(0,e.jsxs)("nav",{className:"space-y-1 flex-1",children:[(0,e.jsxs)("button",{onClick:()=>y("profile"),className:`flex items-center w-full px-3 py-2 text-sm rounded-md ${v==="profile"?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50"}`,children:[u(O.User),"Profile"]}),(0,e.jsxs)("button",{onClick:()=>y("security"),className:`flex items-center w-full px-3 py-2 text-sm rounded-md ${v==="security"?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50"}`,children:[u(O.Shield),"Security"]}),(0,e.jsxs)("button",{onClick:()=>y("preferences"),className:`flex items-center w-full px-3 py-2 text-sm rounded-md ${v==="preferences"?"bg-muted text-foreground":"text-muted-foreground hover:bg-muted/50"}`,children:[u(O.SlidersHorizontal),"Preferences"]})]})]}),(0,e.jsxs)("div",{className:"h-full p-3 md:p-5 min-w-0 bg-transparent",children:[(0,e.jsx)("div",{className:"flex justify-between items-center mb-3 md:mb-4",children:(0,e.jsx)("h2",{className:"text-xl font-semibold text-foreground",children:v==="profile"?"Profile details":v==="security"?"Security settings":"Preferences"})}),v==="profile"?(0,e.jsxs)("div",{className:"space-y-5 md:space-y-6",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3 text-foreground",children:"Profile"}),(0,e.jsx)("div",{className:"flex items-center justify-between",children:(0,e.jsxs)("div",{className:"flex items-center",children:[(0,e.jsxs)(V,{className:"h-12 w-12 mr-4 border",children:[(0,e.jsx)(z,{src:o.photos?.[0]?.value,alt:"Profile picture"}),(0,e.jsx)(E,{children:o.displayName?.split(" ").map(n=>n[0]).join("")})]}),(0,e.jsx)("span",{className:"font-medium text-foreground",children:o.displayName})]})})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3 text-foreground",children:"Email addresses"}),(0,e.jsx)("div",{className:"space-y-2.5",children:o.emails.map((n,c)=>{let j=(o?.verifications||[]).find(H=>H.email===n.value)?.verified===!0,F=D[n.value]||"";return(0,e.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,e.jsxs)("div",{className:"flex flex-col",children:[(0,e.jsx)("span",{className:"text-foreground",children:n.value}),(0,e.jsx)("div",{className:"mt-1",children:j?(0,e.jsx)(te,{className:"text-xs bg-green-600 text-white border-green-700 dark:bg-green-500 dark:text-white dark:border-green-600",children:"Verified"}):(0,e.jsx)(te,{className:"text-xs bg-amber-500 text-white border-amber-600 dark:bg-amber-500 dark:text-white dark:border-amber-600",children:"Not verified"})})]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[c===0&&(0,e.jsx)(te,{variant:"outline",className:"text-xs bg-muted text-foreground hover:bg-muted",children:"Primary"}),!j&&(0,e.jsx)(e.Fragment,{children:g===n.value?(0,e.jsxs)("div",{className:"flex items-center gap-1",children:[(0,e.jsx)("input",{className:"h-7 w-24 text-sm rounded-md border border-border bg-background px-2 text-foreground",placeholder:"Code",value:F,onChange:H=>k(se=>({...se,[n.value]:H.target.value}))}),(0,e.jsx)("button",{className:"h-7 rounded-md border border-border px-2 text-xs",onClick:async()=>{d&&await d(n.value,F)},children:"Verify"}),(0,e.jsx)("button",{className:"h-7 rounded-md border border-border px-2 text-xs",onClick:()=>w(null),children:"Cancel"})]}):(0,e.jsx)(e.Fragment,{children:(0,e.jsx)("button",{className:"h-7 rounded-md border border-border px-2 text-xs",onClick:async()=>{l&&await l(n.value),w(n.value)},children:"Send code"})})})]})]},n.value)})})]}),(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Connected accounts"}),(0,e.jsx)("div",{className:"space-y-2.5",children:(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("div",{className:"flex items-center",children:(0,e.jsx)("div",{className:"mr-2",children:(0,e.jsx)("span",{className:"text-gray-900 dark:text-gray-100",children:o.provider})})}),(0,e.jsx)("span",{className:"text-sm text-gray-500 dark:text-gray-400",children:o?.emails?.[0]?.value})]},o.provider)})]})]}):v==="security"?(0,e.jsxs)("div",{className:"space-y-5 md:space-y-6",children:[(0,e.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,e.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Password"}),(0,e.jsx)("button",{className:"text-sm text-indigo-600 hover:underline",children:"Set password"})]})}),(0,e.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,e.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Passkeys"}),(0,e.jsx)("button",{className:"text-sm text-indigo-600 hover:underline",children:"+\xA0Add a passkey"})]})}),(0,e.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,e.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Two-step verification"}),(0,e.jsx)("button",{className:"text-sm text-indigo-600 hover:underline",children:"+\xA0Add two-step verification"})]})}),(0,e.jsxs)("div",{className:"border rounded-md overflow-hidden",children:[(0,e.jsx)("div",{className:"px-4 py-3 border-b text-sm font-medium text-gray-900 dark:text-gray-100",children:"Active devices"}),(0,e.jsx)("div",{className:"p-4 space-y-3",children:(0,e.jsxs)("div",{className:"text-sm",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("span",{className:"inline-block h-5 w-5 rounded-sm bg-gray-900 dark:bg-white"}),(0,e.jsx)("span",{className:"font-medium",children:"X11"}),(0,e.jsx)("span",{className:"text-xs rounded-md border px-2 py-0.5 text-gray-600 dark:text-gray-300",children:"This device"})]}),(0,e.jsx)("div",{className:"text-gray-600 dark:text-gray-400 mt-1",children:"Firefox 142.0"}),(0,e.jsx)("div",{className:"text-gray-600 dark:text-gray-400",children:"127.0.0.1 (Local), (Your City)"}),(0,e.jsx)("div",{className:"text-gray-600 dark:text-gray-400",children:"Today at 7:08 PM"})]})})]}),(0,e.jsx)("div",{className:"border rounded-md overflow-hidden",children:(0,e.jsxs)("div",{className:"flex items-center justify-between px-4 py-3",children:[(0,e.jsx)("div",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Delete account"}),(0,e.jsx)("button",{className:"text-sm text-red-600 hover:underline",children:"Delete account"})]})})]}):(0,e.jsx)("div",{className:"space-y-5 md:space-y-6",children:(0,e.jsxs)("div",{children:[(0,e.jsx)("h3",{className:"text-sm font-medium mb-3 text-gray-900 dark:text-gray-100",children:"Preferences"}),(0,e.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Locale"}),(0,e.jsx)("span",{className:"text-gray-500 dark:text-gray-400",children:"Auto"})]}),(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("span",{className:"text-gray-700 dark:text-gray-300",children:"Theme"}),(0,e.jsx)("span",{className:"text-gray-500 dark:text-gray-400",children:"System"})]})]})]})})]})]}):(0,e.jsx)("div",{children:"No user"})};var _=require("lucide-react"),p=require("react/jsx-runtime"),Je=t=>t&&String(t).trim().split(/\s+/).slice(0,2).map(l=>l[0]?.toUpperCase()).join("")||"?",Te=({trigger:t,user:o,className:a,onManageAccount:l,onSignout:d,links:h=[],side:x="bottom",align:v="end",sideOffset:y=8})=>{let g=o?.emails?.[0]?.value||o?.email||"",w=o?.displayName||o?.name||"",D=o?.photos?.[0]?.value||o?.avatar||"",k=u=>{if(u.onClick)return u.onClick();u.href&&(u.href.startsWith("http")?window.open(u.href,"_blank"):window.location.assign(u.href))},M=_.ExternalLink;return(0,p.jsxs)(Y,{children:[(0,p.jsx)(J,{className:"inline-flex items-center justify-center h-10 w-10 rounded-full focus:outline-none",children:t}),(0,p.jsxs)(Q,{align:v,side:x,sideOffset:y,className:s("w-72 p-2 overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md",a),children:[(0,p.jsxs)("div",{className:"flex items-center gap-3 px-4 pt-4 pb-3",children:[(0,p.jsxs)(V,{className:"h-9 w-9 rounded-full",children:[(0,p.jsx)(z,{src:D,alt:w}),(0,p.jsx)(E,{className:"rounded-full",children:Je(w)})]}),(0,p.jsxs)("div",{className:"min-w-0",children:[(0,p.jsx)("div",{className:"text-sm font-semibold truncate",children:w}),(0,p.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:g})]})]}),(0,p.jsx)(L,{}),(0,p.jsxs)(R,{className:"cursor-pointer py-2",onClick:()=>l?.(),children:[(0,p.jsx)(_.Settings,{className:"mr-2 h-4 w-4"}),(0,p.jsx)("span",{children:"Manage account"})]}),h.map((u,n)=>{let c=u.icon??M;return(0,p.jsxs)(R,{className:"cursor-pointer py-2",onClick:()=>k(u),children:[(0,p.jsx)(c,{className:"mr-2 h-4 w-4"}),(0,p.jsx)("span",{children:u.label})]},`${u.label}-${n}`)}),(0,p.jsx)(L,{}),(0,p.jsxs)(R,{className:"cursor-pointer text-red-600 focus:text-red-700 py-2",onClick:()=>d?.(),children:[(0,p.jsx)(_.LogOut,{className:"mr-2 h-4 w-4"}),(0,p.jsx)("span",{children:"Sign out"})]})]})]})};var ze=require("lucide-react");var Ae=require("class-variance-authority");var ae=require("react/jsx-runtime"),Qe=(0,Ae.cva)("relative w-full rounded-lg border px-4 py-3 text-sm grid has-[>svg]:grid-cols-[calc(var(--spacing)*4)_1fr] grid-cols-[0_1fr] has-[>svg]:gap-x-3 gap-y-0.5 items-start [&>svg]:size-4 [&>svg]:translate-y-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"text-destructive bg-card [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90"}},defaultVariants:{variant:"default"}});function oe({className:t,variant:o,...a}){return(0,ae.jsx)("div",{"data-slot":"alert",role:"alert",className:s(Qe({variant:o}),t),...a})}function Ve({className:t,...o}){return(0,ae.jsx)("div",{"data-slot":"alert-title",className:s("col-start-2 line-clamp-1 min-h-4 font-medium tracking-tight",t),...o})}function re({className:t,...o}){return(0,ae.jsx)("div",{"data-slot":"alert-description",className:s("text-muted-foreground col-start-2 grid justify-items-start gap-1 text-sm [&_p]:leading-relaxed",t),...o})}var I=require("react/jsx-runtime"),Ee=t=>{let o=t.title??"Placeholder Alert",a=t.description??"This is a placeholder alert.";return(0,I.jsx)("div",{className:"grid w-full max-w-xl items-start gap-4",children:(0,I.jsxs)(oe,{children:[(0,I.jsx)(B,{Icon:ze.CheckCircle2Icon}),(0,I.jsx)(Ve,{children:o}),(0,I.jsx)(re,{children:a})]})})};var T=require("react");var le=require("react/jsx-runtime");function ne({className:t,...o}){return(0,le.jsx)("div",{"data-slot":"card",className:s("bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",t),...o})}function ie({className:t,...o}){return(0,le.jsx)("div",{"data-slot":"card-content",className:s("px-6",t),...o})}var U=require("lucide-react"),i=require("react/jsx-runtime"),Le=({onValidate:t})=>{let[o,a]=(0,T.useState)(["","","","","",""]),[l,d]=(0,T.useState)(!1),[h,x]=(0,T.useState)(""),[v,y]=(0,T.useState)(!1),g=(0,T.useRef)([]),w=(n,c)=>{if(!/^\d*$/.test(c))return;let N=[...o];N[n]=c.slice(-1),a(N),x(""),y(!1),c&&n<5&&g.current[n+1]?.focus()},D=(n,c)=>{c.key==="Backspace"&&!o[n]&&n>0&&g.current[n-1]?.focus(),c.key==="v"&&(c.ctrlKey||c.metaKey)&&(c.preventDefault(),navigator.clipboard.readText().then(N=>{let j=N.replace(/\D/g,"").slice(0,6).split(""),F=[...o];j.forEach((se,ce)=>{ce<6&&(F[ce]=se)}),a(F);let H=Math.min(j.length,5);g.current[H]?.focus()}))},k=async()=>{let n=o.join("");if(n.length!==6){x("Please enter all 6 digits");return}d(!0),x("");try{await t(n),y(!0)}catch{x("Invalid TOTP code. Please try again.")}finally{d(!1)}},M=n=>{n.preventDefault(),k()},u=()=>{a(["","","","","",""]),x(""),y(!1),d(!1),g.current[0]?.focus()};return v?(0,i.jsx)("div",{className:"max-w-md mx-auto",children:(0,i.jsx)(ne,{className:"border-green-200 bg-green-50",children:(0,i.jsx)(ie,{className:"pt-6",children:(0,i.jsxs)("div",{className:"text-center space-y-4",children:[(0,i.jsx)("div",{className:"mx-auto w-16 h-16 bg-green-100 rounded-full flex items-center justify-center",children:(0,i.jsx)(U.CheckCircle,{className:"w-8 h-8 text-green-600"})}),(0,i.jsxs)("div",{children:[(0,i.jsx)("h3",{className:"text-lg font-semibold text-green-900",children:"Verification Successful!"}),(0,i.jsx)("p",{className:"text-sm text-green-700 mt-1",children:"Your TOTP code has been validated."})]}),(0,i.jsx)(P,{onClick:u,variant:"outline",className:"bg-white",children:"Verify Another Code"})]})})})}):(0,i.jsx)("div",{className:"max-w-md mx-auto",children:(0,i.jsx)(ne,{children:(0,i.jsx)(ie,{className:"pt-6",children:(0,i.jsxs)("div",{className:"text-center space-y-6",children:[(0,i.jsxs)("div",{children:[(0,i.jsx)("div",{className:"mx-auto w-12 h-12 bg-blue-100 rounded-full flex items-center justify-center mb-4",children:(0,i.jsx)(U.Shield,{className:"w-6 h-6 text-blue-600"})}),(0,i.jsx)("h3",{className:"text-lg font-semibold",children:"Enter Verification Code"}),(0,i.jsx)("p",{className:"text-sm text-muted-foreground mt-1",children:"Enter the 6-digit code from your authenticator app"})]}),(0,i.jsxs)("form",{onSubmit:M,className:"space-y-6",children:[(0,i.jsx)("div",{className:"flex justify-center gap-2",children:o.map((n,c)=>(0,i.jsx)(ne,{className:"w-12 h-14 border-2 focus-within:border-blue-500 transition-colors",children:(0,i.jsx)(ie,{className:"p-0 h-full flex items-center justify-center",children:(0,i.jsx)("input",{ref:N=>{g.current[c]=N},type:"tel",inputMode:"numeric",maxLength:1,value:n,onChange:N=>w(c,N.target.value),onKeyDown:N=>D(c,N),className:"w-full h-full text-center text-2xl font-bold border-none outline-none bg-transparent",autoComplete:"one-time-code",disabled:l,style:{height:"auto"}})})},c))}),h&&(0,i.jsxs)(oe,{variant:"destructive",children:[(0,i.jsx)(U.AlertCircle,{className:"h-4 w-4"}),(0,i.jsx)(re,{children:h})]}),(0,i.jsxs)("div",{className:"space-y-3",children:[(0,i.jsx)(P,{type:"submit",className:"w-full",disabled:l||o.some(n=>n===""),children:l?"Verifying...":"Verify Code"}),(0,i.jsx)(P,{type:"button",variant:"ghost",size:"sm",onClick:u,className:"w-full text-xs",children:"Clear Code"})]})]}),(0,i.jsx)("p",{className:"text-xs text-muted-foreground",children:"Codes refresh every 30 seconds"})]})})})})};
3
3
  //# sourceMappingURL=index.js.map