@authdog/react-elements 0.0.49 → 0.2.0

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.
Files changed (81) hide show
  1. package/dist/components/ui/alert.d.mts +12 -0
  2. package/dist/components/ui/alert.d.ts +12 -0
  3. package/dist/components/ui/avatar.d.mts +8 -0
  4. package/dist/components/ui/avatar.d.ts +8 -0
  5. package/dist/components/ui/badge.d.mts +12 -0
  6. package/dist/components/ui/badge.d.ts +12 -0
  7. package/dist/components/ui/button.d.mts +14 -0
  8. package/dist/components/ui/button.d.ts +14 -0
  9. package/dist/components/ui/button.js.map +1 -1
  10. package/dist/components/ui/button.mjs.map +1 -1
  11. package/dist/components/ui/card.d.mts +11 -0
  12. package/dist/components/ui/card.d.ts +11 -0
  13. package/dist/components/ui/dropdown-menu.d.mts +27 -0
  14. package/dist/components/ui/dropdown-menu.d.ts +27 -0
  15. package/dist/components/ui/input.d.mts +5 -0
  16. package/dist/components/ui/input.d.ts +5 -0
  17. package/dist/components/ui/label.d.mts +6 -0
  18. package/dist/components/ui/label.d.ts +6 -0
  19. package/dist/components/ui/separator.d.mts +6 -0
  20. package/dist/components/ui/separator.d.ts +6 -0
  21. package/dist/components/ui/sheet.d.mts +15 -0
  22. package/dist/components/ui/sheet.d.ts +15 -0
  23. package/dist/components/ui/theme-toggle.d.mts +5 -0
  24. package/dist/components/ui/theme-toggle.d.ts +5 -0
  25. package/dist/components/ui/theme-toggle.js.map +1 -1
  26. package/dist/components/ui/theme-toggle.mjs.map +1 -1
  27. package/dist/index.d.mts +12 -21
  28. package/dist/index.d.ts +12 -21
  29. package/dist/index.js +1 -1
  30. package/dist/index.js.map +1 -1
  31. package/dist/index.mjs +1 -1
  32. package/dist/index.mjs.map +1 -1
  33. package/dist/lib/utils.d.mts +5 -0
  34. package/dist/lib/utils.d.ts +5 -0
  35. package/dist/styles.css +1 -4
  36. package/package.json +40 -25
  37. package/.eslintrc.js +0 -9
  38. package/.storybook/main.ts +0 -21
  39. package/.storybook/preview.ts +0 -17
  40. package/.storybook/vitest.setup.ts +0 -7
  41. package/.turbo/turbo-build.log +0 -77
  42. package/CHANGELOG.md +0 -286
  43. package/components.json +0 -20
  44. package/postcss.config.mjs +0 -11
  45. package/src/components/core/client-only.tsx +0 -15
  46. package/src/components/core/navbar.tsx +0 -307
  47. package/src/components/core/placeholder-alert.tsx +0 -23
  48. package/src/components/core/user-dropdown.tsx +0 -160
  49. package/src/components/core/user-profile.tsx +0 -521
  50. package/src/components/flow/login.tsx +0 -167
  51. package/src/components/flow/totp-validator.tsx +0 -252
  52. package/src/components/icons.tsx +0 -30
  53. package/src/components/ui/alert.tsx +0 -66
  54. package/src/components/ui/avatar.tsx +0 -53
  55. package/src/components/ui/badge.tsx +0 -46
  56. package/src/components/ui/button.tsx +0 -56
  57. package/src/components/ui/card.tsx +0 -92
  58. package/src/components/ui/dropdown-menu.tsx +0 -265
  59. package/src/components/ui/input.tsx +0 -21
  60. package/src/components/ui/label.tsx +0 -24
  61. package/src/components/ui/separator.tsx +0 -28
  62. package/src/components/ui/sheet.tsx +0 -142
  63. package/src/components/ui/theme-toggle.tsx +0 -56
  64. package/src/global.css +0 -81
  65. package/src/index.ts +0 -8
  66. package/src/lib/utils.ts +0 -6
  67. package/src/stories/core/Navbar.stories.tsx +0 -51
  68. package/src/stories/core/PlaceholderAlert.stories.tsx +0 -23
  69. package/src/stories/core/UserDropdown.stories.tsx +0 -56
  70. package/src/stories/core/UserProfile.stories.tsx +0 -47
  71. package/src/stories/flow/LoginForm.stories.tsx +0 -20
  72. package/src/stories/flow/TotpValidator.stories.tsx +0 -23
  73. package/src/stories/showcase/Landing.stories.tsx +0 -376
  74. package/src/stories/ui/Button.stories.tsx +0 -45
  75. package/src/types.ts +0 -0
  76. package/tailwind.config.ts +0 -82
  77. package/tsconfig.json +0 -11
  78. package/tsup.config.ts +0 -31
  79. package/vitest.config.ts +0 -39
  80. package/vitest.shims.d.ts +0 -1
  81. package/wrangler.prod.toml +0 -4
