@authdog/react-elements 0.0.38 → 0.0.40

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 (54) hide show
  1. package/.turbo/turbo-build.log +44 -41
  2. package/CHANGELOG.md +12 -0
  3. package/dist/components/ui/alert.js.map +1 -1
  4. package/dist/components/ui/alert.mjs.map +1 -1
  5. package/dist/components/ui/avatar.js.map +1 -1
  6. package/dist/components/ui/avatar.mjs.map +1 -1
  7. package/dist/components/ui/badge.js.map +1 -1
  8. package/dist/components/ui/badge.mjs.map +1 -1
  9. package/dist/components/ui/card.js.map +1 -1
  10. package/dist/components/ui/card.mjs.map +1 -1
  11. package/dist/components/ui/dropdown-menu.js.map +1 -1
  12. package/dist/components/ui/dropdown-menu.mjs.map +1 -1
  13. package/dist/components/ui/input.js.map +1 -1
  14. package/dist/components/ui/input.mjs.map +1 -1
  15. package/dist/components/ui/label.js.map +1 -1
  16. package/dist/components/ui/label.mjs.map +1 -1
  17. package/dist/components/ui/separator.js.map +1 -1
  18. package/dist/components/ui/separator.mjs.map +1 -1
  19. package/dist/components/ui/sheet.js.map +1 -1
  20. package/dist/components/ui/sheet.mjs.map +1 -1
  21. package/dist/index.d.mts +1 -1
  22. package/dist/index.d.ts +1 -1
  23. package/dist/index.js.map +1 -1
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/styles.css +1 -1
  26. package/package.json +3 -3
  27. package/src/components/core/client-only.tsx +10 -15
  28. package/src/components/core/navbar.tsx +81 -50
  29. package/src/components/core/placeholder-alert.tsx +7 -9
  30. package/src/components/core/user-dropdown.tsx +97 -55
  31. package/src/components/core/user-profile.tsx +180 -85
  32. package/src/components/flow/login.tsx +42 -29
  33. package/src/components/flow/totp-validator.tsx +94 -73
  34. package/src/components/icons.tsx +13 -13
  35. package/src/components/ui/alert.tsx +11 -11
  36. package/src/components/ui/avatar.tsx +10 -10
  37. package/src/components/ui/badge.tsx +9 -9
  38. package/src/components/ui/card.tsx +13 -13
  39. package/src/components/ui/dropdown-menu.tsx +39 -37
  40. package/src/components/ui/input.tsx +5 -5
  41. package/src/components/ui/label.tsx +7 -7
  42. package/src/components/ui/separator.tsx +7 -7
  43. package/src/components/ui/sheet.tsx +21 -21
  44. package/src/index.ts +6 -6
  45. package/src/main.tsx +4 -6
  46. package/src/preview.tsx +4 -8
  47. package/src/stories/Button._stories.tsx +15 -11
  48. package/src/stories/LoginForm.stories.tsx +6 -6
  49. package/src/stories/Navbar._stories.tsx +57 -19
  50. package/src/stories/PlaceholderAlert._stories.tsx +8 -8
  51. package/src/stories/TotpValidator.stories.tsx +10 -8
  52. package/src/stories/UserDropdown.stories.tsx +7 -9
  53. package/src/stories/UserProfile.stories.tsx +12 -12
  54. package/tsup.config.ts +6 -9
@@ -1,14 +1,16 @@
1
- import type { Story } from '@ladle/react';
2
- import { TOTPValidator } from "../components/flow/totp-validator"
3
- import "../global.css"
1
+ import type { Story } from "@ladle/react";
2
+ import { TOTPValidator } from "../components/flow/totp-validator";
3
+ import "../global.css";
4
4
 
5
- export const Default: Story = () => <TOTPValidator
5
+ export const Default: Story = () => (
6
+ <TOTPValidator
6
7
  onValidate={async (code) => {
7
- console.log(code)
8
+ console.log(code);
8
9
  }}
9
- />;
10
- Default.storyName = 'Default TOTP Validator';
10
+ />
11
+ );
12
+ Default.storyName = "Default TOTP Validator";
11
13
 
12
14
  // export const defaultTOTPValidator: Story = () => (
13
15
  // <TOTPValidator />
14
- // );
16
+ // );
@@ -1,6 +1,6 @@
1
- import React from "react"
2
- import { UserDropdown } from "../components/core/user-dropdown"
3
- import { Avatar, AvatarFallback, AvatarImage } from "../components/ui/avatar"
1
+ import React from "react";
2
+ import { UserDropdown } from "../components/core/user-dropdown";
3
+ import { Avatar, AvatarFallback, AvatarImage } from "../components/ui/avatar";
4
4
 
