@windrun-huaiin/third-ui 5.10.1 → 5.10.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@windrun-huaiin/third-ui",
3
- "version": "5.10.1",
3
+ "version": "5.10.3",
4
4
  "description": "Third-party integrated UI components for windrun-huaiin projects",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
@@ -53,7 +53,7 @@
53
53
  "mermaid": "^11.6.0",
54
54
  "react-medium-image-zoom": "^5.2.14",
55
55
  "zod": "^3.22.4",
56
- "@windrun-huaiin/base-ui": "^5.3.4"
56
+ "@windrun-huaiin/base-ui": "^6.0.1"
57
57
  },
58
58
  "peerDependencies": {
59
59
  "react": "19.1.0",
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
 
3
3
  import { globalLucideIcons as icons } from '@base-ui/components/global-icon';
4
- import { ClerkLoaded, ClerkLoading, SignedIn, SignedOut, SignInButton, UserButton } from "@clerk/nextjs";
4
+ import { ClerkLoaded, ClerkLoading, SignedIn, SignedOut, SignInButton, SignUpButton, UserButton } from "@clerk/nextjs";
5
5
  import { useTranslations } from 'next-intl';
6
6
  import { type JSX } from 'react';
7
7
 
@@ -9,11 +9,13 @@ interface ClerkUserProps {
9
9
  locale: string;
10
10
  // default as true, ‘cause Clerk direct is not well, so just use model for sign-in/sign-up
11
11
  clerkAuthInModal?: boolean;
12
+ showSignUp?: boolean;
12
13
  }
13
14
 
14
15
  export function ClerkUser({
15
16
  locale,
16
- clerkAuthInModal = true
17
+ clerkAuthInModal = true,
18
+ showSignUp = true
17
19
  }: ClerkUserProps): JSX.Element {
18
20
  const t = useTranslations('clerk');
19
21
  const t2 = useTranslations('footer');
@@ -29,6 +31,13 @@ export function ClerkUser({
29
31
  {t('signIn')}
30
32
  </button>
31
33
  </SignInButton>
34
+ {showSignUp && (
35
+ <SignUpButton mode={clerkAuthInModal ? 'modal' : 'redirect'}>
36
+ <button className="w-20 h-9 px-2 border border-gray-300 rounded-full hover:bg-gray-100 dark:border-gray-600 dark:hover:bg-gray-800 text-center text-sm">
37
+ {t('signUp')}
38
+ </button>
39
+ </SignUpButton>
40
+ )}
32
41
  </SignedOut>
33
42
  <SignedIn>
34
43
  <UserButton