@@ -0,0 +1,12 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const alertVariants: (props?: ({
6
+ variant?: "default" | "destructive" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
9
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+
12
+ export { Alert, AlertDescription, AlertTitle };
@@ -0,0 +1,12 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const alertVariants: (props?: ({
6
+ variant?: "default" | "destructive" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ declare function Alert({ className, variant, ...props }: React.ComponentProps<"div"> & VariantProps<typeof alertVariants>): React.JSX.Element;
9
+ declare function AlertTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+ declare function AlertDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+
12
+ export { Alert, AlertDescription, AlertTitle };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
+
4
+ declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): React.JSX.Element;
5
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
6
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
7
+
8
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -0,0 +1,8 @@
1
+ import * as React from 'react';
2
+ import * as AvatarPrimitive from '@radix-ui/react-avatar';
3
+
4
+ declare function Avatar({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root>): React.JSX.Element;
5
+ declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): React.JSX.Element;
6
+ declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): React.JSX.Element;
7
+
8
+ export { Avatar, AvatarFallback, AvatarImage };
@@ -0,0 +1,12 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const badgeVariants: (props?: ({
6
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
9
+ asChild?: boolean;
10
+ }): React.JSX.Element;
11
+
12
+ export { Badge, badgeVariants };
@@ -0,0 +1,12 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const badgeVariants: (props?: ({
6
+ variant?: "default" | "destructive" | "outline" | "secondary" | null | undefined;
7
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
8
+ declare function Badge({ className, variant, asChild, ...props }: React.ComponentProps<"span"> & VariantProps<typeof badgeVariants> & {
9
+ asChild?: boolean;
10
+ }): React.JSX.Element;
11
+
12
+ export { Badge, badgeVariants };
@@ -0,0 +1,14 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const buttonVariants: (props?: ({
6
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
7
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
+ asChild?: boolean;
11
+ }
12
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
+
14
+ export { Button, type ButtonProps, buttonVariants };
@@ -0,0 +1,14 @@
1
+ import * as class_variance_authority_types from 'class-variance-authority/types';
2
+ import * as React from 'react';
3
+ import { VariantProps } from 'class-variance-authority';
4
+
5
+ declare const buttonVariants: (props?: ({
6
+ variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
7
+ size?: "default" | "sm" | "lg" | "icon" | null | undefined;
8
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
9
+ interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
10
+ asChild?: boolean;
11
+ }
12
+ declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
13
+
14
+ export { Button, type ButtonProps, buttonVariants };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"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"],"mappings":";0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,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,KAAiB,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,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc","names":["button_exports","__export","Button","buttonVariants","__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"]}
1
+ {"version":3,"sources":["../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"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\n 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"],"mappings":";0jBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,YAAAE,EAAA,mBAAAC,IAAA,eAAAC,EAAAJ,GAAA,IAAAK,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDyCM,IAAAC,EAAA,6BAxCAC,KAAiB,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,EASMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAGtD,OAFWF,EAAU,OAAO,SAE3B,CACC,UAAWG,EAAGR,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc","names":["button_exports","__export","Button","buttonVariants","__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"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"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"],"mappings":";AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BCFvC,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDwCM,cAAAC,MAAA,oBAvCN,IAAMC,EAAiBC,EACrB,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,IAGtDT,EAFWO,EAAUG,EAAO,SAE3B,CACC,UAAWC,EAAGV,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn"]}
1
+ {"version":3,"sources":["../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"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\n 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"],"mappings":";AAAA,UAAYA,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BCFvC,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDyCM,cAAAC,MAAA,oBAxCN,IAAMC,EAAiBC,EACrB,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,EASMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAGtDT,EAFWO,EAAUG,EAAO,SAE3B,CACC,UAAWC,EAAGV,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc","names":["React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn"]}
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+
3
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
4
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
6
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+
11
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -0,0 +1,11 @@
1
+ import * as React from 'react';
2
+
3
+ declare function Card({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
4
+ declare function CardHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
5
+ declare function CardTitle({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
6
+ declare function CardDescription({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
7
+ declare function CardAction({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
8
+ declare function CardContent({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
9
+ declare function CardFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
10
+
11
+ export { Card, CardAction, CardContent, CardDescription, CardFooter, CardHeader, CardTitle };
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+
4
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
5
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
6
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ variant?: "default" | "destructive";
12
+ } & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
17
+ inset?: boolean;
18
+ } & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ declare const DropdownMenuShortcut: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
21
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
22
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
23
+ inset?: boolean;
24
+ } & React.RefAttributes<HTMLDivElement>>;
25
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
+
27
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -0,0 +1,27 @@
1
+ import * as React from 'react';
2
+ import * as DropdownMenuPrimitive from '@radix-ui/react-dropdown-menu';
3
+
4
+ declare function DropdownMenu({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Root>): React.JSX.Element;
5
+ declare function DropdownMenuPortal({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Portal>): React.JSX.Element;
6
+ declare const DropdownMenuTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuTriggerProps & React.RefAttributes<HTMLButtonElement>, "ref"> & React.RefAttributes<HTMLButtonElement>>;
7
+ declare const DropdownMenuContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
8
+ declare const DropdownMenuGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
9
+ declare const DropdownMenuItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
10
+ inset?: boolean;
11
+ variant?: "default" | "destructive";
12
+ } & React.RefAttributes<HTMLDivElement>>;
13
+ declare const DropdownMenuCheckboxItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
14
+ declare const DropdownMenuRadioGroup: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
15
+ declare const DropdownMenuRadioItem: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
16
+ declare const DropdownMenuLabel: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
17
+ inset?: boolean;
18
+ } & React.RefAttributes<HTMLDivElement>>;
19
+ declare const DropdownMenuSeparator: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
20
+ declare const DropdownMenuShortcut: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & React.RefAttributes<HTMLSpanElement>>;
21
+ declare function DropdownMenuSub({ ...props }: React.ComponentProps<typeof DropdownMenuPrimitive.Sub>): React.JSX.Element;
22
+ declare const DropdownMenuSubTrigger: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & React.RefAttributes<HTMLDivElement>, "ref"> & {
23
+ inset?: boolean;
24
+ } & React.RefAttributes<HTMLDivElement>>;
25
+ declare const DropdownMenuSubContent: React.ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
26
+
27
+ export { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuPortal, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+
3
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
4
+
5
+ export { Input };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+
3
+ declare function Input({ className, type, ...props }: React.ComponentProps<"input">): React.JSX.Element;
4
+
5
+ export { Input };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+
4
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
5
+
6
+ export { Label };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as LabelPrimitive from '@radix-ui/react-label';
3
+
4
+ declare function Label({ className, ...props }: React.ComponentProps<typeof LabelPrimitive.Root>): React.JSX.Element;
5
+
6
+ export { Label };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+
4
+ declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
5
+
6
+ export { Separator };
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import * as SeparatorPrimitive from '@radix-ui/react-separator';
3
+
4
+ declare function Separator({ className, orientation, decorative, ...props }: React.ComponentProps<typeof SeparatorPrimitive.Root>): React.JSX.Element;
5
+
6
+ export { Separator };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
3
+
4
+ declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
5
+ declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
6
+ declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
7
+ declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
8
+ side?: "top" | "right" | "bottom" | "left";
9
+ }): React.JSX.Element;
10
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
13
+ declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
14
+
15
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import * as SheetPrimitive from '@radix-ui/react-dialog';
3
+
4
+ declare function Sheet({ ...props }: React.ComponentProps<typeof SheetPrimitive.Root>): React.JSX.Element;
5
+ declare function SheetTrigger({ ...props }: React.ComponentProps<typeof SheetPrimitive.Trigger>): React.JSX.Element;
6
+ declare function SheetClose({ ...props }: React.ComponentProps<typeof SheetPrimitive.Close>): React.JSX.Element;
7
+ declare function SheetContent({ className, children, side, ...props }: React.ComponentProps<typeof SheetPrimitive.Content> & {
8
+ side?: "top" | "right" | "bottom" | "left";
9
+ }): React.JSX.Element;
10
+ declare function SheetHeader({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
11
+ declare function SheetFooter({ className, ...props }: React.ComponentProps<"div">): React.JSX.Element;
12
+ declare function SheetTitle({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Title>): React.JSX.Element;
13
+ declare function SheetDescription({ className, ...props }: React.ComponentProps<typeof SheetPrimitive.Description>): React.JSX.Element;
14
+
15
+ export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+
3
+ declare const ThemeToggle: () => React.JSX.Element;
4
+
5
+ export { ThemeToggle };
@@ -0,0 +1,5 @@
1
+ import * as React from 'react';
2
+
3
+ declare const ThemeToggle: () => React.JSX.Element;
4
+
5
+ export { ThemeToggle };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/theme-toggle.tsx","../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"cursor-pointer\"\n aria-label={mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"}\n onClick={toggle}\n >\n {mode === \"dark\" ? <Sun className=\"h-4 w-4\" /> : <Moon className=\"h-4 w-4\" />}\n </Button>\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 \"../../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"],"mappings":";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAAoC,iBACpCC,EAA0B,wBCH1B,IAAAC,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,KAAiB,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,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,SDDI,IAAAQ,EAAA,6BA7CnBC,EAAc,gBAIdC,EAAoB,IAAiB,CACzC,GAAI,OAAO,OAAW,IAAa,MAAO,QAC1C,IAAMC,EAAS,OAAO,aAAa,QAAQF,CAAW,EACtD,OAAIE,IAAW,SAAWA,IAAW,OAC5BA,EAEF,OAAO,WAAW,8BAA8B,EAAE,QAAU,OAAS,OAC9E,EAEMC,EAAcC,GAAoB,CACtC,SAAS,gBAAgB,UAAU,OAAO,OAAQA,IAAS,MAAM,CACnE,EAEaC,EAAc,IAAM,CAC/B,GAAM,CAACD,EAAME,CAAO,KAAI,YAAoB,OAAO,EAEnD,sBAAU,IAAM,CACd,IAAMC,EAAUN,EAAkB,EAClCE,EAAWI,CAAO,EAClBD,EAAQC,CAAO,CACjB,EAAG,CAAC,CAAC,KAcH,OAACC,EAAA,CACC,QAAQ,QACR,KAAK,OACL,UAAU,iBACV,aAAYJ,IAAS,OAAS,wBAA0B,uBACxD,QAjBW,IAAM,CACnB,IAAMK,EAAsBL,IAAS,OAAS,QAAU,OACxDD,EAAWM,CAAQ,EACnB,GAAI,CACF,OAAO,aAAa,QAAQT,EAAaS,CAAQ,CACnD,MAAQ,CAER,CACAH,EAAQG,CAAQ,CAClB,EAUK,SAAAL,IAAS,UAAS,OAAC,OAAI,UAAU,UAAU,KAAK,OAAC,QAAK,UAAU,UAAU,EAC7E,CAEJ","names":["theme_toggle_exports","__export","ThemeToggle","__toCommonJS","import_react","import_lucide_react","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_jsx_runtime","STORAGE_KEY","getPreferredTheme","stored","applyTheme","mode","ThemeToggle","setMode","initial","Button","nextMode"]}
1
+ {"version":3,"sources":["../../../src/components/ui/theme-toggle.tsx","../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"cursor-pointer\"\n aria-label={\n mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"\n }\n onClick={toggle}\n >\n {mode === \"dark\" ? (\n <Sun className=\"h-4 w-4\" />\n ) : (\n <Moon className=\"h-4 w-4\" />\n )}\n </Button>\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 \"../../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\n 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"],"mappings":";ukBAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,iBAAAE,IAAA,eAAAC,EAAAH,GAEA,IAAAI,EAAoC,iBACpCC,EAA0B,wBCH1B,IAAAC,EAAuB,oBACvBC,EAAqB,gCACrBC,EAAuC,oCCFvC,IAAAC,EAAsC,gBACtCC,EAAwB,0BAEjB,SAASC,KAAMC,EAAsB,CAC1C,SAAO,cAAQ,QAAKA,CAAM,CAAC,CAC7B,CDyCM,IAAAC,EAAA,6BAxCAC,KAAiB,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,EASMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,OAGtD,OAFWF,EAAU,OAAO,SAE3B,CACC,UAAWG,EAAGR,EAAe,CAAE,QAAAG,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,SDGb,IAAAQ,EAAA,6BAlDFC,EAAc,gBAIdC,EAAoB,IAAiB,CACzC,GAAI,OAAO,OAAW,IAAa,MAAO,QAC1C,IAAMC,EAAS,OAAO,aAAa,QAAQF,CAAW,EACtD,OAAIE,IAAW,SAAWA,IAAW,OAC5BA,EAEF,OAAO,WAAW,8BAA8B,EAAE,QACrD,OACA,OACN,EAEMC,EAAcC,GAAoB,CACtC,SAAS,gBAAgB,UAAU,OAAO,OAAQA,IAAS,MAAM,CACnE,EAEaC,EAAc,IAAM,CAC/B,GAAM,CAACD,EAAME,CAAO,KAAI,YAAoB,OAAO,EAEnD,sBAAU,IAAM,CACd,IAAMC,EAAUN,EAAkB,EAClCE,EAAWI,CAAO,EAClBD,EAAQC,CAAO,CACjB,EAAG,CAAC,CAAC,KAcH,OAACC,EAAA,CACC,QAAQ,QACR,KAAK,OACL,UAAU,iBACV,aACEJ,IAAS,OAAS,wBAA0B,uBAE9C,QAnBW,IAAM,CACnB,IAAMK,EAAsBL,IAAS,OAAS,QAAU,OACxDD,EAAWM,CAAQ,EACnB,GAAI,CACF,OAAO,aAAa,QAAQT,EAAaS,CAAQ,CACnD,MAAQ,CAER,CACAH,EAAQG,CAAQ,CAClB,EAYK,SAAAL,IAAS,UACR,OAAC,OAAI,UAAU,UAAU,KAEzB,OAAC,QAAK,UAAU,UAAU,EAE9B,CAEJ","names":["theme_toggle_exports","__export","ThemeToggle","__toCommonJS","import_react","import_lucide_react","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_jsx_runtime","STORAGE_KEY","getPreferredTheme","stored","applyTheme","mode","ThemeToggle","setMode","initial","Button","nextMode"]}
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/ui/theme-toggle.tsx","../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches ? \"dark\" : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"cursor-pointer\"\n aria-label={mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"}\n onClick={toggle}\n >\n {mode === \"dark\" ? <Sun className=\"h-4 w-4\" /> : <Moon className=\"h-4 w-4\" />}\n </Button>\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 \"../../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"],"mappings":";aAEA,OAAS,aAAAA,EAAW,YAAAC,MAAgB,QACpC,OAAS,OAAAC,EAAK,QAAAC,MAAY,eCH1B,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BCFvC,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDwCM,cAAAC,MAAA,oBAvCN,IAAMC,EAAiBC,EACrB,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,IAGtDT,EAFWO,EAAUG,EAAO,SAE3B,CACC,UAAWC,EAAGV,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,SDDI,cAAAS,MAAA,oBA7CzB,IAAMC,EAAc,gBAIdC,EAAoB,IAAiB,CACzC,GAAI,OAAO,OAAW,IAAa,MAAO,QAC1C,IAAMC,EAAS,OAAO,aAAa,QAAQF,CAAW,EACtD,OAAIE,IAAW,SAAWA,IAAW,OAC5BA,EAEF,OAAO,WAAW,8BAA8B,EAAE,QAAU,OAAS,OAC9E,EAEMC,EAAcC,GAAoB,CACtC,SAAS,gBAAgB,UAAU,OAAO,OAAQA,IAAS,MAAM,CACnE,EAEaC,EAAc,IAAM,CAC/B,GAAM,CAACD,EAAME,CAAO,EAAIC,EAAoB,OAAO,EAEnD,OAAAC,EAAU,IAAM,CACd,IAAMC,EAAUR,EAAkB,EAClCE,EAAWM,CAAO,EAClBH,EAAQG,CAAO,CACjB,EAAG,CAAC,CAAC,EAcHV,EAACW,EAAA,CACC,QAAQ,QACR,KAAK,OACL,UAAU,iBACV,aAAYN,IAAS,OAAS,wBAA0B,uBACxD,QAjBW,IAAM,CACnB,IAAMO,EAAsBP,IAAS,OAAS,QAAU,OACxDD,EAAWQ,CAAQ,EACnB,GAAI,CACF,OAAO,aAAa,QAAQX,EAAaW,CAAQ,CACnD,MAAQ,CAER,CACAL,EAAQK,CAAQ,CAClB,EAUK,SAAAP,IAAS,OAASL,EAACa,EAAA,CAAI,UAAU,UAAU,EAAKb,EAACc,EAAA,CAAK,UAAU,UAAU,EAC7E,CAEJ","names":["useEffect","useState","Sun","Moon","React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn","jsx","STORAGE_KEY","getPreferredTheme","stored","applyTheme","mode","ThemeToggle","setMode","useState","useEffect","initial","Button","nextMode","Sun","Moon"]}
1
+ {"version":3,"sources":["../../../src/components/ui/theme-toggle.tsx","../../../src/components/ui/button.tsx","../../../src/lib/utils.ts"],"sourcesContent":["\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { Sun, Moon } from \"lucide-react\";\n\nimport { Button } from \"./button\";\n\nconst STORAGE_KEY = \"authdog-theme\";\n\ntype ThemeMode = \"light\" | \"dark\";\n\nconst getPreferredTheme = (): ThemeMode => {\n if (typeof window === \"undefined\") return \"light\";\n const stored = window.localStorage.getItem(STORAGE_KEY);\n if (stored === \"light\" || stored === \"dark\") {\n return stored;\n }\n return window.matchMedia(\"(prefers-color-scheme: dark)\").matches\n ? \"dark\"\n : \"light\";\n};\n\nconst applyTheme = (mode: ThemeMode) => {\n document.documentElement.classList.toggle(\"dark\", mode === \"dark\");\n};\n\nexport const ThemeToggle = () => {\n const [mode, setMode] = useState<ThemeMode>(\"light\");\n\n useEffect(() => {\n const initial = getPreferredTheme();\n applyTheme(initial);\n setMode(initial);\n }, []);\n\n const toggle = () => {\n const nextMode: ThemeMode = mode === \"dark\" ? \"light\" : \"dark\";\n applyTheme(nextMode);\n try {\n window.localStorage.setItem(STORAGE_KEY, nextMode);\n } catch {\n // ignore\n }\n setMode(nextMode);\n };\n\n return (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n className=\"cursor-pointer\"\n aria-label={\n mode === \"dark\" ? \"Switch to light theme\" : \"Switch to dark theme\"\n }\n onClick={toggle}\n >\n {mode === \"dark\" ? (\n <Sun className=\"h-4 w-4\" />\n ) : (\n <Moon className=\"h-4 w-4\" />\n )}\n </Button>\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 \"../../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\n 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"],"mappings":";aAEA,OAAS,aAAAA,EAAW,YAAAC,MAAgB,QACpC,OAAS,OAAAC,EAAK,QAAAC,MAAY,eCH1B,UAAYC,MAAW,QACvB,OAAS,QAAAC,MAAY,uBACrB,OAAS,OAAAC,MAA8B,2BCFvC,OAA0B,QAAAC,MAAY,OACtC,OAAS,WAAAC,MAAe,iBAEjB,SAASC,KAAMC,EAAsB,CAC1C,OAAOF,EAAQD,EAAKG,CAAM,CAAC,CAC7B,CDyCM,cAAAC,MAAA,oBAxCN,IAAMC,EAAiBC,EACrB,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,EASMC,EAAe,aACnB,CAAC,CAAE,UAAAC,EAAW,QAAAC,EAAS,KAAAC,EAAM,QAAAC,EAAU,GAAO,GAAGC,CAAM,EAAGC,IAGtDT,EAFWO,EAAUG,EAAO,SAE3B,CACC,UAAWC,EAAGV,EAAe,CAAE,QAAAI,EAAS,KAAAC,EAAM,UAAAF,CAAU,CAAC,CAAC,EAC1D,IAAKK,EACJ,GAAGD,EACN,CAGN,EACAL,EAAO,YAAc,SDGb,cAAAS,MAAA,oBAlDR,IAAMC,EAAc,gBAIdC,EAAoB,IAAiB,CACzC,GAAI,OAAO,OAAW,IAAa,MAAO,QAC1C,IAAMC,EAAS,OAAO,aAAa,QAAQF,CAAW,EACtD,OAAIE,IAAW,SAAWA,IAAW,OAC5BA,EAEF,OAAO,WAAW,8BAA8B,EAAE,QACrD,OACA,OACN,EAEMC,EAAcC,GAAoB,CACtC,SAAS,gBAAgB,UAAU,OAAO,OAAQA,IAAS,MAAM,CACnE,EAEaC,EAAc,IAAM,CAC/B,GAAM,CAACD,EAAME,CAAO,EAAIC,EAAoB,OAAO,EAEnD,OAAAC,EAAU,IAAM,CACd,IAAMC,EAAUR,EAAkB,EAClCE,EAAWM,CAAO,EAClBH,EAAQG,CAAO,CACjB,EAAG,CAAC,CAAC,EAcHV,EAACW,EAAA,CACC,QAAQ,QACR,KAAK,OACL,UAAU,iBACV,aACEN,IAAS,OAAS,wBAA0B,uBAE9C,QAnBW,IAAM,CACnB,IAAMO,EAAsBP,IAAS,OAAS,QAAU,OACxDD,EAAWQ,CAAQ,EACnB,GAAI,CACF,OAAO,aAAa,QAAQX,EAAaW,CAAQ,CACnD,MAAQ,CAER,CACAL,EAAQK,CAAQ,CAClB,EAYK,SAAAP,IAAS,OACRL,EAACa,EAAA,CAAI,UAAU,UAAU,EAEzBb,EAACc,EAAA,CAAK,UAAU,UAAU,EAE9B,CAEJ","names":["useEffect","useState","Sun","Moon","React","Slot","cva","clsx","twMerge","cn","inputs","jsx","buttonVariants","cva","Button","className","variant","size","asChild","props","ref","Slot","cn","jsx","STORAGE_KEY","getPreferredTheme","stored","applyTheme","mode","ThemeToggle","setMode","useState","useEffect","initial","Button","nextMode","Sun","Moon"]}
package/dist/index.d.mts CHANGED
@@ -1,21 +1,12 @@
1
- import * as class_variance_authority_types from 'class-variance-authority/types';
1
+ export { Button } from './components/ui/button.mjs';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { ReactNode } from 'react';
4
- import { VariantProps } from 'class-variance-authority';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
-
7
- declare const buttonVariants: (props?: ({
8
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
9
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
10
- } & class_variance_authority_types.ClassProp) | undefined) => string;
11
- interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
12
- asChild?: boolean;
13
- }
14
- declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
4
+ import 'class-variance-authority/types';
5
+ import 'class-variance-authority';
15
6
 
16
7
  declare const ClientOnly: ({ children }: {
17
8
  children: ReactNode;
18
- }) => react_jsx_runtime.JSX.Element | null;
9
+ }) => React$1.JSX.Element | null;
19
10
 
20
11
  interface NavItem {
21
12
  title: string;
@@ -61,10 +52,10 @@ interface NavbarProps {
61
52
  */
62
53
  onProfileSelected?: () => void;
63
54
  onLogout?: () => void;
64
- identityHost?: string;
65
- environmentId?: string;
55
+ identityHost: string;
56
+ environmentId: string;
66
57
  }
67
- declare function Navbar({ items, children, className, logoText, logoSrc, altText, user, onNavigateHome, onNavItemClick, dropdownMenuItems, onDropdownMenuItemClick, onProfileSelected, onLogout, isLoading, identityHost, environmentId, }: NavbarProps): react_jsx_runtime.JSX.Element;
58
+ declare function Navbar({ items, children, className, logoText, logoSrc, altText, user, onNavigateHome, onNavItemClick, dropdownMenuItems, onDropdownMenuItemClick, onProfileSelected, onLogout, isLoading, identityHost, environmentId, }: NavbarProps): React__default.JSX.Element;
68
59
 
69
60
  interface UserProfileProps {
70
61
  loading: boolean;
@@ -87,7 +78,7 @@ interface UserProfileProps {
87
78
  message?: string;
88
79
  } | void>;
89
80
  }
90
- declare const UserProfile: ({ loading, user, handleAuthenticated, onRequestEmailVerification, onVerifyEmail, onAddEmail, }: UserProfileProps) => react_jsx_runtime.JSX.Element;
81
+ declare const UserProfile: ({ loading, user, handleAuthenticated, onRequestEmailVerification, onVerifyEmail, onAddEmail, }: UserProfileProps) => React$1.JSX.Element;
91
82
 
92
83
  type UserDropdownLink = {
93
84
  label: string;
@@ -120,17 +111,17 @@ interface UserDropdownProps {
120
111
  triggerAsChild?: boolean;
121
112
  triggerWrapperClassName?: string;
122
113
  }
123
- declare const UserDropdown: ({ trigger, user, className, onManageAccount, onSignout, links, side, align, sideOffset, modal, triggerAsChild, triggerWrapperClassName, }: UserDropdownProps) => react_jsx_runtime.JSX.Element;
114
+ declare const UserDropdown: ({ trigger, user, className, onManageAccount, onSignout, links, side, align, sideOffset, modal, triggerAsChild, triggerWrapperClassName, }: UserDropdownProps) => React$1.JSX.Element;
124
115
 
125
116
  interface PlaceholderAlertProps {
126
117
  title?: string;
127
118
  description?: string;
128
119
  }
129
- declare const PlaceholderAlert: (props: PlaceholderAlertProps) => react_jsx_runtime.JSX.Element;
120
+ declare const PlaceholderAlert: (props: PlaceholderAlertProps) => React$1.JSX.Element;
130
121
 
131
122
  interface TOTPValidatorProps {
132
123
  onValidate: (code: string) => Promise<void>;
133
124
  }
134
- declare const TOTPValidator: ({ onValidate }: TOTPValidatorProps) => react_jsx_runtime.JSX.Element;
125
+ declare const TOTPValidator: ({ onValidate }: TOTPValidatorProps) => React__default.JSX.Element;
135
126
 
136
- export { Button, ClientOnly, type DropdownMenuItem, type NavItem, Navbar, PlaceholderAlert, TOTPValidator, UserDropdown, UserProfile };
127
+ export { ClientOnly, type DropdownMenuItem, type NavItem, Navbar, PlaceholderAlert, TOTPValidator, UserDropdown, UserProfile };
package/dist/index.d.ts CHANGED
@@ -1,21 +1,12 @@
1
- import * as class_variance_authority_types from 'class-variance-authority/types';
1
+ export { Button } from './components/ui/button.js';
2
2
  import * as React$1 from 'react';
3
3
  import React__default, { ReactNode } from 'react';
4
- import { VariantProps } from 'class-variance-authority';
5
- import * as react_jsx_runtime from 'react/jsx-runtime';
6
-
7
- declare const buttonVariants: (props?: ({
8
- variant?: "default" | "destructive" | "outline" | "secondary" | "ghost" | "link" | null | undefined;
9
- size?: "default" | "sm" | "lg" | "icon" | null | undefined;
10
- } & class_variance_authority_types.ClassProp) | undefined) => string;
11
- interface ButtonProps extends React$1.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
12
- asChild?: boolean;
13
- }
14
- declare const Button: React$1.ForwardRefExoticComponent<ButtonProps & React$1.RefAttributes<HTMLButtonElement>>;
4
+ import 'class-variance-authority/types';
5
+ import 'class-variance-authority';
15
6
 
16
7
  declare const ClientOnly: ({ children }: {
17
8
  children: ReactNode;
18
- }) => react_jsx_runtime.JSX.Element | null;
9
+ }) => React$1.JSX.Element | null;
19
10
 
20
11
  interface NavItem {
21
12
  title: string;
@@ -61,10 +52,10 @@ interface NavbarProps {
61
52
  */
62
53
  onProfileSelected?: () => void;
63
54
  onLogout?: () => void;
64
- identityHost?: string;
65
- environmentId?: string;
55
+ identityHost: string;
56
+ environmentId: string;
66
57
  }
67
- declare function Navbar({ items, children, className, logoText, logoSrc, altText, user, onNavigateHome, onNavItemClick, dropdownMenuItems, onDropdownMenuItemClick, onProfileSelected, onLogout, isLoading, identityHost, environmentId, }: NavbarProps): react_jsx_runtime.JSX.Element;
58
+ declare function Navbar({ items, children, className, logoText, logoSrc, altText, user, onNavigateHome, onNavItemClick, dropdownMenuItems, onDropdownMenuItemClick, onProfileSelected, onLogout, isLoading, identityHost, environmentId, }: NavbarProps): React__default.JSX.Element;
68
59
 
69
60
  interface UserProfileProps {
70
61
  loading: boolean;
@@ -87,7 +78,7 @@ interface UserProfileProps {
87
78
  message?: string;
88
79
  } | void>;
89
80
  }
90
- declare const UserProfile: ({ loading, user, handleAuthenticated, onRequestEmailVerification, onVerifyEmail, onAddEmail, }: UserProfileProps) => react_jsx_runtime.JSX.Element;
81
+ declare const UserProfile: ({ loading, user, handleAuthenticated, onRequestEmailVerification, onVerifyEmail, onAddEmail, }: UserProfileProps) => React$1.JSX.Element;
91
82
 
92
83
  type UserDropdownLink = {
93
84
  label: string;
@@ -120,17 +111,17 @@ interface UserDropdownProps {
120
111
  triggerAsChild?: boolean;
121
112
  triggerWrapperClassName?: string;
122
113
  }
123
- declare const UserDropdown: ({ trigger, user, className, onManageAccount, onSignout, links, side, align, sideOffset, modal, triggerAsChild, triggerWrapperClassName, }: UserDropdownProps) => react_jsx_runtime.JSX.Element;
114
+ declare const UserDropdown: ({ trigger, user, className, onManageAccount, onSignout, links, side, align, sideOffset, modal, triggerAsChild, triggerWrapperClassName, }: UserDropdownProps) => React$1.JSX.Element;
124
115
 
125
116
  interface PlaceholderAlertProps {
126
117
  title?: string;
127
118
  description?: string;
128
119
  }
129
- declare const PlaceholderAlert: (props: PlaceholderAlertProps) => react_jsx_runtime.JSX.Element;
120
+ declare const PlaceholderAlert: (props: PlaceholderAlertProps) => React$1.JSX.Element;
130
121
 
131
122
  interface TOTPValidatorProps {
132
123
  onValidate: (code: string) => Promise<void>;
133
124
  }
134
- declare const TOTPValidator: ({ onValidate }: TOTPValidatorProps) => react_jsx_runtime.JSX.Element;
125
+ declare const TOTPValidator: ({ onValidate }: TOTPValidatorProps) => React__default.JSX.Element;
135
126
 
136
- export { Button, ClientOnly, type DropdownMenuItem, type NavItem, Navbar, PlaceholderAlert, TOTPValidator, UserDropdown, UserProfile };
127
+ export { ClientOnly, type DropdownMenuItem, type NavItem, Navbar, PlaceholderAlert, TOTPValidator, UserDropdown, UserProfile };