5
5
  const DemoTrigger = () => (
6
6
  <span className="inline-flex items-center justify-center h-10 w-10 rounded-full border bg-white shadow">
@@ -9,15 +9,15 @@ const DemoTrigger = () => (
9
9
  <AvatarFallback>JD</AvatarFallback>
10
10
  </Avatar>
11
11
  </span>
12
- )
12
+ );
13
13
 
14
14
  const demoUser = {
15
15
  displayName: "Jane Doe",
16
16
  emails: [{ value: "jane.doe@example.com" }],
17
17
  photos: [{ value: "https://i.pravatar.cc/100" }],
18
- }
18
+ };
19
19
 
20
- export default { title: "Core/UserDropdown" }
20
+ export default { title: "Core/UserDropdown" };
21
21
 
22
22
  export const Basic = () => (
23
23
  <div className="p-10">
@@ -31,6 +31,4 @@ export const Basic = () => (
31
31
  align="start"
32
32
  />
33
33
  </div>
34
- )
35
-
36
-
34
+ );
@@ -1,10 +1,10 @@
1
- import type { StoryDefault, Story } from "@ladle/react"
2
- import { UserProfile } from "../components/core/user-profile"
3
- import "../global.css"
1
+ import type { StoryDefault, Story } from "@ladle/react";
2
+ import { UserProfile } from "../components/core/user-profile";
3
+ import "../global.css";
4
4
 
5
5
  export default {
6
6
  title: "Core/UserProfile",
7
- } satisfies StoryDefault
7
+ } satisfies StoryDefault;
8
8
 
9
9
  const baseUser: any = {
10
10
  id: "user_123",
@@ -13,16 +13,16 @@ const baseUser: any = {
13
13
  emails: [{ id: "e1", value: "jane.primary@example.com" }],
14
14
  verifications: [],
15
15
  photos: [],
16
- }
16
+ };
17
17
 
18
18
  export const EmailNotVerified: Story = () => {
19
19
  return (
20
20
  <div className="p-6 bg-background text-foreground">
21
21
  <UserProfile loading={false} user={{ ...baseUser }} />
22
22
  </div>
23
- )
24
- }
25
- EmailNotVerified.storyName = "Email not verified"
23
+ );
24
+ };
25
+ EmailNotVerified.storyName = "Email not verified";
26
26
 
27
27
  export const EmailVerified: Story = () => {
28
28
  const verifiedUser = {
@@ -36,11 +36,11 @@ export const EmailVerified: Story = () => {
36
36
  updatedAt: new Date().toISOString(),
37
37
  },
38
38
  ],
39
- }
39
+ };
40
40
  return (
41
41
  <div className="p-6 bg-background text-foreground">
42
42
  <UserProfile loading={false} user={verifiedUser} />
43
43
  </div>
44
- )
45
- }
46
- EmailVerified.storyName = "Email verified"
44
+ );
45
+ };
46
+ EmailVerified.storyName = "Email verified";
package/tsup.config.ts CHANGED
@@ -1,11 +1,7 @@
1
1
  import { defineConfig } from "tsup";
2
2
 
3
3
  export default defineConfig({
4
- entry: [
5
- "src/index.ts",
6
- "src/components/ui/*.tsx",
7
- "src/lib/*.ts"
8
- ], // Build all entry points
4
+ entry: ["src/index.ts", "src/components/ui/*.tsx", "src/lib/*.ts"], // Build all entry points
9
5
  format: ["esm", "cjs"],
10
6
  dts: {
11
7
  resolve: true,
@@ -26,9 +22,10 @@ export default defineConfig({
26
22
  js: '"use client";',
27
23
  };
28
24
  options.define = {
29
- 'process.env.NODE_ENV': '"production"',
25
+ "process.env.NODE_ENV": '"production"',
30
26
  };
31
- options.resolveExtensions = ['.tsx', '.ts', '.jsx', '.js', '.json'];
27
+ options.resolveExtensions = [".tsx", ".ts", ".jsx", ".js", ".json"];
32
28
  },
33
- onSuccess: "cp src/global.css dist/global.css && cp postcss.config.mjs dist/postcss.config.mjs && cp tailwind.config.ts dist/tailwind.config.ts"
34
- });
29
+ onSuccess:
30
+ "cp src/global.css dist/global.css && cp postcss.config.mjs dist/postcss.config.mjs && cp tailwind.config.ts dist/tailwind.config.ts",
31
+ });